Fullc_XE4.bat 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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: FullC18 -> will build Release, Win32
  19. REM Example: FullC18 Debug -> will build Debug, Win32
  20. REM Example: FullC18 Release Win64 -> will build Release, Win64 (if available)
  21. REM
  22. REM ****************************************************************************
  23. REM ************************************************************
  24. REM Set up the environment
  25. REM ************************************************************
  26. computil SetupC18
  27. if exist setenv.bat call setenv.bat
  28. if exist setenv.bat del setenv.bat > nul
  29. if (%NDC18%)==() goto enderror
  30. REM Set up the environment
  31. call %NDC18%\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 ..\C18\*.* md ..\C18 > nul
  46. if not exist ..\C18\ZLib\*.* md ..\C18\ZLib > nul
  47. if not exist ..\C18\ZLib\i386-Win32-ZLib\*.* md ..\C18\ZLib\i386-Win32-ZLib > nul
  48. if not exist ..\C18\ZLib\x86_64-Win64-ZLib\*.* md ..\C18\ZLib\x86_64-Win64-ZLib > nul
  49. if not exist ..\C18\%IndyPlatform% md ..\C18\%IndyPlatform% > nul
  50. if not exist ..\C18\%IndyPlatform%\%IndyConfig% md ..\C18\%IndyPlatform%\%IndyConfig% > nul
  51. if exist ..\C18\*.* call clean.bat ..\C18\
  52. REM ************************************************************
  53. REM Copy over the IndySystem files
  54. REM ************************************************************
  55. :indysystem
  56. cd System
  57. copy IndySystem180.dpk ..\..\C18 > nul
  58. copy IndySystem180.dproj ..\..\C18 > nul
  59. copy *.res ..\..\C18 > nul
  60. copy *.pas ..\..\C18 > nul
  61. copy *.inc ..\..\C18 > nul
  62. copy *.ico ..\..\C18 > nul
  63. cd ..\..\C18
  64. REM ************************************************************
  65. REM Build IndySystem
  66. REM ************************************************************
  67. msbuild IndySystem180.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 *IndyCore180.dpk ..\..\C18 > nul
  75. copy *IndyCore180.dproj ..\..\C18 > nul
  76. copy *.res ..\..\C18 > nul
  77. copy *.pas ..\..\C18 > nul
  78. copy *.dcr ..\..\C18 > nul
  79. copy *.inc ..\..\C18 > nul
  80. copy *.ico ..\..\C18 > nul
  81. cd ..\..\C18
  82. REM ************************************************************
  83. REM Build IndyCore
  84. REM ************************************************************
  85. msbuild IndyCore180.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 dclIndyCore180.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 ..\..\C18\ZLib\i386-Win32-ZLib > nul
  97. copy zlib\x86_64-Win64-ZLib\*.obj ..\..\C18\ZLib\x86_64-Win64-ZLib > nul
  98. copy *IndyProtocols180.dpk ..\..\C18 > nul
  99. copy *IndyProtocols180.dproj ..\..\C18 > nul
  100. copy *.res ..\..\C18 > nul
  101. copy *.pas ..\..\C18 > nul
  102. copy *.dcr ..\..\C18 > nul
  103. copy *.inc ..\..\C18 > nul
  104. copy *.ico ..\..\C18 > nul
  105. cd ..\..\C18
  106. REM ************************************************************
  107. REM Build IndyProtocols
  108. REM ************************************************************
  109. msbuild IndyProtocols180.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 dclIndyProtocols180.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 "..\Output\Bpi\%IndyPlatform%\%IndyConfig%\*Indy*.bpl" %IndyPlatform%\%IndyConfig%
  121. copy "..\Output\Bpi\%IndyPlatform%\%IndyConfig%\Indy*.bpi" %IndyPlatform%\%IndyConfig%
  122. if "%IndyPlatform%" == "Win32" copy "..\Output\Obj\%IndyPlatform%\%IndyConfig%\Indy*.Lib" %IndyPlatform%\%IndyConfig%
  123. copy indysystem180.res %IndyPlatform%\%IndyConfig%
  124. copy indycore180.res %IndyPlatform%\%IndyConfig%
  125. copy indyprotocols180.res %IndyPlatform%\%IndyConfig%
  126. REM ************************************************************
  127. REM Delete all other files / directories no longer required
  128. REM ************************************************************
  129. del /Q ..\Output\hpp\%IndyPlatform%\%IndyConfig%\*.*
  130. del /Q ..\Output\Bpi\%IndyPlatform%\%IndyConfig%\*.*
  131. if "%IndyPlatform%" == "Win32" del /Q ..\Output\Obj\%IndyPlatform%\%IndyConfig%\*.*
  132. del /Q ..\Output\Dcp\%IndyPlatform%\%IndyConfig%\*.*
  133. del /Q ..\Output\Dcu\%IndyPlatform%\%IndyConfig%\*.*
  134. del /Q ZLib\i386-Win32-ZLib\*.*
  135. del /Q ZLib\x86_64-Win64-ZLib\*.*
  136. del /Q *.*
  137. rd ZLib\i386-Win32-ZLib
  138. rd ZLib\x86_64-Win64-ZLib
  139. rd ZLib
  140. rd ..\Output\hpp\%IndyPlatform%\%IndyConfig%
  141. rd ..\Output\hpp\%IndyPlatform%
  142. rd ..\Output\hpp
  143. rd ..\Output\Bpi\%IndyPlatform%\%IndyConfig%
  144. rd ..\Output\Bpi\%IndyPlatform%
  145. rd ..\Output\Bpi
  146. if "%IndyPlatform%" == "Win32" rd ..\Output\Obj\%IndyPlatform%\%IndyConfig%
  147. if "%IndyPlatform%" == "Win32" rd ..\Output\Obj\%IndyPlatform%
  148. if "%IndyPlatform%" == "Win32" rd ..\Output\Obj
  149. rd ..\Output\Dcp\%IndyPlatform%\%IndyConfig%
  150. rd ..\Output\Dcp\%IndyPlatform%
  151. rd ..\Output\Dcp
  152. rd ..\Output\Dcu\%IndyPlatform%\%IndyConfig%
  153. rd ..\Output\Dcu\%IndyPlatform%
  154. rd ..\Output\Dcu
  155. rd ..\Output
  156. goto endok
  157. :enderror
  158. echo Error!
  159. pause
  160. goto endok
  161. :endnocompiler
  162. echo C++Builder 18 Compiler Not Present!
  163. goto endok
  164. :endok
  165. cd ..\Lib