os2snap.bat 31 KB

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