Fullc_5.bat 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. @echo off
  2. REM ****************************************************************************
  3. REM
  4. REM Author : Malcolm Smith, MJ freelancing
  5. REM http://www.mjfreelancing.com
  6. REM
  7. REM Pre-requisites: \Lib\Protocols\ZLib must contain the ZLIB OBJ files
  8. REM \Lib\System contains the project / pas/ res files for IndySystem
  9. REM \Lib\Core contains the project / pas/ res files for IndyCore
  10. REM \Lib\Protocols contains the project / pas/ res files for IndyProtocols
  11. REM
  12. REM ****************************************************************************
  13. computil SetupC5
  14. if exist setenv.bat call setenv.bat
  15. if exist setenv.bat del setenv.bat > nul
  16. if (%NDC5%)==() goto enderror
  17. if not exist %NDC5%\bin\dcc32.exe goto endnocompiler
  18. if not exist ..\C5\*.* md ..\C5
  19. if exist ..\C5\*.* call clean.bat ..\C5\
  20. cd System
  21. copy IndySystem50.dpk ..\..\C5 > nul
  22. copy *IndySystem50.cfg1 ..\..\C5 > nul
  23. copy *IndySystem50.cfg2 ..\..\C5 > nul
  24. copy *.res ..\..\C5 > nul
  25. copy *.pas ..\..\C5 > nul
  26. copy *.inc ..\..\C5 > nul
  27. cd ..\..\C5
  28. REM ************************************************************
  29. REM Compile IndySystem50 - Round 1
  30. REM ************************************************************
  31. copy IndySystem50.cfg1 IndySystem50.cfg > nul
  32. %NDC5%\bin\dcc32.exe /B IndySystem50.dpk
  33. if errorlevel 1 goto enderror
  34. REM ************************************************************
  35. REM Compile IndySystem50 - Round 2
  36. REM ************************************************************
  37. del IndySystem50.cfg > nul
  38. copy IndySystem50.cfg2 IndySystem50.cfg > nul
  39. %NDC5%\bin\dcc32.exe /B IndySystem50.dpk
  40. if errorlevel 1 goto enderror
  41. REM ************************************************************
  42. REM Correct the LSP file (quote everything)
  43. REM ************************************************************
  44. ..\Lib\LspFix.exe IndySystem50.lsp
  45. %NDC5%\bin\tlib.exe IndySystem50.lib @IndySystem50.lsp /P64
  46. if errorlevel 1 goto enderror
  47. REM ************************************************************
  48. REM Prepare to copy all CORE related files
  49. REM ************************************************************
  50. cd ..\Lib\Core
  51. copy *IndyCore50.dpk ..\..\C5 > nul
  52. copy *IndyCore50.cfg1 ..\..\C5 > nul
  53. copy *IndyCore50.cfg2 ..\..\C5 > nul
  54. copy *.res ..\..\C5 > nul
  55. copy *.pas ..\..\C5 > nul
  56. copy *.dcr ..\..\C5 > nul
  57. copy *.inc ..\..\C5 > nul
  58. cd ..\..\C5
  59. REM ************************************************************
  60. REM Compile IndyCore50 - Round 1
  61. REM ************************************************************
  62. copy IndyCore50.cfg1 IndyCore50.cfg > nul
  63. %NDC5%\bin\dcc32.exe /B IndyCore50.dpk
  64. if errorlevel 1 goto enderror
  65. REM ************************************************************
  66. REM Compile IndyCore50 - Round 2
  67. REM ************************************************************
  68. del IndyCore50.cfg > nul
  69. copy IndyCore50.cfg2 IndyCore50.cfg > nul
  70. %NDC5%\bin\dcc32.exe /B IndyCore50.dpk
  71. if errorlevel 1 goto enderror
  72. ..\Lib\LspFix.exe IndyCore50.lsp
  73. %NDC5%\bin\tlib.exe IndyCore50.lib @IndyCore50.lsp /P64
  74. if errorlevel 1 goto enderror
  75. REM ************************************************************
  76. REM Compile dclIndyCore50 - Round 1
  77. REM ************************************************************
  78. copy dclIndyCore50.cfg1 dclIndyCore50.cfg > nul
  79. %NDC5%\bin\dcc32.exe /B dclIndyCore50.dpk
  80. if errorlevel 1 goto enderror
  81. REM ************************************************************
  82. REM Compile dclIndyCore50 - Round 2
  83. REM ************************************************************
  84. del dclIndyCore50.cfg > nul
  85. copy dclIndyCore50.cfg2 dclIndyCore50.cfg > nul
  86. %NDC5%\bin\dcc32.exe /B dclIndyCore50.dpk
  87. if errorlevel 1 goto enderror
  88. rem ..\Lib\LspFix.exe dclIndyCore50.lsp
  89. rem %NDC5%\bin\tlib.exe dclIndyCore50.lib @dclIndyCore50.lsp /P64
  90. rem if errorlevel 1 goto enderror
  91. REM ************************************************************
  92. REM Prepare to copy all PROTOCOLS related files
  93. REM ************************************************************
  94. cd ..\Lib\Protocols
  95. copy zlib\*.obj ..\..\C5 > nul
  96. copy *IndyProtocols50.dpk ..\..\C5 > nul
  97. copy *IndyProtocols50.cfg1* ..\..\C5 > nul
  98. copy *IndyProtocols50.cfg2 ..\..\C5 > nul
  99. copy *.res ..\..\C5 > nul
  100. copy *.pas ..\..\C5 > nul
  101. copy *.dcr ..\..\C5 > nul
  102. copy *.inc ..\..\C5 > nul
  103. cd ..\..\C5
  104. REM ************************************************************
  105. REM Compile IndyProtocols50 - Round 1a (dummy build to get headers)
  106. REM ************************************************************
  107. copy IndyProtocols50.cfg1a IndyProtocols50.cfg > nul
  108. %NDC5%\bin\dcc32.exe /B IndyProtocols50.dpk
  109. if errorlevel 1 goto enderror
  110. REM ************************************************************
  111. REM Compile IndyProtocols50 - Round 1b (dummy build to get headers)
  112. REM ************************************************************
  113. del IndyProtocols50.cfg > nul
  114. copy IndyProtocols50.cfg1b IndyProtocols50.cfg > nul
  115. %NDC5%\bin\dcc32.exe /B IndyProtocols50.dpk
  116. if errorlevel 1 goto enderror
  117. REM ************************************************************
  118. REM Compile IndyProtocols50 - Round 2
  119. REM ************************************************************
  120. del IndyProtocols50.cfg > nul
  121. copy IndyProtocols50.cfg2 IndyProtocols50.cfg > nul
  122. %NDC5%\bin\dcc32.exe /B IndyProtocols50.dpk
  123. if errorlevel 1 goto enderror
  124. ..\Lib\LspFix.exe IndyProtocols50.lsp
  125. %NDC5%\bin\tlib.exe IndyProtocols50.lib @IndyProtocols50.lsp /P64
  126. if errorlevel 1 goto enderror
  127. REM ************************************************************
  128. REM Compile dclIndyProtocols50 - Round 1
  129. REM ************************************************************
  130. copy dclIndyProtocols50.cfg1 dclIndyProtocols50.cfg > nul
  131. %NDC5%\bin\dcc32.exe /B dclIndyProtocols50.dpk
  132. if errorlevel 1 goto enderror
  133. REM ************************************************************
  134. REM Compile dclIndyProtocols50 - Round 2
  135. REM ************************************************************
  136. del dclIndyProtocols50.cfg > nul
  137. copy dclIndyProtocols50.cfg2 dclIndyProtocols50.cfg > nul
  138. %NDC5%\bin\dcc32.exe /B dclIndyProtocols50.dpk
  139. if errorlevel 1 goto enderror
  140. REM ************************************************************
  141. REM Set all files we want to keep with the R attribute then
  142. REM delete the rest before restoring the attribute
  143. REM ************************************************************
  144. attrib +r Id*.hpp
  145. attrib +r *.bpl
  146. attrib +r Indy*.bpi
  147. attrib +r Indy*.lib
  148. attrib +r indysystem50.res
  149. attrib +r indycore50.res
  150. attrib +r indyprotocols50.res
  151. del /Q /A:-R *.* > nul
  152. attrib -r Id*.hpp
  153. attrib -r *.bpl
  154. attrib -r Indy*.bpi
  155. attrib -r Indy*.lib
  156. attrib -r indysystem50.res
  157. attrib -r indycore50.res
  158. attrib -r indyprotocols50.res
  159. goto endok
  160. :enderror
  161. echo Error!
  162. pause
  163. goto endok
  164. :endnocompiler
  165. echo C++Builder 5 Compiler Not Present!
  166. goto endok
  167. :endok
  168. rem call clean
  169. cd ..\Lib