Fullc_XE3.bat 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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: FullC17 -> will build Release, Win32
  19. REM Example: FullC17 Debug -> will build Debug, Win32
  20. REM
  21. REM ****************************************************************************
  22. REM ************************************************************
  23. REM Set up the environment
  24. REM ************************************************************
  25. computil SetupC17
  26. if exist setenv.bat call setenv.bat
  27. if exist setenv.bat del setenv.bat > nul
  28. if (%NDC17%)==() goto enderror
  29. REM Set up the environment
  30. call %NDC17%\bin\rsvars.bat
  31. REM Check for configuration options
  32. SET IndyConfig=Release
  33. SET IndyPlatform=Win32
  34. :setconfig
  35. if [%1]==[] goto setplatform
  36. SET IndyConfig=%1
  37. :setplatform
  38. if [%2]==[] goto preparefolders
  39. SET IndyPlatform=%2
  40. REM ************************************************************
  41. REM Prepare the folder structure
  42. REM ************************************************************
  43. :preparefolders
  44. if not exist ..\C17\*.* md ..\C17 > nul
  45. if not exist ..\C17\ZLib\*.* md ..\C17\ZLib > nul
  46. if not exist ..\C17\ZLib\i386-Win32-ZLib\*.* md ..\C17\ZLib\i386-Win32-ZLib > nul
  47. if not exist ..\C17\ZLib\x86_64-Win64-ZLib\*.* md ..\C17\ZLib\x86_64-Win64-ZLib > nul
  48. if not exist ..\C17\%IndyPlatform% md ..\C17\%IndyPlatform% > nul
  49. if not exist ..\C17\%IndyPlatform%\%IndyConfig% md ..\C17\%IndyPlatform%\%IndyConfig% > nul
  50. if exist ..\C17\*.* call clean.bat ..\C17\
  51. REM ************************************************************
  52. REM Copy over the IndySystem files
  53. REM ************************************************************
  54. :indysystem
  55. cd System
  56. copy IndySystem170.dpk ..\..\C17 > nul
  57. copy IndySystem170.dproj ..\..\C17 > nul
  58. copy *.res ..\..\C17 > nul
  59. copy *.pas ..\..\C17 > nul
  60. copy *.inc ..\..\C17 > nul
  61. copy *.ico ..\..\C17 > nul
  62. cd ..\..\C17
  63. REM ************************************************************
  64. REM Build IndySystem
  65. REM ************************************************************
  66. msbuild IndySystem170.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  67. if errorlevel 1 goto enderror
  68. REM ************************************************************
  69. REM Copy over the IndyCore files
  70. REM ************************************************************
  71. :indycore
  72. cd ..\Lib\Core
  73. copy *IndyCore170.dpk ..\..\C17 > nul
  74. copy *IndyCore170.dproj ..\..\C17 > nul
  75. copy *.res ..\..\C17 > nul
  76. copy *.pas ..\..\C17 > nul
  77. copy *.dcr ..\..\C17 > nul
  78. copy *.inc ..\..\C17 > nul
  79. copy *.ico ..\..\C17 > nul
  80. cd ..\..\C17
  81. REM ************************************************************
  82. REM Build IndyCore
  83. REM ************************************************************
  84. msbuild IndyCore170.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  85. if errorlevel 1 goto enderror
  86. msbuild dclIndyCore170.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  87. if errorlevel 1 goto enderror
  88. REM ************************************************************
  89. REM Copy over the IndyProtocols files
  90. REM ************************************************************
  91. :indyprotocols
  92. cd ..\Lib\Protocols
  93. copy zlib\i386-Win32-ZLib\*.obj ..\..\C17\ZLib\i386-Win32-ZLib > nul
  94. copy zlib\x86_64-Win64-ZLib\*.obj ..\..\C17\ZLib\x86_64-Win64-ZLib > nul
  95. copy *IndyProtocols170.dpk ..\..\C17 > nul
  96. copy *IndyProtocols170.dproj ..\..\C17 > nul
  97. copy *.res ..\..\C17 > nul
  98. copy *.pas ..\..\C17 > nul
  99. copy *.dcr ..\..\C17 > nul
  100. copy *.inc ..\..\C17 > nul
  101. copy *.ico ..\..\C17 > nul
  102. cd ..\..\C17
  103. REM ************************************************************
  104. REM Build IndyProtocols
  105. REM ************************************************************
  106. msbuild IndyProtocols170.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  107. if errorlevel 1 goto enderror
  108. msbuild dclIndyProtocols170.dproj /t:Rebuild /p:Config=%IndyConfig%;Platform=%IndyPlatform%;DCC_Define="BCB"
  109. if errorlevel 1 goto enderror
  110. REM ************************************************************
  111. REM Copy over all generated files
  112. REM ************************************************************
  113. copy "%BDSCOMMONDIR%\hpp\Id*.hpp" %IndyPlatform%\%IndyConfig%
  114. copy "..\Bpi\*Indy*.bpl" %IndyPlatform%\%IndyConfig%
  115. copy "..\Dcp\Indy*.bpi" %IndyPlatform%\%IndyConfig%
  116. copy "..\Dcp\Indy*.Lib" %IndyPlatform%\%IndyConfig%
  117. copy indysystem170.res %IndyPlatform%\%IndyConfig%
  118. copy indycore170.res %IndyPlatform%\%IndyConfig%
  119. copy indyprotocols170.res %IndyPlatform%\%IndyConfig%
  120. REM ************************************************************
  121. REM Delete all other files / directories no longer required
  122. REM ************************************************************
  123. del "%BDSCOMMONDIR%\hpp\Id*.hpp"
  124. del "%BDSCOMMONDIR%\hpp\Indy*.hpp"
  125. del /Q ..\Bpi\*.*
  126. del /Q ..\Dcp\*.*
  127. del /Q ZLib\i386-Win32-ZLib\*.*
  128. del /Q ZLib\x86_64-Win64-ZLib\*.*
  129. del /Q *.*
  130. rd ZLib\i386-Win32-ZLib
  131. rd ZLib\x86_64-Win64-ZLib
  132. rd ZLib
  133. rd ..\Bpi
  134. rd ..\Dcp
  135. goto endok
  136. :enderror
  137. echo Error!
  138. pause
  139. goto endok
  140. :endnocompiler
  141. echo C++Builder 17 Compiler Not Present!
  142. goto endok
  143. :endok
  144. cd ..\Lib