Fullc_Sydney.bat 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. @echo off
  2. REM ****************************************************************************
  3. REM
  4. REM Author : Malcolm Smith, MJ freelancing
  5. REM http://www.mjfreelancing.com
  6. REM
  7. REM Note: This batch file copies the ZLIB OBJ files from \Lib\Protocols\ZLib\i386-Win32-ZLib
  8. REM (Update to \Lib\Protocols\ZLib\x86_64-Win64-ZLib if required)
  9. REM
  10. REM Pre-requisites: \Lib\System contains the project / pas/ res files for IndySystem
  11. REM \Lib\Core contains the project / pas/ res files for IndyCore
  12. REM \Lib\Protocols contains the project / pas/ res files for IndyProtocols
  13. REM
  14. REM Command line (optional) parameters:
  15. REM %1 = Configuration option, the default is "Release"
  16. REM %2 = Platform option, the default is "Win32"
  17. REM
  18. REM Example: FullC27 -> will build Release, Win32
  19. REM Example: FullC27 Debug -> will build Debug, Win32
  20. REM Example: FullC27 Release Win64 -> will build Release, Win64 (if available)
  21. REM
  22. REM ****************************************************************************
  23. REM ************************************************************
  24. REM Set up the environment
  25. REM ************************************************************
  26. computil SetupC27
  27. if exist setenv.bat call setenv.bat
  28. if exist setenv.bat del setenv.bat > nul
  29. if (%NDC27%)==() goto enderror
  30. REM Set up the environment
  31. call %NDC27%\bin\rsvars.bat
  32. REM Check for configuration options
  33. SET IndyConfig=Release
  34. SET IndyPlatform=Win32
  35. :setconfig
  36. if [%1]==[] goto setplatform
  37. SET IndyConfig=%1
  38. :setplatform
  39. if [%2]==[] goto preparefolders
  40. SET IndyPlatform=%2
  41. REM ************************************************************
  42. REM Prepare the folder structure
  43. REM ************************************************************
  44. :preparefolders
  45. if not exist ..\C27\*.* md ..\C27 > nul
  46. if not exist ..\C27\ZLib\*.* md ..\C27\ZLib > nul
  47. if not exist ..\C27\ZLib\i386-Win32-ZLib\*.* md ..\C27\ZLib\i386-Win32-ZLib > nul
  48. if not exist ..\C27\ZLib\x86_64-Win64-ZLib\*.* md ..\C27\ZLib\x86_64-Win64-ZLib > nul
  49. if not exist ..\C27\%IndyPlatform% md ..\C27\%IndyPlatform% > nul
  50. if not exist ..\C27\%IndyPlatform%\%IndyConfig% md ..\C27\%IndyPlatform%\%IndyConfig% > nul
  51. if exist ..\C27\*.* call clean.bat ..\C27\
  52. REM ************************************************************
  53. REM Copy over the IndySystem files
  54. REM ************************************************************
  55. :indysystem
  56. cd System
  57. copy IndySystem270.dpk ..\..\C27 > nul
  58. copy IndySystem270.dproj ..\..\C27 > nul
  59. copy *.res ..\..\C27 > nul
  60. copy *.pas ..\..\C27 > nul
  61. copy *.inc ..\..\C27 > nul
  62. copy *.ico ..\..\C27 > nul
  63. cd ..\..\C27
  64. REM ************************************************************
  65. REM Build IndySystem
  66. REM ************************************************************
  67. msbuild IndySystem270.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  68. if errorlevel 1 goto enderror
  69. REM ************************************************************
  70. REM Copy over the IndyCore files
  71. REM ************************************************************
  72. :indycore
  73. cd ..\Lib\Core
  74. copy *IndyCore270.dpk ..\..\C27 > nul
  75. copy *IndyCore270.dproj ..\..\C27 > nul
  76. copy *.res ..\..\C27 > nul
  77. copy *.pas ..\..\C27 > nul
  78. copy *.dcr ..\..\C27 > nul
  79. copy *.inc ..\..\C27 > nul
  80. copy *.ico ..\..\C27 > nul
  81. cd ..\..\C27
  82. REM ************************************************************
  83. REM Build IndyCore
  84. REM ************************************************************
  85. msbuild IndyCore270.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  86. if errorlevel 1 goto enderror
  87. REM design time is for Win32 only
  88. if not "%IndyPlatform%" == "Win32" goto indyprotocols
  89. msbuild dclIndyCore270.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  90. if errorlevel 1 goto enderror
  91. REM ************************************************************
  92. REM Copy over the IndyProtocols files
  93. REM ************************************************************
  94. :indyprotocols
  95. cd ..\Lib\Protocols
  96. copy zlib\i386-Win32-ZLib\*.obj ..\..\C27\ZLib\i386-Win32-ZLib > nul
  97. copy zlib\x86_64-Win64-ZLib\*.obj ..\..\C27\ZLib\x86_64-Win64-ZLib > nul
  98. copy *IndyProtocols270.dpk ..\..\C27 > nul
  99. copy *IndyProtocols270.dproj ..\..\C27 > nul
  100. copy *.res ..\..\C27 > nul
  101. copy *.pas ..\..\C27 > nul
  102. copy *.dcr ..\..\C27 > nul
  103. copy *.inc ..\..\C27 > nul
  104. copy *.ico ..\..\C27 > nul
  105. cd ..\..\C27
  106. REM ************************************************************
  107. REM Build IndyProtocols
  108. REM ************************************************************
  109. msbuild IndyProtocols270.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  110. if errorlevel 1 goto enderror
  111. REM design time is for Win32 only
  112. if not "%IndyPlatform%" == "Win32" goto copygenerated
  113. msbuild dclIndyProtocols270.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  114. if errorlevel 1 goto enderror
  115. :copygenerated
  116. REM ************************************************************
  117. REM Copy over all generated files
  118. REM ************************************************************
  119. copy ..\Output\hpp\%IndyPlatform%\%IndyConfig%\Id*.hpp %IndyPlatform%\%IndyConfig%
  120. copy "%BDSCOMMONDIR%\Bpl\*Indy*.bpl" %IndyPlatform%\%IndyConfig%
  121. copy *Indy*.bpl %IndyPlatform%\%IndyConfig%
  122. copy ..\Output\Bpi\%IndyPlatform%\%IndyConfig%\Indy*.bpi %IndyPlatform%\%IndyConfig%
  123. if "%IndyPlatform%" == "Win32" copy "..\Output\Obj\%IndyPlatform%\%IndyConfig%\Indy*.Lib" %IndyPlatform%\%IndyConfig%
  124. copy indysystem270.res %IndyPlatform%\%IndyConfig%
  125. copy indycore270.res %IndyPlatform%\%IndyConfig%
  126. copy indyprotocols270.res %IndyPlatform%\%IndyConfig%
  127. REM ************************************************************
  128. REM Delete all other files / directories no longer required
  129. REM ************************************************************
  130. del /Q ..\Output\hpp\%IndyPlatform%\%IndyConfig%\*.*
  131. del /Q ..\Output\Bpi\%IndyPlatform%\%IndyConfig%\*.*
  132. if "%IndyPlatform%" == "Win32" del /Q ..\Output\Obj\%IndyPlatform%\%IndyConfig%\*.*
  133. del /Q "%BDSCOMMONDIR%\Bpl\*Indy*.bpl"
  134. del /Q "%BDSCOMMONDIR%\Dcp\*.*"
  135. del /Q ZLib\i386-Win32-ZLib\*.*
  136. del /Q ZLib\x86_64-Win64-ZLib\*.*
  137. del /Q *.*
  138. rd ZLib\i386-Win32-ZLib
  139. rd ZLib\x86_64-Win64-ZLib
  140. rd ZLib
  141. rd ..\Output\hpp\%IndyPlatform%\%IndyConfig%
  142. rd ..\Output\hpp\%IndyPlatform%
  143. rd ..\Output\hpp
  144. rd ..\Output\Bpi\%IndyPlatform%\%IndyConfig%
  145. rd ..\Output\Bpi\%IndyPlatform%
  146. rd ..\Output\Bpi
  147. if "%IndyPlatform%" == "Win32" rd ..\Output\Obj\%IndyPlatform%\%IndyConfig%
  148. if "%IndyPlatform%" == "Win32" rd ..\Output\Obj\%IndyPlatform%
  149. if "%IndyPlatform%" == "Win32" rd ..\Output\Obj
  150. rd ..\Output
  151. goto endok
  152. :enderror
  153. echo Error!
  154. pause
  155. goto endok
  156. :endnocompiler
  157. echo C++Builder 27 Compiler Not Present!
  158. goto endok
  159. :endok
  160. cd ..\Lib