os2snap.bat 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. @echo off
  2. rem *** $Id$
  3. rem *** Batch file for creating of FPC snapshot for OS/2.
  4. rem *** FPCDIR variable must be set to your base FPC directory and
  5. rem *** must _not_ contain forward slashes (only backslashes allowed).
  6. rem *** Please, note, that you need to have enough space for environment
  7. rem *** variables to run this batch - something like 2 kB should be enough
  8. rem *** unless path to FPC source is long (don't try to run it under Norton
  9. rem *** Commander or similar programs under DOS with COMMAND.COM as shell).
  10. rem *** Your compiler (PPC386.EXE per default) and AS.EXE must be somewhere
  11. rem *** on PATH (unless you set path to them explicitly using FPCTOOLS
  12. rem *** variable, which must end with \ if present). However, be sure which
  13. rem *** version of AS.EXE, etc. gets called if several such files exist.
  14. rem *** One of the following parameters may be specified: rtl, compiler,
  15. rem *** both, cycle and snapshot ("snapshot" being the default), optionally
  16. rem *** followed by parameters "debug" (causing debugging symbols not to be
  17. rem *** stripped from the created compiler), "release" (code optimization,
  18. rem *** debug info stripped out), and "verbose" (compiler messages are
  19. rem *** shown; the same can be accomplished with setting environment
  20. rem *** variable DOVERBOSE to 1). Parameters "debug" and "release" are
  21. rem *** mutually exclusive (the later one is used if both are present).
  22. rem *** Parameter "ppas" forces only PPAS script to be created
  23. rem *** by the compiler and called manually afterwards. This might help
  24. rem *** to resolve LD crashes due to low stack (e.g. under WinXX).
  25. rem *** Parameters _must_ be in lowercase to be recognized correctly,
  26. rem *** unless running under 4dos or compatible (e.g. NDOS).
  27. rem *** Meaning of parameters:
  28. rem *** rtl .......... RTL only, _no_ snapshot created
  29. rem *** compiler ..... compiler only, _no_ snapshot created
  30. rem *** both ......... both RTL and compiler, _no_ snapshot created
  31. rem *** snapshot ..... both RTL and compiler, snapshot _is_ created
  32. rem *** cycle ........ RTL and compiler compiled, the resulting compiler
  33. rem *** is then copied to %FPCTOOLS% (BIN\OS2 by default)
  34. rem *** backing up possible previous version to ppos2.x),
  35. rem *** the whole procedure is started again (RTL is compiled
  36. rem *** with the new compiler version this time) and after
  37. rem *** another cycle (to make sure the new compiler works
  38. rem *** correctly) the snapshot is finally created
  39. rem *** PPC386.EXE is used for the compilation (for the first one only with
  40. rem *** "cycle" option), unless a different compiler name (e.g. PPOS2.EXE)
  41. rem *** is specified in FPCCOMPILER variable. In any case, the compiler should
  42. rem *** reside in the same directory as the other required tools (AS.EXE,
  43. rem *** LD.EXE, etc.).
  44. rem *** Environment variable OTHEROPTS may be used to specify additional
  45. rem *** switches (e.g. setting level of verbosity, etc.).
  46. rem *** Environment variable FPCLOG can specify a file for error logging
  47. rem *** (full path needed). Please, note, that the previous contents of
  48. rem *** file will be overwritten each time the batch file is run.
  49. rem *** Environment variable VERBOSEOPT may be used to specify level of
  50. rem *** verbosity used with "verbose" parameter (-va by default, i.e. show
  51. rem *** everything). Another way would be specifying this in OTHEROPTS
  52. rem *** variable (see above) and not using "verbose" at all.
  53. rem *** Environment variable FPCSNAPPATH may be used to specify path, where
  54. rem *** the compiled files should be placed and possibly the ZIP file
  55. rem *** created.
  56. set FPCERRLOG=%FPCLOG%
  57. if .%FPCERRLOG% == . set FPCERRLOG=CON
  58. if .%FPCERRLOG% == . echo Error: Not enough environment space!!!
  59. if .%FPCERRLOG% == . exit
  60. echo *"Makefile" for OS/2: > %FPCERRLOG%
  61. echo *Setting up environment (possible "Invalid path" messages are OK here) ... >> %FPCERRLOG%
  62. rem Check whether FPCDIR exists
  63. if .%FPCDIR% == . goto ErrorDir
  64. if exist %FPCDIR% goto DirOK
  65. if exist %FPCDIR%\. goto DirOK
  66. if exist %FPCDIR%\makefile goto DirOK
  67. if exist %FPCDIR%\COMPILER\pp.pas goto DirOK
  68. if exist %FPCDIR%\SOURCE\makefile goto DirOK
  69. if exist %FPCDIR%\SOURCE\COMPILER\pp.pas goto DirOK
  70. goto ErrorDir
  71. :DirOK
  72. rem Set path to the source files
  73. if exist %FPCDIR%\SOURCE goto SrcExists
  74. if exist %FPCDIR%\SOURCE\. goto SrcExists
  75. if exist %FPCDIR%\SOURCE\makefile goto SrcExists
  76. if exist %FPCDIR%\SOURCE\COMPILER\pp.pas goto SrcExists
  77. set FPCSRC=%FPCDIR%
  78. goto SnapDir
  79. :SrcExists
  80. set FPCSRC=%FPCDIR%\SOURCE
  81. :SnapDir
  82. set FPCSNAP=%FPCSNAPPATH%
  83. if .%FPCSNAP% == . set FPCSNAP=%FPCSRC%\SNAPSHOT
  84. echo X > %FPCSNAP%\TEST.TMP
  85. if exist %FPCSNAP%\TEST.TMP goto SnapExists
  86. echo *Creating directories for the snapshot ... >> %FPCERRLOG%
  87. mkdir %FPCSNAP% >> %FPCERRLOG%
  88. echo X > %FPCSNAP%\TEST.TMP
  89. if exist %FPCSNAP%\TEST.TMP goto SnapExists
  90. echo *Error: Cannot create the directory %FPCSNAP%!!
  91. goto End
  92. :SnapExists
  93. del %FPCSNAP%\TEST.TMP > nul
  94. echo X > %FPCSNAP%\BIN\TEST.TMP
  95. if exist %FPCSNAP%\BIN\TEST.TMP goto BinExists
  96. echo *Creating directories for the snapshot (binaries) ... >> %FPCERRLOG%
  97. mkdir %FPCSNAP%\BIN >> %FPCERRLOG%
  98. echo X > %FPCSNAP%\BIN\TEST.TMP
  99. if exist %FPCSNAP%\BIN\TEST.TMP goto BinExists
  100. echo *Error: Cannot create the directory %FPCSNAP%\BIN!!
  101. goto End
  102. :BinExists
  103. del %FPCSNAP%\BIN\TEST.TMP > nul
  104. set FPCSNAPBIN=%FPCSNAP%\BIN\OS2
  105. echo X > %FPCSNAPBIN%\TEST.TMP
  106. if exist %FPCSNAPBIN%\TEST.TMP goto BinOS2Exists
  107. echo *Creating directories for the snapshot (binaries for OS/2) ... >> %FPCERRLOG%
  108. mkdir %FPCSNAPBIN% >> %FPCERRLOG%
  109. echo X > %FPCSNAPBIN%\TEST.TMP
  110. if exist %FPCSNAPBIN%\TEST.TMP goto BinOS2Exists
  111. echo *Error: Cannot create the directory %FPCSNAPBIN%!!
  112. goto End
  113. :BinOS2Exists
  114. del %FPCSNAPBIN%\TEST.TMP > nul
  115. set FPCSNAPMSG=%FPCSNAP%\MSG
  116. echo X > %FPCSNAPMSG%\TEST.TMP
  117. if exist %FPCSNAPMSG%\TEST.TMP goto MsgExists
  118. echo *Creating directories for the snapshot (messages) ... >> %FPCERRLOG%
  119. mkdir %FPCSNAPMSG% >> %FPCERRLOG%
  120. echo X > %FPCSNAPMSG%\TEST.TMP
  121. if exist %FPCSNAPMSG%\TEST.TMP goto MsgExists
  122. echo *Error: Cannot create the directory %FPCSNAPMSG%!!
  123. goto End
  124. :MsgExists
  125. del %FPCSNAPMSG%\TEST.TMP > nul
  126. echo X > %FPCSNAP%\UNITS\TEST.TMP
  127. if exist %FPCSNAP%\UNITS\TEST.TMP goto UnitsExists
  128. echo *Creating directories for the snapshot (units) ... >> %FPCERRLOG%
  129. mkdir %FPCSNAP%\UNITS >> %FPCERRLOG%
  130. echo X > %FPCSNAP%\UNITS\TEST.TMP
  131. if exist %FPCSNAP%\UNITS\TEST.TMP goto UnitsExists
  132. echo *Error: Cannot create the directory %FPCSNAP%\UNITS!!
  133. goto End
  134. :UnitsExists
  135. del %FPCSNAP%\UNITS\TEST.TMP > nul
  136. echo X > %FPCSNAP%\UNITS\OS2\TEST.TMP
  137. if exist %FPCSNAP%\UNITS\OS2\TEST.TMP goto UnitsOS2Exists
  138. echo *Creating directories for the snapshot (units for OS/2) ... >> %FPCERRLOG%
  139. mkdir %FPCSNAP%\UNITS\OS2 >> %FPCERRLOG%
  140. echo X > %FPCSNAP%\UNITS\OS2\TEST.TMP
  141. if exist %FPCSNAP%\UNITS\OS2\TEST.TMP goto UnitsOS2Exists
  142. echo *Error: Cannot create the directory %FPCSNAP%\UNITS\OS2!!
  143. goto End
  144. :UnitsOS2Exists
  145. del %FPCSNAP%\UNITS\OS2\TEST.TMP > nul
  146. set FPCSNAPRTL=%FPCSNAP%\UNITS\OS2\RTL
  147. echo X > %FPCSNAPRTL%\TEST.TMP
  148. if exist %FPCSNAPRTL%\TEST.TMP goto OS2RTLExists
  149. echo *Creating directories for the snapshot (units for OS/2 RTL) ... >> %FPCERRLOG%
  150. mkdir %FPCSNAPRTL% >> %FPCERRLOG%
  151. echo X > %FPCSNAPRTL%\TEST.TMP
  152. if exist %FPCSNAPRTL%\TEST.TMP goto OS2RTLExists
  153. echo *Error: Cannot create the directory %FPCSNAPRTL%!!
  154. goto End
  155. :OS2RTLExists
  156. del %FPCSNAPRTL%\TEST.TMP > nul
  157. set FPCSNAPDOC=%FPCSNAP%\DOC
  158. echo X > %FPCSNAPDOC%\TEST.TMP
  159. if exist %FPCSNAPDOC%\TEST.TMP goto SetOpts
  160. echo *Creating directories for the snapshot (documentation) ... >> %FPCERRLOG%
  161. mkdir %FPCSNAPDOC% >> %FPCERRLOG%
  162. echo X > %FPCSNAPDOC%\TEST.TMP
  163. if exist %FPCSNAPDOC%\TEST.TMP goto SetOpts
  164. echo *Error: Cannot create the directory %FPCSNAPDOC%!!
  165. goto End
  166. :SetOpts
  167. del %FPCSNAPDOC%\TEST.TMP > nul
  168. rem Path to file with options
  169. set OS2OPTF=%FPCSRC%\OS2SNAP.OPT
  170. rem Path for the OS/2 RTL
  171. set OS2RTL=%FPCSRC%\RTL\OS2
  172. rem Path for OS/2 RTL parts compiled from common sources
  173. set OS2RTLC=%FPCSRC%\RTL\INC
  174. rem Path for OS/2 RTL parts compiled from processor dependent sources
  175. set OS2RTLP=%FPCSRC%\RTL\I386
  176. rem Path for OS/2 RTL parts for Object Pascal extensions
  177. set OS2RTLO=%FPCSRC%\RTL\OBJPAS
  178. rem Path to the compiler source
  179. set COMPSPATH=%FPCSRC%\COMPILER
  180. rem Option to skip the default configuration file
  181. set SKIPCFG=-n
  182. rem Common options for OS/2 target
  183. set OS2OPT1=-TOS2
  184. set OS2OPT2=-dGDB
  185. set OS2OPT3=-dI386
  186. set OS2OPT4=-Sg
  187. rem "Release" options (optimizations, strip debug symbols)
  188. set RELEASEOPT1=-Og2p1
  189. set RELEASEOPT2=-Xs
  190. rem "Debug" options (add debug symbols, do all code generation checks)
  191. set DEBUGOPT1=-g
  192. set DEBUGOPT2=-Crtoi
  193. rem "Verbose" options
  194. if .%VERBOSEOPT% == . set VERBOSEOPT=-va
  195. set DOVERBOSE=
  196. rem Place for debug or release options, empty by default
  197. set CURRENTOPT1=
  198. set CURRENTOPT2=
  199. rem Stack size for the compiler
  200. rem set STACKOPT=-Cs64500
  201. set STACKOPT=-Cs256000
  202. rem Path to object files
  203. set OS2OBJP=-Fo%OS2RTL%
  204. rem Path to units
  205. set OS2UNITP=-Fu%FPCSNAPRTL%
  206. rem Path to compiler units
  207. set COMPUNITP=-Fu%COMPSPATH%;%COMPSPATH%\i386;%COMPSPATH%\targets
  208. rem Path to compiler include files
  209. set COMPINCP=-Fi%COMPSPATH%;%COMPSPATH%\i386
  210. rem Path to compiler object files
  211. set COMPOBJP=-Fo%COMPSPATH%
  212. rem Target path for RTL units
  213. set OS2UNITT=-FU%FPCSNAPRTL%
  214. rem Fake target path for executables for RTL compilation (path for PPAS)
  215. set OS2UNITE=-FE%FPCSNAPRTL%
  216. rem Target path for executables
  217. set OS2EXET=-FE%FPCSNAPBIN%
  218. rem Path to include files
  219. set OS2INCP=-Fi%OS2RTL%;%OS2RTLC%;%OS2RTLO%;%OS2RTLP%
  220. rem PPAS step disabled by default
  221. set FORCEPPAS=
  222. rem Name of the PPAS script
  223. set PPASNAME=PPAS.BAT
  224. rem Default compiler for the first compilation
  225. set CYCLE=0
  226. if not .%CYCLE% == .0 goto EnvErr
  227. set COMPILER=%FPCCOMPILER%
  228. if not .%COMPILER% == .%FPCCOMPILER% goto EnvErr
  229. if .%FPCCOMPILER% == . goto SetCompiler
  230. goto PrgFound
  231. :SetCompiler
  232. set COMPILER=PPC386.EXE
  233. if not .%COMPILER% == .PPC386.EXE goto EnvErr
  234. :PrgFound
  235. echo *Searching for tools ... >> %FPCERRLOG%
  236. set REALTOOLS=%FPCTOOLS%
  237. if %FPCTOOLS%. == . goto SetupTools
  238. goto ToolsOK
  239. :SetupTools
  240. if exist %FPCDIR%\BIN\OS2\%COMPILER% goto Tools1
  241. if exist %FPCDIR%\BIN\OS2\%COMPILER%.EXE goto Tools1
  242. goto NoTools1
  243. :Tools1
  244. if exist %FPCDIR%\BIN\OS2\AS.EXE goto Tools1OK
  245. echo *Warning: %COMPILER% found, but AS.EXE isn't in the same directory! >> %FPCERRLOG%
  246. goto NoTools1
  247. :Tools1OK
  248. set REALTOOLS=%FPCDIR%\BIN\OS2\
  249. goto ToolsOK
  250. :NoTools1
  251. if exist %FPCDIR%\BIN\%COMPILER% goto Tools2
  252. if exist %FPCDIR%\BIN\%COMPILER%.EXE goto Tools2
  253. goto NoTools2
  254. :Tools2
  255. if exist %FPCDIR%\BIN\AS.EXE goto Tools2OK
  256. echo *Warning: %COMPILER% found, but AS.EXE isn't in the same directory! >> %FPCERRLOG%
  257. goto NoTools2
  258. :Tools2OK
  259. set REALTOOLS=%FPCDIR%\BIN\
  260. goto ToolsOK
  261. :NoTools2
  262. echo *Warning: Cannot locate your %COMPILER% and AS.EXE, make sure they're on PATH! >> %FPCERRLOG%
  263. :ToolsOK
  264. echo *Checking parameters >> %FPCERRLOG%
  265. set PARAMS=%1
  266. if .%PARAMS% == . set PARAMS=snapshot
  267. if not %@EVAL[0] == 0 goto ParLoop
  268. set PARAMS=%@LOWER[%PARAMS%]
  269. :ParLoop
  270. shift
  271. if %1. == . goto NoPars
  272. if %@EVAL[0] == 0 goto Shl1
  273. if %1 == debug set CURRENTOPT1=%DEBUGOPT1%
  274. if %1 == debug set CURRENTOPT2=%DEBUGOPT2%
  275. if %1 == release set CURRENTOPT1=%RELEASEOPT1%
  276. if %1 == release set CURRENTOPT2=%RELEASEOPT2%
  277. if %1 == verbose set DOVERBOSE=1
  278. if %1 == ppas set FORCEPPAS=1
  279. goto ParLoop
  280. :Shl1
  281. if %@LOWER[%1] == debug set CURRENTOPT1=%DEBUGOPT1%
  282. if %@LOWER[%1] == debug set CURRENTOPT2=%DEBUGOPT2%
  283. if %@LOWER[%1] == release set CURRENTOPT1=%RELEASEOPT1%
  284. if %@LOWER[%1] == release set CURRENTOPT2=%RELEASEOPT2%
  285. if %@LOWER[%1] == verbose set DOVERBOSE=1
  286. if %@LOWER[%1] == ppas set FORCEPPAS=1
  287. goto ParLoop
  288. :NoPars
  289. if %PARAMS% == clean goto CleanRTL
  290. if %PARAMS% == both goto CleanRTL
  291. if %PARAMS% == snapshot goto CleanRTL
  292. if %PARAMS% == rtl goto CleanRTL
  293. if %PARAMS% == cycle goto CleanRTL
  294. if %PARAMS% == compiler goto CleanCompiler
  295. echo *Error: Unknown parameter - %PARAMS% >> %FPCERRLOG%
  296. goto End
  297. :CleanRTL
  298. if %@EVAL[0] == 0 goto JPCleanRTL
  299. echo *Cleaning up the RTL (error messages are OK here) ... >> %FPCERRLOG%
  300. del %OS2OPTF% >> %FPCERRLOG%
  301. del %OS2RTL%\*.ppo >> %FPCERRLOG%
  302. del %OS2RTL%\*.oo2 >> %FPCERRLOG%
  303. del %OS2RTL%\ppas.bat >> %FPCERRLOG%
  304. del %OS2RTL%\ppas.cmd >> %FPCERRLOG%
  305. del %OS2RTL%\link.res >> %FPCERRLOG%
  306. del %FPCSNAPRTL%\*.ppo >> %FPCERRLOG%
  307. del %FPCSNAPRTL%\*.oo2 >> %FPCERRLOG%
  308. del %FPCSNAPRTL%\ppas.bat >> %FPCERRLOG%
  309. del %FPCSNAPRTL%\ppas.cmd >> %FPCERRLOG%
  310. del %FPCSNAPRTL%\link.res >> %FPCERRLOG%
  311. goto ContClRTL
  312. :JPCleanRTL
  313. echo *Cleaning up the RTL ... >> %FPCERRLOG%
  314. del %OS2OPTF% >& nul >> %FPCERRLOG%
  315. del %OS2RTL%\*.ppo >& nul >> %FPCERRLOG%
  316. del %OS2RTL%\*.oo2 >& nul >> %FPCERRLOG%
  317. del %OS2RTL%\ppas.bat >& nul >> %FPCERRLOG%
  318. del %OS2RTL%\ppas.cmd >& nul >> %FPCERRLOG%
  319. del %OS2RTL%\link.res >& nul >> %FPCERRLOG%
  320. del %FPCSNAPRTL%\*.ppo >& nul >> %FPCERRLOG%
  321. del %FPCSNAPRTL%\*.oo2 >& nul >> %FPCERRLOG%
  322. del %FPCSNAPRTL%\ppas.bat >& nul >> %FPCERRLOG%
  323. del %FPCSNAPRTL%\ppas.cmd >& nul >> %FPCERRLOG%
  324. del %FPCSNAPRTL%\link.res >& nul >> %FPCERRLOG%
  325. :ContClRTL
  326. if %PARAMS% == rtl goto Branches
  327. :CleanCompiler
  328. if %@EVAL[0] == 0 goto JPCleanComp
  329. echo *Cleaning up the compiler (error messages are OK here) ... >> %FPCERRLOG%
  330. del %OS2OPTF% >> %FPCERRLOG%
  331. del %COMPSPATH%\*.ppo >> %FPCERRLOG%
  332. del %COMPSPATH%\*.oo2 >> %FPCERRLOG%
  333. del %COMPSPATH%\pp >> %FPCERRLOG%
  334. del %COMPSPATH%\pp.exe >> %FPCERRLOG%
  335. del %COMPSPATH%\ppos2.exe >> %FPCERRLOG%
  336. del %COMPSPATH%\ppas.bat >> %FPCERRLOG%
  337. del %COMPSPATH%\ppas.cmd >> %FPCERRLOG%
  338. del %COMPSPATH%\link.res >> %FPCERRLOG%
  339. del %FPCSNAPBIN%\*.ppo >> %FPCERRLOG%
  340. del %FPCSNAPBIN%\*.oo2 >> %FPCERRLOG%
  341. del %FPCSNAPBIN%\pp >> %FPCERRLOG%
  342. del %FPCSNAPBIN%\pp.exe >> %FPCERRLOG%
  343. del %FPCSNAPBIN%\ppos2.exe >> %FPCERRLOG%
  344. del %FPCSNAPBIN%\ppas.bat >> %FPCERRLOG%
  345. del %FPCSNAPBIN%\ppas.cmd >> %FPCERRLOG%
  346. del %FPCSNAPBIN%\link.res >> %FPCERRLOG%
  347. goto ContClComp
  348. :JPCleanComp
  349. echo *Cleaning up the compiler ... >> %FPCERRLOG%
  350. del %OS2OPTF% >& nul >> %FPCERRLOG%
  351. del %COMPSPATH%\*.ppo >& nul >> %FPCERRLOG%
  352. del %COMPSPATH%\*.oo2 >& nul >> %FPCERRLOG%
  353. del %COMPSPATH%\pp >& nul >> %FPCERRLOG%
  354. del %COMPSPATH%\pp.exe >& nul >> %FPCERRLOG%
  355. del %COMPSPATH%\ppos2.exe >& nul >> %FPCERRLOG%
  356. del %COMPSPATH%\ppas.bat >& nul >> %FPCERRLOG%
  357. del %COMPSPATH%\ppas.cmd >& nul >> %FPCERRLOG%
  358. del %COMPSPATH%\link.res >& nul >> %FPCERRLOG%
  359. del %FPCSNAPBIN%\*.ppo >& nul >> %FPCERRLOG%
  360. del %FPCSNAPBIN%\*.oo2 >& nul >> %FPCERRLOG%
  361. del %FPCSNAPBIN%\pp >& nul >> %FPCERRLOG%
  362. del %FPCSNAPBIN%\pp.exe >& nul >> %FPCERRLOG%
  363. del %FPCSNAPBIN%\ppos2.exe >& nul >> %FPCERRLOG%
  364. del %FPCSNAPBIN%\ppas.bat >& nul >> %FPCERRLOG%
  365. del %FPCSNAPBIN%\ppas.cmd >& nul >> %FPCERRLOG%
  366. del %FPCSNAPBIN%\link.res >& nul >> %FPCERRLOG%
  367. :ContClComp
  368. if %PARAMS% == compiler goto Branches
  369. if %PARAMS% == both goto Branches
  370. :CleanSnapshot
  371. if %@EVAL[0] == 0 goto JPCleanSnap
  372. echo *Deleting the old snapshot (error messages are OK here) ... >> %FPCERRLOG%
  373. del %FPCSNAPDOC%\*.txt >> %FPCERRLOG%
  374. del %FPCSNAPDOC%\*.htm* >> %FPCERRLOG%
  375. del %FPCSNAPDOC%\copying.* >> %FPCERRLOG%
  376. del %FPCSNAPMSG%\*.msg >> %FPCERRLOG%
  377. del %FPCSNAP%\baseemx.zip >> %FPCERRLOG%
  378. goto ContClSnap
  379. :JPCleanSnap
  380. echo *Deleting the old snapshot ... >> %FPCERRLOG%
  381. del %FPCSNAP%\baseemx.zip >& nul >> %FPCERRLOG%
  382. del %FPCSNAPDOC%\*.txt >& nul >> %FPCERRLOG%
  383. del %FPCSNAPDOC%\*.htm* >& nul >> %FPCERRLOG%
  384. del %FPCSNAPDOC%\copying.* >& nul >> %FPCERRLOG%
  385. del %FPCSNAPMSG%\*.msg >& nul >> %FPCERRLOG%
  386. :ContClSnap
  387. if %PARAMS% == clean goto End
  388. :Branches
  389. if %PARAMS% == both goto RTL1
  390. if %PARAMS% == snapshot goto RTL1
  391. if %PARAMS% == compiler goto Compiler
  392. if %PARAMS% == rtl goto RTL1
  393. if %PARAMS% == cycle goto RTL1
  394. echo *Error: Unknown parameter - %PARAMS% >> %FPCERRLOG%
  395. goto End
  396. :RTL1
  397. echo *Creating file with all the needed options and paths for RTL ... >> %FPCERRLOG%
  398. echo %SKIPCFG% > %OS2OPTF%
  399. echo %OS2OPT1% >> %OS2OPTF%
  400. echo %OS2OPT2% >> %OS2OPTF%
  401. echo %OS2OPT3% >> %OS2OPTF%
  402. echo %OS2OPT4% >> %OS2OPTF%
  403. echo %OS2OBJP% >> %OS2OPTF%
  404. echo %OS2UNITP% >> %OS2OPTF%
  405. echo %OS2INCP% >> %OS2OPTF%
  406. echo %OS2UNITT% >> %OS2OPTF%
  407. echo %OS2UNITE% >> %OS2OPTF%
  408. echo -FD%REALTOOLS% >> %OS2OPTF%
  409. if not .%CURRENTOPT1% == . echo %CURRENTOPT1% >> %OS2OPTF%
  410. if not .%CURRENTOPT2% == . echo %CURRENTOPT2% >> %OS2OPTF%
  411. if not .%FPCLOG% == . echo -Fe%FPCERRLOG% >> %OS2OPTF%
  412. if not .%FORCEPPAS% == . echo -a >> %OS2OPTF%
  413. if not .%FORCEPPAS% == . echo -s >> %OS2OPTF%
  414. if .%DOVERBOSE% == .1 echo %VERBOSEOPT% >> %OS2OPTF%
  415. if not .%DOVERBOSE% == .1 goto CompS1
  416. echo *Start of basic options used for compilation >> %FPCERRLOG%
  417. type %OS2OPTF% >> %FPCERRLOG%
  418. echo *End of basic options used for compilation >> %FPCERRLOG%
  419. if not .%OTHEROPTS% == . echo *User specified options: %OTHEROPTS% >> %FPCERRLOG%
  420. :CompS1
  421. echo *Assembling the helpers ... >> %FPCERRLOG%
  422. %REALTOOLS%\as -o %FPCSNAPRTL%\prt0.oo2 %OS2RTL%\prt0.as >> %FPCERRLOG%
  423. %REALTOOLS%\as -o %FPCSNAPRTL%\prt1.oo2 %OS2RTL%\prt1.as >> %FPCERRLOG%
  424. %REALTOOLS%\as -o %FPCSNAPRTL%\code2.oo2 %OS2RTL%\code2.as >> %FPCERRLOG%
  425. %REALTOOLS%\as -o %FPCSNAPRTL%\code3.oo2 %OS2RTL%\code3.as >> %FPCERRLOG%
  426. echo *Compiling the system unit ... >> %FPCERRLOG%
  427. %REALTOOLS%%COMPILER% @%OS2OPTF% -Us %OTHEROPTS% %OS2RTL%\SYSOS2.PAS
  428. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  429. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  430. echo *Compiling unit ObjPas ... >> %FPCERRLOG%
  431. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\OBJPAS.PP
  432. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  433. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  434. echo *Compiling unit Objects ... >> %FPCERRLOG%
  435. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\OBJECTS.PP
  436. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  437. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  438. echo *Compiling unit Strings ... >> %FPCERRLOG%
  439. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\STRINGS.PP
  440. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  441. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  442. echo *Compiling unit HeapTrace ... >> %FPCERRLOG%
  443. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\HEAPTRC.PP
  444. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  445. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  446. echo *Compiling unit DosCalls ... >> %FPCERRLOG%
  447. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DOSCALLS.PAS
  448. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  449. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  450. echo *Compiling unit DOS ... >> %FPCERRLOG%
  451. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DOS.PAS
  452. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  453. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  454. echo *Compiling unit CPU ... >> %FPCERRLOG%
  455. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLP%\CPU.PP
  456. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  457. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  458. echo *Compiling unit MMX ... >> %FPCERRLOG%
  459. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLP%\MMX.PP
  460. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  461. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  462. echo *Compiling unit SysUtils ... >> %FPCERRLOG%
  463. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\SYSUTILS.PP
  464. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  465. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  466. echo *Compiling unit TypInfo ... >> %FPCERRLOG%
  467. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\TYPINFO.PP
  468. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  469. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  470. echo *Compiling unit CRT ... >> %FPCERRLOG%
  471. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\CRT.PAS
  472. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  473. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  474. echo *Compiling unit Printer ... >> %FPCERRLOG%
  475. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PRINTER.PAS
  476. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  477. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  478. echo *Compiling unit Math ... >> %FPCERRLOG%
  479. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLO%\MATH.PP
  480. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  481. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  482. echo *Compiling unit UComplex ... >> %FPCERRLOG%
  483. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\UCOMPLEX.PP
  484. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  485. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  486. echo *Compiling unit GetOpts ... >> %FPCERRLOG%
  487. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\GETOPTS.PP
  488. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  489. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  490. echo *Compiling unit LineInfo ... >> %FPCERRLOG%
  491. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTLC%\LINEINFO.PP
  492. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  493. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  494. echo *Compiling unit KbdCalls ... >> %FPCERRLOG%
  495. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\KBDCALLS.PAS
  496. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  497. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  498. echo *Compiling unit MouCalls ... >> %FPCERRLOG%
  499. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MOUCALLS.PAS
  500. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  501. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  502. echo *Compiling unit VioCalls ... >> %FPCERRLOG%
  503. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\VIOCALLS.PAS
  504. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  505. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  506. echo *Compiling unit MonCalls ... >> %FPCERRLOG%
  507. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MONCALLS.PAS
  508. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  509. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  510. echo *Compiling unit Ports ... >> %FPCERRLOG%
  511. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PORTS.PAS
  512. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  513. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  514. echo *Compiling PM units ... >> %FPCERRLOG%
  515. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\OS2DEF.PAS
  516. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMWIN.PAS
  517. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  518. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  519. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMBITMAP.PAS
  520. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  521. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  522. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\PMGPI.PAS
  523. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  524. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  525. echo *Compiling MMOS2 units ... >> %FPCERRLOG%
  526. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\DIVE.PAS
  527. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  528. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  529. echo *Compiling API unts ... >> %FPCERRLOG%
  530. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\MOUSE.PP
  531. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  532. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  533. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\KEYBOARD.PP
  534. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  535. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  536. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %OS2RTL%\VIDEO.PP
  537. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  538. if .%FORCEPPAS% == .1 call %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  539. if .%FORCEPPAS% == .1 echo * Deleting the PPAS script >> %FPCERRLOG%
  540. if .%FORCEPPAS% == .1 del %FPCSNAPRTL%\%PPASNAME% >> %FPCERRLOG%
  541. if %PARAMS% == rtl goto End
  542. :Compiler
  543. echo *Creating file with all the needed options and paths for the compiler ... >> %FPCERRLOG%
  544. echo %SKIPCFG% > %OS2OPTF%
  545. echo %OS2OPT1% >> %OS2OPTF%
  546. echo %OS2OPT2% >> %OS2OPTF%
  547. echo %OS2OPT3% >> %OS2OPTF%
  548. echo %OS2OPT4% >> %OS2OPTF%
  549. echo %OS2OBJP% >> %OS2OPTF%
  550. echo %OS2UNITP% >> %OS2OPTF%
  551. echo -FD%REALTOOLS% >> %OS2OPTF%
  552. echo %COMPUNITP% >> %OS2OPTF%
  553. echo %COMPINCP% >> %OS2OPTF%
  554. echo %COMPOBJP% >> %OS2OPTF%
  555. echo %STACKOPT% >> %OS2OPTF%
  556. echo %OS2EXET% >> %OS2OPTF%
  557. if not .%CURRENTOPT1% == . echo %CURRENTOPT1% >> %OS2OPTF%
  558. if not .%CURRENTOPT2% == . echo %CURRENTOPT2% >> %OS2OPTF%
  559. if not .%FPCLOG% == . echo -Fe%FPCERRLOG% >> %OS2OPTF%
  560. if not .%FORCEPPAS% == . echo -a >> %OS2OPTF%
  561. if not .%FORCEPPAS% == . echo -s >> %OS2OPTF%
  562. if .%DOVERBOSE% == .1 echo %VERBOSEOPT% >> %OS2OPTF%
  563. if not .%DOVERBOSE% == .1 goto CompS2
  564. echo *Start of basic options used for compilation >> %FPCERRLOG%
  565. type %OS2OPTF% >> %FPCERRLOG%
  566. echo *End of basic options used for compilation >> %FPCERRLOG%
  567. if not .%OTHEROPTS% == . echo *User specified options: %OTHEROPTS% >> %FPCERRLOG%
  568. :CompS2
  569. echo *Compiling the compiler ... >> %FPCERRLOG%
  570. %REALTOOLS%%COMPILER% @%OS2OPTF% %OTHEROPTS% %COMPSPATH%\PP.PAS
  571. if .%FORCEPPAS% == .1 echo *Calling the PPAS script >> %FPCERRLOG%
  572. if .%FORCEPPAS% == .1 call %FPCSNAPBIN%\%PPASNAME% >> %FPCERRLOG%
  573. if .%FORCEPPAS% == .1 echo * Deleting the PPAS script >> %FPCERRLOG%
  574. if .%FORCEPPAS% == .1 del %FPCSNAPBIN%\%PPASNAME% >> %FPCERRLOG%
  575. if .%FORCEPPAS% == .1 del %FPCSNAPBIN%\link.res >> %FPCERRLOG%
  576. :Comp2
  577. ren %FPCSNAPBIN%\pp.exe ppos2.exe >> %FPCERRLOG%
  578. if exist %FPCSNAPBIN%\ppos2.exe goto OKCompiler
  579. if not exist %FPCSNAPBIN%\pp goto C2Cont
  580. if exist %FPCSNAPBIN%\ppas.bat goto PPasBat
  581. if exist %FPCSNAPBIN%\ppas.cmd goto PPasCmd
  582. :C2Cont
  583. echo *Error: The compiler wasn't compiled!! >> %FPCERRLOG%
  584. goto End
  585. :PPasCmd
  586. ren %FPCSNAPBIN%\ppas.cmd ppas.bat >> %FPCERRLOG%
  587. :PPasBat
  588. echo *Automatic binding failed, trying again ... >> %FPCERRLOG%
  589. call %FPCSNAPBIN%\ppas.bat
  590. del %FPCSNAPBIN%\ppas.bat >> %FPCERRLOG%
  591. goto Comp2
  592. :OKCompiler
  593. if %PARAMS% == compiler goto End
  594. if %PARAMS% == both goto End
  595. if %PARAMS% == cycle goto Cycle
  596. goto CopyFiles
  597. :Cycle
  598. rem Another loop?
  599. if %CYCLE% == 2 goto CopyFiles
  600. echo *Backing up previous compiler version to ppos2.%CYCLE% ... >> %FPCERRLOG%
  601. copy %REALTOOLS%ppos2.exe %REALTOOLS%ppos2.%CYCLE% >> %FPCERRLOG%
  602. echo *Copying the newly created compiler to %REALTOOLS% ... >> %FPCERRLOG%
  603. copy %FPCSNAPBIN%\ppos2.exe %REALTOOLS%. >> %FPCERRLOG%
  604. if %CYCLE% == 1 goto Cycle2
  605. set COMPILER=PPOS2.EXE
  606. set CYCLE=1
  607. goto NoPars
  608. :Cycle2
  609. set CYCLE=2
  610. goto NoPars
  611. :CopyFiles
  612. set FPCSNAPTXT=%FPCSNAPDOC%\snapshot.txt
  613. echo *Copying the documentation ... >> %FPCERRLOG%
  614. copy %FPCSRC%\INSTALL\DOC\*.txt %FPCSNAPDOC% >> %FPCERRLOG%
  615. copy %FPCSRC%\INSTALL\DOC\*.htm* %FPCSNAPDOC% >> %FPCERRLOG%
  616. copy %FPCSRC%\INSTALL\DOC\copying.* %FPCSNAPDOC% >> %FPCERRLOG%
  617. echo *Creating the snapshot readme file ... >> %FPCERRLOG%
  618. echo This is a FPC snapshot for OS/2. It contains compilation of the most current >> %FPCSNAPTXT%
  619. echo developers' sources as of time of its creation. It contains the latest fixes >> %FPCSNAPTXT%
  620. echo but might contain some new bugs as well, since it's less tested than regular >> %FPCSNAPTXT%
  621. echo releases. Please, send your error reports to [email protected] >> %FPCSNAPTXT%
  622. echo mailing list (and don't forget to mention the fact you're not subscribed to >> %FPCSNAPTXT%
  623. echo the list in your e-mail, if it's the case). >> %FPCSNAPTXT%
  624. echo The snapshot has the same structure as the release ZIP files, so it may be >> %FPCSNAPTXT%
  625. echo installed using the normal installer (INSTALL.EXE and INSTALL.DAT must be >> %FPCSNAPTXT%
  626. echo in the same directory) or directly unzipped into your FPC tree. >> %FPCSNAPTXT%
  627. echo *Copying the message files ... >> %FPCERRLOG%
  628. copy %COMPSPATH%\msg\*.msg %FPCSNAPMSG% >> %FPCERRLOG%
  629. if %@EVAL[0] == 0 goto Pack
  630. echo *Warning: Packing in this environment might fail. >> %FPCERRLOG%
  631. echo *You should press Ctrl-Break now if the current drive is different from that >> %FPCERRLOG%
  632. echo *of %FPCSNAP%; otherwise press any key to continue. >> %FPCERRLOG%
  633. if not %FPCERRLOG% == CON echo *Warning: Packing in this environment might fail.
  634. if not %FPCERRLOG% == CON echo *You should press Ctrl-Break now if the current drive is different from that
  635. if not %FPCERRLOG% == CON echo *of %FPCDIR%; otherwise press any key to continue.
  636. pause>nul
  637. cd %FPCSNAP%
  638. :Pack
  639. echo *Packing the snapshot ... >> %FPCERRLOG%
  640. if %@EVAL[0] == 0 goto SHL2
  641. goto Cmd2
  642. :Shl2
  643. pushd
  644. cdd %FPCSNAP%
  645. :Cmd2
  646. rem ZIP.EXE must be on the PATH
  647. zip -9 -r baseemx.zip bin\os2\ppos2.exe doc\*.* msg\*.* units\os2\rtl\*.ppo units\os2\rtl\*.oo2 units\os2\rtl\*.ao2 >> %FPCERRLOG%
  648. if exist baseemx.zip goto ZipOK
  649. echo *Error: The ZIP file hasn't been created!! >> %FPCERRLOG%
  650. :ZipOK
  651. if %@EVAL[0] == 0 popd
  652. echo *Done. >> %FPCERRLOG%
  653. goto End
  654. :ErrorDir
  655. echo *Error: Environment variable FPCDIR must point to your base FPC directory!!! >> %FPCERRLOG%
  656. goto End
  657. :EnvErr
  658. echo *Error: Not enough environment space!!! >> %FPCERRLOG%
  659. goto End
  660. $Log$
  661. Revision 1.6 2001-06-28 21:09:43 peter
  662. * latest versions from 1.0.5 branch
  663. Revision 1.1.2.1 2001/05/15 18:41:00 carl
  664. * updated to work with FPC v1.0.x
  665. Revision 1.1 2000/07/14 10:09:29 michael
  666. + Moved from base
  667. Revision 1.1 2000/07/13 06:31:26 michael
  668. + Initial import
  669. Revision 1.18 2000/06/26 17:31:12 hajny
  670. * workaround for MS command shell limitation
  671. Revision 1.17 2000/05/21 16:09:42 hajny
  672. * os2def.pas added
  673. Revision 1.16 2000/05/14 16:46:09 hajny
  674. * cmd.exe compatibility problem fixed
  675. Revision 1.15 2000/04/03 17:42:46 hajny
  676. + LineInfo added
  677. Revision 1.14 2000/03/28 19:30:49 hajny
  678. * another change of order
  679. Revision 1.13 2000/03/16 19:43:36 hajny
  680. * fix for COMMAND.COM, order, etc.
  681. Revision 1.12 2000/03/12 18:29:40 hajny
  682. * wrong order corrected
  683. Revision 1.11 2000/03/12 13:37:24 hajny
  684. * support for calling PPAS script, compiler stack increased
  685. Revision 1.10 2000/03/06 17:38:39 hajny
  686. * little omission (ZIP parameters)
  687. Revision 1.9 2000/03/05 19:13:25 hajny
  688. * new snapshot structure
  689. Revision 1.8 2000/01/29 16:24:01 hajny
  690. * logging enhanced, verbose support, error for non-4dos fixed
  691. Revision 1.7 2000/01/26 22:34:36 hajny
  692. * support for error logging added
  693. Revision 1.6 2000/01/16 18:44:21 hajny
  694. * got rid of PPC386.CFG dependency
  695. Revision 1.3 1999/10/01 09:00:21 hajny
  696. + PMGPI and DIVE added
  697. Revision 1.2 1999/09/15 07:31:49 hajny
  698. + some units added, OTHEROPTS variable support
  699. :End