Fullc_2009.bat 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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 SetupC12
  14. if exist setenv.bat call setenv.bat
  15. if exist setenv.bat del setenv.bat > nul
  16. if (%NDC12%)==() goto enderror
  17. if not exist %NDC12%\bin\dcc32.exe goto endnocompiler
  18. if not exist ..\C12\*.* md ..\C12 >nul
  19. if exist ..\C12\*.* call clean.bat ..\C12\
  20. cd System
  21. copy IndySystem120.dpk ..\..\C12 > nul
  22. copy *IndySystem120.cfg1 ..\..\C12 > nul
  23. copy *IndySystem120.cfg2 ..\..\C12 > nul
  24. copy *.res ..\..\C12 > nul
  25. copy *.pas ..\..\C12 > nul
  26. copy *.inc ..\..\C12 > nul
  27. cd ..\..\C12
  28. REM ************************************************************
  29. REM Compile IndySystem120 - Round 1
  30. REM ************************************************************
  31. copy IndySystem120.cfg1 IndySystem120.cfg > nul
  32. %NDC12%\bin\dcc32.exe /B IndySystem120.dpk
  33. if errorlevel 1 goto enderror
  34. REM ************************************************************
  35. REM Compile IndySystem120 - Round 2
  36. REM ************************************************************
  37. del IndySystem120.cfg > nul
  38. copy IndySystem120.cfg2 IndySystem120.cfg > nul
  39. %NDC12%\bin\dcc32.exe /B IndySystem120.dpk
  40. if errorlevel 1 goto enderror
  41. REM ************************************************************
  42. REM Prepare to copy all CORE related files
  43. REM ************************************************************
  44. cd ..\Lib\Core
  45. copy *IndyCore120.dpk ..\..\C12 > nul
  46. copy *IndyCore120.cfg1 ..\..\C12 > nul
  47. copy *IndyCore120.cfg2 ..\..\C12 > nul
  48. copy *.res ..\..\C12 > nul
  49. copy *.pas ..\..\C12 > nul
  50. copy *.dcr ..\..\C12 > nul
  51. copy *.inc ..\..\C12 > nul
  52. cd ..\..\C12
  53. REM ************************************************************
  54. REM Compile IndyCore120 - Round 1
  55. REM ************************************************************
  56. copy IndyCore120.cfg1 IndyCore120.cfg > nul
  57. %NDC12%\bin\dcc32.exe /B IndyCore120.dpk
  58. if errorlevel 1 goto enderror
  59. REM ************************************************************
  60. REM Compile IndyCore120 - Round 2
  61. REM ************************************************************
  62. del IndyCore120.cfg > nul
  63. copy IndyCore120.cfg2 IndyCore120.cfg > nul
  64. %NDC12%\bin\dcc32.exe /B IndyCore120.dpk
  65. if errorlevel 1 goto enderror
  66. REM ************************************************************
  67. REM Compile dclIndyCore120 - Round 1
  68. REM ************************************************************
  69. copy dclIndyCore120.cfg1 dclIndyCore120.cfg > nul
  70. %NDC12%\bin\dcc32.exe /B dclIndyCore120.dpk
  71. if errorlevel 1 goto enderror
  72. REM ************************************************************
  73. REM Prepare to copy all PROTOCOLS related files
  74. REM ************************************************************
  75. cd ..\Lib\Protocols
  76. copy zlib\*.obj ..\..\C12 > nul
  77. copy *IndyProtocols120.dpk ..\..\C12 > nul
  78. copy *IndyProtocols120.cfg1 ..\..\C12 > nul
  79. copy *IndyProtocols120.cfg2 ..\..\C12 > nul
  80. copy *.res ..\..\C12 > nul
  81. copy *.pas ..\..\C12 > nul
  82. copy *.dcr ..\..\C12 > nul
  83. copy *.inc ..\..\C12 > nul
  84. cd ..\..\C12
  85. REM ************************************************************
  86. REM Compile IndyProtocols120 - Round 1
  87. REM ************************************************************
  88. copy IndyProtocols120.cfg1 IndyProtocols120.cfg > nul
  89. %NDC12%\bin\dcc32.exe /B IndyProtocols120.dpk
  90. if errorlevel 1 goto enderror
  91. REM ************************************************************
  92. REM Compile IndyProtocols120 - Round 2
  93. REM ************************************************************
  94. del IndyProtocols120.cfg > nul
  95. copy IndyProtocols120.cfg2 IndyProtocols120.cfg > nul
  96. %NDC12%\bin\dcc32.exe /B IndyProtocols120.dpk
  97. if errorlevel 1 goto enderror
  98. REM ************************************************************
  99. REM Compile dclIndyProtocols120 - Round 1
  100. REM ************************************************************
  101. copy dclIndyProtocols120.cfg1 dclIndyProtocols120.cfg > nul
  102. %NDC12%\bin\dcc32.exe /B dclIndyProtocols120.dpk
  103. if errorlevel 1 goto enderror
  104. REM ************************************************************
  105. REM Set all files we want to keep with the R attribute then
  106. REM delete the rest before restoring the attribute
  107. REM ************************************************************
  108. attrib +r Id*.hpp
  109. attrib +r *.bpl
  110. attrib +r Indy*.bpi
  111. attrib +r Indy*.lib
  112. attrib +r indysystem120.res
  113. attrib +r indycore120.res
  114. attrib +r indyprotocols120.res
  115. del /Q /A:-R *.* > nul
  116. attrib -r Id*.hpp
  117. attrib -r *.bpl
  118. attrib -r Indy*.bpi
  119. attrib -r Indy*.lib
  120. attrib -r indysystem120.res
  121. attrib -r indycore120.res
  122. attrib -r indyprotocols120.res
  123. goto endok
  124. :enderror
  125. echo Error!
  126. pause
  127. goto endok
  128. :endnocompiler
  129. echo C++Builder 12 Compiler Not Present!
  130. goto endok
  131. :endok
  132. cd ..\Lib