home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / CSAPE32.ARJ / INSTALL.BAT
Encoding:
DOS Batch File  |  1990-12-31  |  9.7 KB  |  336 lines

  1. @echo off
  2. rem install.bat
  3. rem C-scape library installation batch file - By Ted 9/27/90
  4. rem 
  5. rem C-scape 3.2
  6. rem Copyright (c) 1986-1989, by Oakland Group, Inc.
  7. rem ALL RIGHTS RESERVED.
  8. rem 
  9. rem Revision History:
  10. rem -----------------
  11. rem 11/06/90 mla   killed point 1, added argument instructions, changed example
  12. rem 11/07/90 mla   added error handling
  13. rem 11/08/90 ted   tweaked docs and backslash positions.
  14. rem 11/10/90 ted   added section to support the 5-disk 3.5" disk set.
  15. rem 12/17/90 mla   added \'s to instances of %1cscape..., %2cscape...
  16. rem 12/31/90 jmd   removed incorrect instruction to put '\' at end of command line
  17.  
  18. if %2x==x goto banner
  19. if %1==call2 goto call2start
  20. goto start1
  21. :banner
  22.  
  23. echo . INSTALLATION BATCH FILE FOR CSCAPE 3.2 - INSTRUCTIONS:
  24. echo . 1) Change to the drive and directory with the C-scape distribution files.
  25. echo .      (Normally drive A: with C-scape disk 1 in it.)
  26. echo . 2) Enter the INSTALL command with options as follows:
  27. echo .
  28. echo . The first parameter specifies the drive and directory below which you wish to
  29. echo . install the C-scape directory (Normally C:).
  30. echo .
  31. echo . The second parameter is a code for which version of C-scape to install:
  32. echo .   C-scape for Microsoft C 5.1       :  M51
  33. echo .   C-scape for Microsoft C 6         :  M6
  34. echo .   C-scape for Borland Turbo C 2.0   :  TC2
  35. echo .   C-scape for Borland Turbo C++ 1.0 :  TCPP
  36. echo .   C-scape for Zortech C++ 2.0       :  ZCPP
  37. echo .
  38. echo . Use 'LIBS' as the third argument if you have already installed a version of
  39. echo . C-scape and want to install only the libraries for another version without
  40. echo . re-installing the source code and examples.
  41. echo .
  42. echo . USAGE EXAMPLES:
  43. echo . To install Microsoft C 6 version in drive C:, directory \CSCAPE :
  44. echo .   INSTALL C: M6
  45. echo . To install Turbo C 2.0 version libraries only in G:\TOOLS\CSCAPE :
  46. echo .   INSTALL G:\TOOLS TC2 LIBS
  47.  
  48. goto end
  49.  
  50. :start1
  51.  
  52. if %3x==x goto start2
  53. if %3==libs goto libinstall
  54. if %3==LIBS goto libinstall
  55.  
  56. :start2
  57.  
  58. echo :
  59. echo . About to install C-scape documents in     %1\cscape
  60. echo . About to install C-scape headers in       %1\cscape\include
  61. echo . About to install C-scape examples in      %1\cscape\examples
  62. echo . About to install field function source in %1\cscape\source
  63. pause
  64.  
  65. rem Create directory to put the C-scape files into.
  66. md %1\cscape
  67.  
  68. rem Copy the non-zipped documents to the destination drive.
  69. copy read.me %1\cscape >nul
  70. copy *.txt   %1\cscape >nul
  71.  
  72. rem Execute the self-unzipping C-scape files w/ output to the destination drive.
  73. cshead      -d %1\cscape\include
  74. owlhead     -d %1\cscape\include
  75. example     -d %1\cscape\examples
  76. funcs       -d %1\cscape\source
  77.  
  78. echo :
  79. echo . Installed C-scape documents in             %1\cscape
  80. echo . Installed C-scape headers in               %1\cscape\include
  81. echo . Installed C-scape examples in              %1\cscape\examples
  82. echo . Installed C-scape field function source in %1\cscape\source
  83. echo :
  84.  
  85. :libinstall
  86.  
  87. echo : --------------------------------------------------------------------
  88. echo :
  89. echo . About to install C-scape %2 libraries in %1\cscape\lib
  90.  
  91. rem  NOTE: In order to be able to swap floppies when this batch file is only on
  92. rem    Disk1, this batch file copies itself to the destination drive and then
  93. rem    invokes that version of itself with "call2" inserted as the new first
  94. rem    parameter. That way it can continue to execute when disk1 is removed.
  95.  
  96. copy install.bat %1\cscape >nul
  97. %1\cscape\install.bat call2 %1 %2 %3
  98. goto end
  99.  
  100. :call2start
  101. rem NOTE: This is now the second invocation of this batch file and all
  102. rem       parameters are numbered 1 higher.
  103.  
  104. rem -----------------------------------------------------------------------
  105. rem First, decide which compiler's libs to install
  106. rem -----------------------------------------------------------------------
  107. rem NOTE: the following library installation works for either the 3-disk
  108. rem       set of 5 1/4" disks or the 5-disk set of 3 1/2" disks.  It depends
  109. rem       on the fact that disk 1 of the 3-disk set contains the Zortech libs
  110. rem       and disk1 of the 5-disk set doesn't.
  111.  
  112. if NOT EXIST z2lcscap.exe goto 5set
  113. rem -----------------------------------------------------------------------
  114. rem The 3-disk 5 1/4" set
  115. rem -----------------------------------------------------------------------
  116.  
  117. if %3==tc2 goto tc20
  118. if %3==TC2 goto tc20
  119.  
  120. if %3==tcpp goto tcp1
  121. if %3==TCPP goto tcp1
  122.  
  123. if %3==m51 goto ms51
  124. if %3==M51 goto ms51
  125.  
  126. if %3==m6 goto ms6
  127. if %3==M6 goto ms6
  128.  
  129. if %3==zcpp goto zcp2
  130. if %3==ZCPP goto zcp2
  131.  
  132. echo :
  133. echo . Unrecognized C-scape version specifier: '%3'.  Type 'INSTALL' for instructions.
  134. echo :
  135.  
  136. rem -----------------------------------------------------------------------
  137. rem Execute the self-unzipping C-scape files w/ output to the destination drive.
  138. rem -----------------------------------------------------------------------
  139.  
  140. :ms51
  141. echo . Remove disk1 and insert disk3 to install the libraries.
  142. echo :
  143. pause
  144. if NOT EXIST m1lcscap.exe goto ms51
  145. m1lcscap  -d %2\cscape\lib
  146. m1lowl    -d %2\cscape\lib
  147. m1mcscap  -d %2\cscape\lib
  148. m1mowl    -d %2\cscape\lib
  149. echo :
  150. echo . Installed libraries for Microsoft C 5.1 in %2\cscape\lib
  151. echo :
  152. goto end
  153.  
  154. rem ----------------------------------------------------------
  155. :ms6
  156. echo . Remove disk1 and insert disk3 to install the libraries.
  157. echo :
  158. pause
  159. if NOT EXIST m6lcscap.exe goto ms6
  160. m6lcscap  -d %2\cscape\lib
  161. m6lowl    -d %2\cscape\lib
  162. m6mcscap  -d %2\cscape\lib
  163. m6mowl    -d %2\cscape\lib
  164. echo :
  165. echo . Installed libraries for Microsoft C 6 in %2\cscape\lib
  166. echo :
  167. goto end
  168.  
  169. rem ----------------------------------------------------------
  170. :tc20
  171. echo . Remove disk1 and insert disk2 to install the libraries.
  172. echo :
  173. pause
  174. if NOT EXIST t2lcscap.exe goto tc20
  175. t2lcscap   -d %2\cscape\lib
  176. t2lowl     -d %2\cscape\lib
  177. t2mcscap   -d %2\cscape\lib
  178. t2mowl     -d %2\cscape\lib
  179. echo :
  180. echo . Installed libraries for Borland Turbo C 2.0 in %2\cscape\lib
  181. echo :
  182. goto end
  183.  
  184. rem ----------------------------------------------------------
  185. :tcp1
  186. echo . Remove disk1 and insert disk2 to install the libraries.
  187. echo :
  188. pause
  189. if NOT EXIST tplcscap.exe goto tcp1
  190. tplcscap   -d %2\cscape\lib
  191. tplowl     -d %2\cscape\lib
  192. tpmcscap   -d %2\cscape\lib
  193. tpmowl     -d %2\cscape\lib
  194. echo :
  195. echo . Installed libraries for Borland Turbo C++ in %2\cscape\lib
  196. echo :
  197. goto end
  198.  
  199. rem ----------------------------------------------------------
  200. :zcp2
  201. rem   Zortech libs are already on disk1.  No need to change disks.
  202. echo :
  203. z2lcscap   -d %2\cscape\lib
  204. z2lowl     -d %2\cscape\lib
  205. echo :
  206. echo . Installed libraries for Zortech C++ in %2\cscape\lib
  207. echo :
  208. goto end
  209.  
  210. rem ----------------------------------------------------------
  211.  
  212. :5set
  213. rem -----------------------------------------------------------------------
  214. rem The 5-disk 3 1/2" set
  215. rem ----------------------------------------------------------
  216.  
  217. if %3==tc2 goto tc20_5
  218. if %3==TC2 goto tc20_5
  219.  
  220. if %3==tcpp goto tcp1_5
  221. if %3==TCPP goto tcp1_5
  222.  
  223. if %3==m51 goto ms51_5
  224. if %3==M51 goto ms51_5
  225.  
  226. if %3==m6 goto ms6_5
  227. if %3==M6 goto ms6_5
  228.  
  229. if %3==zcpp goto zcp2_5
  230. if %3==ZCPP goto zcp2_5
  231.  
  232. echo :
  233. echo . Unrecognized C-scape version specifier: '%3'.  Type 'INSTALL' for instructions.
  234. echo :
  235.  
  236. rem -----------------------------------------------------------------------
  237. rem Execute the self-unzipping C-scape files w/ output to the destination drive.
  238. rem -----------------------------------------------------------------------
  239.  
  240. :ms51_5
  241. echo . Remove disk1 and insert disk3 to install the libraries.
  242. echo :
  243. pause
  244. if NOT EXIST m1lcscap.exe goto ms51_5
  245.  
  246. m1lcscap  -d %2\cscape\lib
  247. m1lowl    -d %2\cscape\lib
  248. m1mcscap  -d %2\cscape\lib
  249. m1mowl    -d %2\cscape\lib
  250. echo :
  251. echo . Installed libraries for Microsoft C 5.1 in %2\cscape\lib
  252. echo :
  253. goto end
  254.  
  255. rem ----------------------------------------------------------
  256. :ms6_5
  257. echo . Remove disk1 and insert disk4 to install the libraries.
  258. echo :
  259. pause
  260. if NOT EXIST m6lcscap.exe goto ms6_5
  261.  
  262. m6lcscap  -d %2\cscape\lib
  263. m6lowl    -d %2\cscape\lib
  264. m6mcscap  -d %2\cscape\lib
  265. m6mowl    -d %2\cscape\lib
  266. echo :
  267. echo . Installed libraries for Microsoft C 6 in %2\cscape\lib
  268. echo :
  269. goto end
  270.  
  271. rem ----------------------------------------------------------
  272. :tc20_5
  273. echo . Remove disk1 and insert disk2 to install the libraries.
  274. echo :
  275. pause
  276. if NOT EXIST t2lcscap.exe goto tc20_5
  277.  
  278. t2lcscap   -d %2\cscape\lib
  279. t2lowl     -d %2\cscape\lib
  280. t2mcscap   -d %2\cscape\lib
  281.  
  282. :tc20_5a
  283. echo . Remove disk2 and insert disk3 to finish installing the libraries.
  284. echo :
  285. pause
  286. if NOT EXIST t2mowl.exe goto tc20_5a
  287.  
  288. t2mowl     -d %2\cscape\lib
  289. echo :
  290. echo . Installed libraries for Borland Turbo C 2.0 in %2\cscape\lib
  291. echo :
  292. goto end
  293.  
  294. rem ----------------------------------------------------------
  295. :tcp1_5
  296. echo . Remove disk1 and insert disk2 to install the libraries.
  297. echo :
  298. pause
  299. if NOT EXIST tplcscap.exe goto tcp1_5
  300.  
  301. tplcscap   -d %2\cscape\lib
  302. tplowl     -d %2\cscape\lib
  303.  
  304. :tcp1_5a
  305. echo . Remove disk2 and insert disk5 to finish installing the libraries.
  306. echo :
  307. pause
  308. if NOT EXIST tpmcscap.exe goto tcp1_5a
  309.  
  310. tpmcscap   -d %2\cscape\lib
  311. tpmowl     -d %2\cscape\lib
  312.  
  313. echo :
  314. echo . Installed libraries for Borland Turbo C++ in %2\cscape\lib
  315. echo :
  316. goto end
  317.  
  318. rem ----------------------------------------------------------
  319. :zcp2_5
  320. echo . Remove disk1 and insert disk5 to install the libraries.
  321. echo :
  322. pause
  323. if NOT EXIST z2lcscap.exe goto zcp2_5
  324.  
  325. z2lcscap   -d %2\cscape\lib
  326. z2lowl     -d %2\cscape\lib
  327. echo :
  328. echo . Installed libraries for Zortech C++ in %2\cscape\lib
  329. echo :
  330. goto end
  331.  
  332. rem ----------------------------------------------------------
  333.  
  334. :end
  335.  
  336.