Tell Git to detect and convert newlines in text files
Tell Git to ignore Delphi local state and build outputs
Tell Git how to treat Delphi file formats

Delphi project files should keep CRLF newlines.  Treat Delphi source
files as plain text.  Treat Delphi binary files as non-text.
Add Apache LICENSE 2.0 and corresponding NOTICE file
Add README
Import CPRS 27 Source

Download

 http://downloads.va.gov/files/FOIA/Software/Patches_By_Application/CPRS%20GUI%20FILES/CPRS%20VERSION%2027/OR_30_243_SRC.ZIP

Unpack the archive:

 unzip OR_30_243_SRC.ZIP
 unzip Ron/BDK47/XWB1_1P47T2.zip

Extract source files for BDK:

 rm -rf BDK &&
 mkdir BDK &&
 paths="
  Source/*.bmp
  Source/*.dfm
  Source/*.inc
  Source/*.pas
  Source/*.PAS
 " &&
 (cd BDK32P47; tar c --transform "s/PAS$/pas/" $paths) |
 (cd BDK; tar x)

Extract source files for CPRS:

 rm -rf CPRS &&
 mkdir CPRS &&
 paths="
  VA/*.pas
  VA/VA508Accessibility/*.bmp
  VA/VA508Accessibility/*.dcr
  VA/VA508Accessibility/*.dfm
  VA/VA508Accessibility/*.inc
  VA/VA508Accessibility/*.pas
  CPRS-Lib/*.dcr
  CPRS-Lib/*.dfm
  CPRS-Lib/*.pas
  CPRS-Lib/ORCtrls.res
  CPRS-Lib/ORDtTm.res
  CPRS-chart/*.dfm
  CPRS-chart/*.pas
  CPRS-chart/*.rc
  CPRS-chart/*.res
  CPRS-chart/*.tlb
  CPRS-chart/*/*.BMP
  CPRS-chart/*/*.bmp
  CPRS-chart/*/*.dfm
  CPRS-chart/*/*.pas
  CPRS-chart/*/*.txt
 " &&
 (cd Ron; tar c --transform "s/-chart/-Chart/" $paths) |
 (cd CPRS; tar x)

Fix newlines:

 find BDK CPRS -type f -exec fromdos {} ";" &&
 tr "\r" "\n" <CPRS/CPRS-Lib/ORDtTmRng.pas > tmp &&
 mv tmp CPRS/CPRS-Lib/ORDtTmRng.pas
Import CPRS 28 Source

Download

 http://downloads.va.gov/files/FOIA/Software/Patches_By_Application/CPRS%20GUI%20FILES/CPRS%20VERSION%2028/OR_30_280_SRC.ZIP

Unpack the archive:

 unzip OR_30_280_SRC.ZIP
 unzip OR_SRC_CREATION/BDK50/XWB1_1P50T1.zip

Extract source files for BDK:

 rm -rf BDK &&
 mkdir BDK &&
 paths="
  Source/*.bmp
  Source/*.dfm
  Source/*.inc
  Source/*.pas
  Source/SharedRPCBroker.dcr
  Source/SharedRPCBroker_*2007.dproj
  Source/SharedRPCBroker_*2007.dpk
  Source/SharedRPCBroker_*2007.res
  Source/VERGENCECONTEXTORLib_TLB.dcr
  Source/XWB_*2007.dcr
  Source/XWB_*2007.dproj
  Source/XWB_*2007.dpk
  Source/XWB_*2007.res
 " &&
 (cd BDK32_P50; tar c $paths) |
 (cd BDK; tar x)

Extract source files for CPRS:

 rm -rf CPRS &&
 mkdir CPRS &&
 paths="
  VA/*.pas
  VA/*2006.bdsproj
  VA/*2006.dpk
  VA/*2006.res
  VA/VA508Accessibility/*.bmp
  VA/VA508Accessibility/*.dcr
  VA/VA508Accessibility/*.dfm
  VA/VA508Accessibility/*.inc
  VA/VA508Accessibility/*.pas
  VA/VA508Accessibility/*2006.bdsproj
  VA/VA508Accessibility/*2006.dpk
  VA/VA508Accessibility/*2006.res
  CPRS-Lib/*.dcr
  CPRS-Lib/*.dfm
  CPRS-Lib/*.pas
  CPRS-Lib/*2006.bdsproj
  CPRS-Lib/*2006.dpk
  CPRS-Lib/*2006.res
  CPRS-Lib/ORCtrls.res
  CPRS-Lib/ORDtTm.res
  CPRS-Chart/*.dfm
  CPRS-Chart/*.dpr
  CPRS-Chart/*.dproj
  CPRS-Chart/*.pas
  CPRS-Chart/*.rc
  CPRS-Chart/*.res
  CPRS-Chart/*.tlb
  CPRS-Chart/*/*.BMP
  CPRS-Chart/*/*.bmp
  CPRS-Chart/*/*.dfm
  CPRS-Chart/*/*.pas
  CPRS-Chart/*/*.txt
 " &&
 (cd OR_SRC_CREATION; tar c $paths) |
 (cd CPRS; tar x)

Fix newlines:

 find BDK CPRS \
   -type f ! -regex ".*\(bdsproj\|dpk\|dpr\|dproj\)$" \
   -exec fromdos {} ";" &&
 tr "\r" "\n" <CPRS/CPRS-Lib/ORDtTmRng.pas > tmp &&
 mv tmp CPRS/CPRS-Lib/ORDtTmRng.pas
Fix RPC BDK Delphi 2007 build file layout

Fix the Delphi project files:

 XWB_R2007.dproj
 XWB_D2007.dproj
 SharedRPCBroker_R2007.dproj
 SharedRPCBroker_D2007.dproj

Organize build output locations by file type.  Place most outputs in a
per-configuration subdirectory.  Remove hard-coded paths.  While at it,
fix Delphi.Personality XML element layout written improperly by the
Delphi IDE and add a trailing newline.

Tell Git to ignore BDK/D* directories containing output.
Create CPRS Delphi 2007 build files

Rename *2006.{res,dpk} to *2007.{res,dpk} to re-use project resource and
package files.  Convert *2006.bdsproj to *2007.dproj and CPRSChart for
Delphi 2007.  Create projects:

 VAShared2007.dproj
 VA508Access2007.dproj
 Borland2007.dproj
 VA2007.dproj
 ORCtrlLib2007.dproj
 ORDateLib2007.dproj
 CPRSChart.dproj

Manually fix the build file layout as was done by the parent commit for
BDK.  Organize build output locations by file type.  Place most outputs
in a per-configuration subdirectory.  Remove hard-coded paths.  While at
it, fix Delphi.Personality XML element layout written improperly by the
Delphi IDE and add a trailing newline.

Tell Git to ignore CPRS/D* and CPRS/Bin output directories.
Remove extra comments from .dpk files

Comments of the form

  Foo in 'Foo.pas' {in 'Foo.pas'};

provide no useful information over the code

  Foo in 'Foo.pas';

so remove them.  Also remove ToolWnds comment that references a
hard-coded path.
Remove references to system *_TLB units for Delphi 2007

Remove unnecessary reference to "Office_TLB".
Replace reference to "MSXML_TLB" with just "MSXML".
Rename BDK and CPRS project files as *.in

Prepare to convert the build system for generation with CMake.
Add CMakeLists.txt files to configure Delphi 2007 projects

Generate the project files instead of hard-coding them in the source
tree.  This enables multiple out-of-source build trees that do not touch
the original source at all.  Also add "make" rules to drive the project
file builds using MSBuild.

Currently the generated projects work automatically for command-line
builds with Delphi 2007.  The projects can be loaded in the IDE but the
user will have to manually set the PATH to point at the BDK output Bpl
directory and load the Delphi components.
Add BUILD instructions

Document the process to build the Delphi code from this source tree.
Install Delphi 2007 and CMake, run CMake, etc.
Add environment check to CMake files

Check when CMake runs that the build environment has been set up
correctly.  If the BUILD instructions are followed properly then none of
the checks should fail.
Fix typo in make program error message

Add cloing } in variable reference.
Add CMAKE_BUILD_TYPE option to select Debug or Release

Pass the configuration to msbuild.  Default to Release.
Make Packages/.gitattributes more specific

The attributes are specific to .m and .zwr files so use more specific
patterns.

Change-Id: I1edaff5a92efd28da8975bc6d727b3868decb298
Move BDK and CPRS to their VistA-FOIA package directories

Move BDK to the "RPC Broker" package.  Move CPRS to the "Order Entry
Results Reporting" package.  Update "CPRS-Chart.dproj.in" to reference
the BDK source in its new location.  Move Delphi file attributes to
"Packages/.gitattributes".  Rename the CMake project to "VistA-FOIA".
Tell Git how to treat our Delphi ".in" files

The ".in" files corresponding to ".dpk", ".dpr", and ".dproj" files do
not need CRLF newlines because CMake normalizes them.  Disable
whitespace checks for them.