home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / fa_ord.zip / INSTALFA.BAT < prev    next >
DOS Batch File  |  1994-05-07  |  16KB  |  417 lines

  1. @ECHO OFF
  2. CLS
  3. IF %1NOTHING==NOTHING GOTO HELP
  4. IF %2NOTHING==NOTHING GOTO HELP
  5. IF %3NOTHING==NOTHING GOTO HELP
  6. IF %4==FLOPPY GOTO ERRCSTM
  7. IF %4==floppy GOTO ERRCSTM
  8. IF %4==FASYS GOTO ERRCSTM
  9. IF %4==fasys GOTO ERRCSTM
  10. IF %4==DEMODS GOTO ERRCSTM
  11. IF %4==demods GOTO ERRCSTM
  12. IF %5NOTHING==NOTHING GOTO CP5
  13. IF "%5"=="floppy" GOTO CP5  
  14. IF "%5"=="FLOPPY" GOTO CP5
  15. IF "%5"=="demods" GOTO CP5
  16. IF "%5"=="DEMODS" GOTO CP5
  17. IF "%5"=="fasys" GOTO CP5
  18. IF "%5"=="FASYS" GOTO CP5
  19. GOTO ERRCSTM
  20. :CP5
  21. CLS
  22. ECHO  .
  23. ECHO  .
  24. IF %2==A:\ GOTO BSLASH
  25. IF %2==a:\ GOTO BSLASH
  26. IF %2==B:\ GOTO BSLASH
  27. IF %2==b:\ GOTO BSLASH
  28. IF %2==C:\ GOTO BSLASH
  29. IF %2==c:\ GOTO BSLASH
  30. IF %2==D:\ GOTO BSLASH
  31. IF %2==d:\ GOTO BSLASH
  32. IF %2==E:\ GOTO BSLASH
  33. IF %2==e:\ GOTO BSLASH
  34. IF %3==A:\ GOTO BSLASH
  35. IF %3==a:\ GOTO BSLASH
  36. IF %3==B:\ GOTO BSLASH
  37. IF %3==b:\ GOTO BSLASH
  38. IF %3==C:\ GOTO BSLASH
  39. IF %3==c:\ GOTO BSLASH
  40. IF %3==D:\ GOTO BSLASH
  41. IF %3==d:\ GOTO BSLASH
  42. IF %3==E:\ GOTO BSLASH
  43. IF %3==e:\ GOTO BSLASH
  44. IF NOT EXIST %2\%1.SSD GOTO ERRSRC
  45. IF "%5"=="floppy" GOTO RETURN2
  46. IF "%5"=="FLOPPY" GOTO RETURN2
  47. IF %4==5 GOTO CP3       
  48. IF NOT EXIST %3\FS4.EXE GOTO ERRTRGT
  49. IF %4NOTHING==NOTHING GOTO CP4
  50. IF %4==4 GOTO CP4
  51. :CP3
  52. IF EXIST %3\FS5.COM GOTO CP4
  53. IF NOT EXIST %3\FS5.EXE GOTO ERRTRGT
  54. :CP4
  55. IF NOT EXIST %3\*.* GOTO ERRTRGT
  56. CLS
  57. :RETURN2
  58. IF NOT "%4"=="5" ECHO   This installation is for FS4.
  59. IF "%4"=="5" ECHO   This installation is for FS5.
  60. IF %4NOTHING==NOTHING ECHO   No flight sim version designated - default installation is for FS4.
  61. ECHO   About to install
  62. IF NOT EXIST %2\VERFA.BAT GOTO OLDVER
  63. CALL  %2\VERFA.BAT
  64. :RETURN1
  65. ECHO  .
  66. ECHO   source drive %2 to %3   
  67. IF "%5"=="floppy" ECHO   Custom installation of scenery only - to drive %3
  68. IF "%5"=="FLOPPY" ECHO   Custom installation of scenery only - to drive %3
  69. IF "%5"=="demods" ECHO   Custom installation of Demos & Modes only - to drive %3
  70. IF "%5"=="DEMODS" ECHO   Custom installation of Demos & Modes only - to drive %3
  71. IF "%5"=="fasys" ECHO   Custom installation of runway selection system to - %3
  72. IF "%5"=="FASYS" ECHO   Custom installation of runway selection system to - %3
  73. :CP1
  74. ECHO  .
  75. ECHO  .
  76. ECHO  scenery name is  %1
  77. ECHO  source drive & path is  %2
  78. ECHO  target drive & path is  %3
  79. ECHO  FS version is  %4
  80. IF NOT %5NOTHING==NOTHING ECHO  custom installation is  %5
  81. ECHO .
  82. ECHO Hold down the  CTRL  key and press  BREAK  to stop the installation
  83. ECHO            or
  84. PAUSE
  85. IF %4NOTHING==NOTHING GOTO IFOUR
  86. IF NOT %4==5 GOTO IFOUR
  87. IF %4==5 GOTO IFIVE
  88. GOTO END
  89. :IFOUR                          
  90. ECHO                     Installing Final Approach %1
  91. IF "%5"=="demods" GOTO DEMODS4
  92. IF "%5"=="DEMODS" GOTO DEMODS4
  93. IF "%5"=="floppy" GOTO FLOP4
  94. IF "%5"=="FLOPPY" GOTO FLOP4
  95. MD %3\FA_INFO >NUL
  96. COPY %2\*.1ST %3\FA_INFO /v >NUL
  97. COPY %2\*.INF %3\FA_INFO /v >NUL
  98. IF EXIST %2\AR.BAT COPY %2\AR.BAT %3 /v >NUL
  99. IF EXIST %2\SRUNWAY.EXE COPY %2\SRUNWAY.EXE %3 /v >NUL
  100. IF EXIST %2\RUNWAY.EXE COPY %2\RUNWAY.EXE %3 /v >NUL
  101. IF EXIST %2\*.DEM COPY %2\*.DEM %3 /v >NUL
  102. IF EXIST %2\*.MOD COPY %2\*.MOD %3 /v >NUL
  103. IF "%5"=="fasys" GOTO END
  104. IF "%5"=="FASYS" GOTO END
  105. MD %3\RFRUNWAY >NUL
  106. COPY %2\%1.SSD %3\RFRUNWAY /v >NUL
  107. MD %3\RFRUNWAY\%1 >NUL
  108. COPY %2\*.DYX %3\RFRUNWAY\%1 /v >NUL
  109. COPY %2\*.SCX %3\RFRUNWAY\%1 /v >NUL
  110. GOTO END
  111. :FLOP4                          ***FLOP4***
  112. ECHO    INSTALL TO FLOPPY - PART 1
  113. MD %3\RFRUNWAY
  114. ECHO                             2
  115. COPY %2\%1.SSD %3\RFRUNWAY /v  >NUL
  116. ECHO                             3
  117. MD %3\RFRUNWAY\%1
  118. ECHO                             4
  119. COPY %2\*.DYX %3\RFRUNWAY\%1 /V >NUL
  120. ECHO                   LAST PART 5
  121. COPY %2\*.SCX %3\RFRUNWAY\%1 /V >NUL
  122. GOTO END
  123. :DEMODS4
  124. CLS
  125. ECHO .
  126. IF EXIST %2\*.DEM ECHO Installing .DEM files.
  127. COPY %2\*.DEM %3 /v >NUL
  128. IF NOT EXIST %2\*.DEM ECHO No .DEM files detected on %2.  Were DEM's included with %1?
  129. ECHO .
  130. IF EXIST %2\*.MOD ECHO Installing .MOD files.
  131. COPY %2\*.MOD %3 /v >NUL
  132. IF NOT EXIST %2\*.MOD ECHO No .MOD files detected on %2.  Were MOD's included with %1?
  133. GOTO END
  134. :IFIVE
  135. ECHO                     Installing Final Approach %1
  136. IF "%5"=="floppy" GOTO FLOP5
  137. IF "%5"=="FLOPPY" GOTO FLOP5
  138. IF "%5"=="demods" GOTO ERRDEMODS
  139. IF "%5"=="DEMODS" GOTO ERRDEMODS
  140. MD %3\SCENERY\FA_INFO >NUL
  141. COPY %2\*.1ST %3\SCENERY\FA_INFO /v >NUL
  142. COPY %2\*.INF %3\SCENERY\FA_INFO /v >NUL
  143. IF EXIST %2\AR5.BAT COPY %2\AR5.BAT %3 /v >NUL
  144. IF EXIST %2\SRUNWAY.EXE COPY %2\SRUNWAY.EXE %3\SCENERY /v >NUL
  145. IF EXIST %2\RUNWAY.EXE COPY %2\RUNWAY.EXE %3\SCENERY /v >NUL
  146. IF "%5"=="fasys" GOTO END
  147. IF "%5"=="FASYS" GOTO END
  148. MD %3\SCENERY\RFRUNWAY >NUL
  149. COPY %2\%1.SSD %3\SCENERY\RFRUNWAY /v  >NUL
  150. MD %3\SCENERY\RFRUNWAY\%1 >NUL
  151. COPY %2\*.DUM %3\SCENERY\RFRUNWAY\%1\*.DYX >NUL
  152. COPY %2\*.SCX %3\SCENERY\RFRUNWAY\%1 /v >NUL
  153. GOTO END
  154. :FLOP5
  155. ECHO    INSTALL TO FLOPPY - PART 1
  156. MD %3\RFRUNWAY
  157. ECHO                             2
  158. COPY %2\%1.SSD %3\RFRUNWAY /v  >NUL
  159. ECHO                             3
  160. MD %3\RFRUNWAY\%1
  161. ECHO                             4
  162. COPY %2\*.DUM %3\RFRUNWAY\%1\*.DYX /V >NUL
  163. ECHO                   LAST PART 5  
  164. COPY %2\*.SCX %3\RFRUNWAY\%1 /V >NUL
  165. GOTO END
  166. :HELP
  167. ECHO   .
  168. ECHO   .
  169. ECHO   .                HELP for FA (Final Approach) Installation
  170. ECHO   .
  171. ECHO   If you received FA as a compressed (eg. ZIP) file - You can decompress
  172. ECHO   (eg. UNZIP) the file to a temporary directory such as FATEMP on your hard
  173. ECHO   drive.  You need to show the temporary directory's path as the source when
  174. ECHO   you run INSTALFA.  If you received more than one FA scenery area DO NOT
  175. ECHO   decompress more than one scenery area to the same subdirectory at a time.
  176. ECHO   This will mix the files from different scenery areas and the files will not
  177. ECHO   be installed properly.  Delete all the files from the temporary directory
  178. ECHO   before decompressing a second scenery area to the temporary directory.
  179. ECHO   .
  180. ECHO   With unzipped FA files on a floppy you can install FA from that floppy or
  181. ECHO   from a backup floppy.  To make a backup of the FA floppy, use the XCOPY
  182. ECHO   command with the /S switch to copy subdirectories.  eg.  XCOPY A: B: /S  .
  183. ECHO   This ensures the proper placing of scenery subdirectories & files and that 
  184. ECHO   files from different scenery areas are not mixed together.
  185. ECHO   .
  186. ECHO   DO NOT copy all the FA files to your Flight Simulator directory.  The
  187. ECHO   INSTALFA program places many of the FA files in special subdirectories.
  188. ECHO   .
  189. ECHO   .
  190. ECHO More information and examples follow -
  191. PAUSE
  192. CLS
  193. ECHO   .
  194. ECHO   .
  195. ECHO   When you choose the normal installation or the FASYS only option, the FA
  196. ECHO   information, .INF files such as FAMANUAL.INF, README.1ST, or INVOICE.INF
  197. ECHO   etc are installed to a subdirectory within your FS4 directory called FA_INFO.
  198. ECHO   For FS5 the FA_INFO subdirectory is placed in the SCENERY directory.  The FS5
  199. ECHO   SCENERY directory is located in the FS5 main directory.  Keep the info files
  200. ECHO   for viewing or you can print them and then delete them from your hard drive.
  201. ECHO   .
  202. ECHO   Jot down the the path to the scenery you are going to install (source) and 
  203. ECHO   the path to your FS4 or 5 directory (target) before running INSTALFA .  Your 
  204. ECHO   drive letters & path may be different from those shown in the examples.
  205. ECHO   .
  206. ECHO   INSTALFA.BAT can be located on any drive or directory.  It doesn't need to
  207. ECHO   be located in the same directory as the other FA files.
  208. ECHO   .
  209. ECHO   When typing the install command, leave a space between parameters as shown
  210. ECHO   in the examples.  DON'T use a \ (backslash) as the final character in any
  211. ECHO   path. eg.  A:\CHICAGO (not A:\CHICAGO\)   B: (not B:\)   C:\FS4 (not C:\fs4\)
  212. ECHO   .
  213. ECHO   .
  214. ECHO More information and examples follow -
  215. PAUSE
  216. CLS
  217. ECHO   .  
  218. ECHO   STANDARD INSTALLATION (Final Approach program & scenery)
  219. ECHO   .
  220. ECHO   If you do not designate an FS version number, the installation will
  221. ECHO   be for FS4 by default.  Remember to leave a space between parameters 
  222. ECHO   as shown in the examples. 
  223. ECHO   .
  224. ECHO   .
  225. ECHO   type - INSTALFA  SCENERYNAME  SOURCEDRIVE\PATH  TARGETDRIVE\PATH  FSVERSION  
  226. ECHO            press ENTER
  227. ECHO   .
  228. ECHO  Eg. To install Chicago scenery from drive C:\FATEMP to C:\FS4 for FS4  type -
  229. ECHO      INSTALFA  CHICAGO  C:\FATEMP  C:\FS4  4    press ENTER
  230. ECHO   .
  231. ECHO  Eg. To install Milwaukee scenery from drive A:\MILWKEE to C:\SIMS\MFS for FS5
  232. ECHO      type - INSTALFA  MILWKEE  A:\MILWKEE  C:\SIMS\MFS  5    press ENTER
  233. ECHO   .
  234. ECHO   .
  235. ECHO Hold down CTRL then press BREAK to preserve this example or for more examples
  236. PAUSE
  237. CLS
  238. ECHO   .
  239. ECHO   INSTALL SCENERY ONLY TO FLOPPY DISK
  240. ECHO   .
  241. ECHO   Final Approach provides a dynamic & static scenery file for each runway 
  242. ECHO   choice.  FA needs to access these files only when you choose a new active 
  243. ECHO   runway.  To conserve hard drive space you may place the FA scenery files on
  244. ECHO   floppies.  The FA system must be installed on hard drive - see FAMANUAL.INF
  245. ECHO   file.  Remember to leave a space between parameters as shown in the examples.
  246. ECHO   .
  247. ECHO   type - INSTALFA  SCENERYNAME  SOURCEDRIVE\PATH  TARGETDRIVE\PATH  FSVERSION
  248. ECHO    FLOPPY   press ENTER
  249. ECHO   .
  250. ECHO  Eg. To install Milwaukee scenery from drive D:\FATEMP to drive B: for FS4
  251. ECHO      type - INSTALFA  MILWKEE  D:\FATEMP  B:  4  FLOPPY    press ENTER
  252. ECHO   .
  253. ECHO  Eg. To install Indianapolis scenry from drive B:\INDAPLS to drive A: for FS5
  254. ECHO      type - INSTALFA  INDAPLS  B:\INDAPLS  A:  5  FLOPPY    press ENTER
  255. ECHO   .
  256. ECHO   .
  257. ECHO Hold down CTRL then press BREAK to preserve this example or for more examples
  258. PAUSE
  259. CLS
  260. ECHO   .
  261. ECHO   INSTALL DEMOS AND MODES ONLY (FS4)
  262. ECHO   .
  263. ECHO    If you install FA scenery files to a FLOPPY you need to separately install
  264. ECHO    any DEMOS and MODES included to your hard drive.  DEMOS & MODES are for FS4
  265. ECHO    only.  The following example installs any DEMOS & MODES provided.  Remember
  266. ECHO    to leave a space between parameters as shown in the examples.
  267. ECHO   .
  268. ECHO   .
  269. ECHO   type -  INSTALFA  SCENERYNAME  SOURCEDRIVE\PATH  TARGETDRIVE\PATH  FSVERSION
  270. ECHO            DEMODS    press ENTER
  271. ECHO   .
  272. ECHO  Eg. To install GRISSOM demos & modes drive B:\GRISSOM to drive D:\FLIGHT for
  273. ECHO       FS4 type -
  274. ECHO      INSTALFA  GRISSOM  B:\GRISSOM  D:\FLIGHT  4  DEMODS    press ENTER
  275. ECHO   .
  276. ECHO  Eg. To install CHICAGO demos & modes drive B: root directory, to drive 
  277. ECHO       D:\FS4 for FS4 type -
  278. ECHO      INSTALFA  CHICAGO  B:  D:\FS4  4  DEMODS    press ENTER
  279. ECHO   .
  280. ECHO   .
  281. ECHO Hold down CTRL then press BREAK to preserve this example or for more examples
  282. PAUSE
  283. CLS
  284. ECHO   .
  285. ECHO   INSTALL FINAL APPROACH SYSTEM ONLY
  286. ECHO   .
  287. ECHO    The following example installs the runway selection system without scenery.
  288. ECHO    When FS version 4 is designated any DEMOS and MODES are also installed.
  289. ECHO    Remember to leave a space between parameters as shown in the examples. 
  290. ECHO   .
  291. ECHO   .
  292. ECHO   type - INSTALFA  SCENERYNAME  SOURCEDRIVE\PATH  TARGETDRIVE\PATH  FSVERSION
  293. ECHO            FASYS    press ENTER
  294. ECHO   .
  295. ECHO  Eg. To install selection system only drive D:\FATEMP to drive C:\FS4 for FS4
  296. ECHO      type - INSTALFA  CHICAGO  D:\FATEMP  C:\FS4  4  FASYS    press ENTER
  297. ECHO   .
  298. ECHO  Eg. To install selection system only drive A:\CHICAGO to drive C:\FLY5 for FS5
  299. ECHO      type - INSTALFA  CHICAGO  A:\CHICAGO  C:\FLY5  5  FASYS    press ENTER
  300. ECHO   .
  301. ECHO   .
  302. ECHO   .
  303. ECHO Hold down CTRL then press BREAK to preserve this example or for more examples
  304. PAUSE
  305. CLS
  306. GOTO HELPB1
  307. :OLDVER
  308. COPY %2\*.VER %2\THIS.IS >NUL
  309. FIND "ver" %2\THIS.IS
  310. DEL %2\THIS.IS
  311. GOTO RETURN1
  312. :ERRDEMODS
  313. CLS
  314. ECHO   .
  315. ECHO   .
  316. ECHO   You selected installation of DEMOS & MODES for FS5.  The FS4 DEMOS and MODES 
  317. ECHO   are not compatible with FS5.
  318. ECHO   .
  319. ECHO   .
  320. GOTO END2
  321. :ERRCSTM
  322. CLS
  323. ECHO   .
  324. ECHO   .
  325. ECHO   You typed  %0  %1  %2  %3  %4  %5
  326. ECHO   .
  327. IF %5NOTHING==NOTHING ECHO   CUSTOM INSTALLATION WITH LESS THAN 5 PARAMETERS TYPED AFTER INSTALFA.
  328. IF %5NOTHING==NOTHING ECHO   .
  329. IF NOT %5NOTHING==NOTHING ECHO   THE 5th PARAMETER YOU TYPED (after INSTALFA) WASN'T A RECOGNIZED OPTION.
  330. ECHO   To select a custom installation you must type all the parameters, including
  331. ECHO   FS version (4 or 5).  Check to see that you entered all required parameters.
  332. ECHO   Check that you typed in an acceptable option.  The fifth item is not
  333. ECHO   required unless you wish to choose one of the custom installation options
  334. ECHO   listed below.
  335. ECHO   .
  336. ECHO   .
  337. ECHO   Options for the fifth parameter -  FLOPPY     FAYSYS     DEMODS
  338. ECHO   .
  339. ECHO   .
  340. ECHO   .
  341. ECHO Hold down CTRL then press BREAK to exit - or for HELP
  342. PAUSE
  343. CLS
  344. GOTO HELP
  345. :BSLASH
  346. CLS
  347. ECHO   .
  348. ECHO   .
  349. ECHO   You typed  %0  %1  %2  %3  %4  %5
  350. ECHO   .
  351. ECHO   Include required backslashes (\) in your source and target paths when 
  352. ECHO   necessary (Eg.  B:\FS4  ) but never end with a backslash.
  353. ECHO   .
  354. GOTO END2
  355. :ERRSRC
  356. CLS
  357. ECHO   .
  358. ECHO   You typed  %0  %1  %2  %3  %4  %5
  359. ECHO   .
  360. ECHO   INSTALFA program didn't detect  %1  scenery on drive/path  %2  .
  361. ECHO    Check the following:  
  362. ECHO      Make sure that you type the scenery name correctly.
  363. ECHO      Type the correct source and target paths.
  364. ECHO      When you install from a floppy make sure you inserted the correct disk.
  365. ECHO      Include required backslashes (\) in your path.  Eg. C:\FS4 , but never
  366. ECHO      end with a backslash.
  367. ECHO   .
  368. ECHO   By typing only INSTALFA with nothing after it and pressing  ENTER  , you'll
  369. ECHO   see the help screens for installation.  You can keep any example screen on 
  370. ECHO   your monitor by holding down  CONTROL  and then pressing  BREAK  .  You'll be
  371. ECHO   asked if you wish to terminate the batch job - press  Y  .
  372. :HELPB1
  373. ECHO   .
  374. ECHO   .
  375. ECHO   Be sure to correctly type the name of the scenery to be installed.
  376. ECHO   Possible scenery names:  CHICAGO   MILWKEE   GRISSOM   INDAPLS
  377. ECHO   .
  378. ECHO   .
  379. GOTO END2
  380. :ERRTRGT
  381. CLS
  382. ECHO   CAUTION... read carefully before proceeding!
  383. ECHO   .
  384. ECHO   You typed  %0  %1  %2  %3  %4  %5   
  385. ECHO   .
  386. ECHO   INSTALFA program didn't detect FS%4.EXE or FS%4.COM file on  %3  .
  387. ECHO    Check the following:  
  388. ECHO      Make sure that you type the scenery name correctly.
  389. ECHO      Type the correct source and target paths.
  390. ECHO      Include required backslashes (\) in your path.  Eg. C:\FS4 , but never
  391. ECHO      end with a backslash.
  392. ECHO   .
  393. ECHO   By typing only INSTALFA with nothing after it and pressing  ENTER  , you'll
  394. ECHO   see the help screens for installation.  You can keep any example screen on 
  395. ECHO   your monitor by holding down  CONTROL  and then pressing  BREAK  .  You'll be
  396. ECHO   asked if you wish to terminate the batch job - press  Y  .
  397. ECHO   .
  398. ECHO   If you want to designate  FLOPPY  for custom installation of FA scenery files
  399. ECHO   to a floppy disk make sure that you correctly typed  FLOPPY  .
  400. ECHO   .
  401. ECHO   .
  402. ECHO CAUTION... do you really want the FA files installed to  %3  ?
  403. ECHO TO ABORT INSTALLATION hold down CTRL then press BREAK - or
  404. PAUSE
  405. CLS
  406. GOTO RETURN2
  407. :END
  408. ECHO   .
  409. ECHO   .                       INSTALL PROGRAM ENDED
  410. ECHO   .
  411. GOTO END3
  412. :END2
  413. ECHO .                           READY TO INSTALL
  414. ECHO .
  415. :END3
  416.  
  417.