home *** CD-ROM | disk | FTP | other *** search
/ International Financial Statistics / International Financial Statistics.ISO / install / inscript.eng < prev    next >
Encoding:
Text File  |  1991-02-12  |  11.8 KB  |  487 lines

  1. ; CD Answer Installation Script - Generic                               jdk
  2. ; <<CDA>> Feb 5 1991;2.03
  3.  
  4. ; single/multiple disk version
  5. ;
  6. ;   To customize this install script:
  7. ;      1. Put the product name (1-8 characters) in a file called
  8. ;         'PRODNAME'. There should be no carriage return/line feed at
  9. ;         the end of the name- the file should contain just the characters
  10. ;         of the name.
  11. ;      2. Put the application name (CD Author 4 character project identifier)
  12. ;         in a file called 'APPLNAME'. Again, no other chars should be
  13. ;         the file. Multiple applications are formed by adding a space,
  14. ;         then another application identifier
  15. ;      3. Put the start-up message in a file called PRODSCRN.<language>
  16. ;         There should not be more than 10 lines.
  17. ;
  18. ;    The first disk must contain the \INSTALL directory.
  19. ;    This contains the general system files for the install
  20. ;    process and may be repeated on disk #2, etc.
  21. ;    The application specific files are kept in a directory
  22. ;    named 'DISK1'. If additional disks are required, create
  23. ;    an (empty) file on the current disk named '\MORE' and
  24. ;    put the overflow files in a directory named \DISK2 (3, 4, ...).
  25.  
  26. BREAK abort
  27.  
  28. ; install disk
  29. PARSE_PATH <$ProgDir>
  30. SET insdrive = <$Drive>
  31. SET ins = <insdrive>\INSTALL
  32. SET curdisk = 1
  33. GOSUB need_disk
  34.  
  35. ; here are some defaults:
  36.  
  37. ;  default destination drive
  38. PARSE_PATH <$CurDir>
  39. SET def_dest = C:\
  40. IF NOT "<$Drive>"=="<insdrive>" DO SET def_def = <$Drive>
  41.  
  42. ;  default CD-ROM interface (FS_HSGEN {High Sierra} or FS_ISGEN {ISO})
  43. SET def_cdtype = High Sierra
  44. SET def_driver = FS_HSGEN
  45. IF EXISTS <insdrive>\INSTALL\<def_driver>.* GOTO ok_driver
  46. SET def_cdtype = ISO
  47. SET def_driver = FS_ISGEN
  48. :ok_driver
  49.  
  50. ;  language
  51. SET def_lang = <$Language>
  52.  
  53. ; application name(s) (4 char ident(s) on CD-ROM)
  54. READFILE names = <ins>\APPLNAME.
  55.  
  56. ; product name (application name for batch file, subdirectory name)
  57. READFILE prod = <ins>\PRODNAME.
  58.  
  59. ; default dest drive and directory
  60. PARSE_PATH <def_dest><prod>.CD
  61. SET dstdrive = <$Drive>
  62. SET path = <$Dir>
  63. CD <dstdrive>\
  64.  
  65. ; read and display Application Installation Screen
  66. IF NOT EXISTS <insdrive>\DISK1\PRODSCRN.<def_lang> GOTO no_banner
  67. READFILE screen = <insdrive>\DISK1\PRODSCRN.<def_lang>
  68. GOTO show_banner
  69. :no_banner
  70. SET screen =
  71. ----        CD Answer Installation for:\n\n
  72. ----               <prod>\n\n
  73. ----        Application(s): <names>
  74. :show_banner
  75. CLEAR
  76. TEXT <screen>
  77. SET screen =
  78. WAIT
  79.  
  80. SET def_drive=<dstdrive>
  81. SET def_path=<path>
  82.  
  83. GOTO okdir
  84. :getdir
  85. CLEAR
  86. TEXT \nError -\n\n
  87. ----  The path "<dstdrive><path>" is not allowed!\n
  88. ----There must be both a drive and a valid subdirectory name in order
  89. ---- to install the software.
  90. WAIT
  91. :okdir
  92. CLEAR
  93. TEXT The retrieval software must be installed on your hard disk or on a
  94. ---- formatted floppy disk. The standard values are drive <def_drive> (normally
  95. ---- the hard disk), and a subdirectory named <def_path>. To use these values,
  96. ---- press the ┘ (Enter) key twice. To alter them, type the new drive or
  97. ---- subdirectory at the appropriate prompt, then type ┘ (Enter).
  98.  
  99. INPUT 6,6,5 dstdrive = Install on drive     ?
  100. INPUT 6,8,40 path    = Install in directory ?
  101. SET dest = <dstdrive><path>
  102. SET confile = <ins>\_DW_.CFG
  103.  
  104. IF "<dstdrive>"=="" GOTO getdir
  105. IF "<path>"=="\" GOTO getdir
  106. IF "<path>"=="" GOTO getdir
  107. IF NOT DIREXISTS <dstdrive>\ GOTO getdir
  108.  
  109. CD <dstdrive>\
  110.  
  111. IF NOT DIREXISTS <dest> GOTO nopath
  112. IF NOT EXISTS <dest>\DW.EXE GOTO nopath
  113. CLEAR
  114. TEXT The directory "<dest>" already exists.
  115. NEWMENU ?, 3, 54
  116. MENU Remove the old version; install new version
  117. MENU Remove the old version; do not install new software
  118. MENU Alter configuration; do not copy software
  119. MENU Stop the installation without making any changes
  120.  
  121. CHOICE 1
  122. CLEAR
  123. TEXT Deleting previous contents of <dest>...
  124. FOREACH name = <names>
  125.  DEL <dest>\<name>*.*
  126. NEXT
  127. DEL <dest>\FS_*.DRV
  128. DEL <dest>\SC_*.DRV
  129. DEL <dest>\PR_*.DRV
  130. DEL <dest>\GR_*.DRV
  131. DEL <dest>\_DW_*.*
  132. DEL <dest>\DW.EXE
  133. DEL <dest>\UPDATE.EXE
  134. GOTO okpath
  135.  
  136. CHOICE 2
  137. CLEAR
  138. TEXT Removing <dest> directory...
  139. FOREACH name = <names>
  140.  DEL <dest>\<name>*.*
  141. NEXT
  142. DEL <dest>\FS_*.DRV
  143. DEL <dest>\SC_*.DRV
  144. DEL <dest>\PR_*.DRV
  145. DEL <dest>\GR_*.DRV
  146. DEL <dest>\_DW_*.*
  147. DEL <dest>\DW.EXE
  148. DEL <dest>\UPDATE.EXE
  149. IF NOT EXISTS <dest>\*.* GOTO remdest
  150. TEXT <dest> directory has unknown files, directory not removed!!
  151. WAIT
  152. GOTO norem
  153. :remdest
  154. RD <dest>
  155. :norem
  156. DEL <dstdrive>\<prod>.BAT
  157. GOTO end2
  158.  
  159. CHOICE 3
  160. SET alter = Y
  161. SET confile = <dest>\_DW_.CFG
  162. GOTO okpath
  163.  
  164. CHOICE 4
  165. GOTO end2
  166. ENDCHOICES
  167.  
  168. :nopath
  169. MD <dest>
  170. IF NOT DIREXISTS <dest> GOTO getdir
  171. :okpath
  172.  
  173. IF NOT EXISTS <confile> GOTO no_config
  174. DISP 5,14 Reading configuration...
  175. READCONFIG <confile>
  176. :no_config
  177.  
  178. HSCOUNT hs
  179. IF NOT <hs>==0 GOTO have_hs
  180.  
  181. CLEAR
  182. TEXT  Problem-  You have no CD-ROM drives installed.\n\n
  183. ----Please use the install disk supplied by your CD-ROM drive manufacturer
  184. ---- to install the device driver software, and then repeat this install
  185. ---- program.\n\n
  186. ----Note: The CD-ROM drive install disk will copy some files to your system
  187. ---- disk and modify the CONFIG.SYS and AUTOEXEC.BAT files.\n
  188. ----Unless you have other programs which use the MSCDEX program, it is
  189. ---- recommended that you remove the line calling this program from your
  190. ---- AUTOEXEC.BAT file, since this software does not require it.\n\n
  191. ----Be sure to reboot after the CD-ROM drivers are installed.
  192. WAIT
  193. ABORT
  194.  
  195. :have_hs
  196.  
  197. SET msg =
  198. IF <hs>==1 GOTO instOne
  199.  
  200. TEXT A selection of <def_cdtype> CD-ROM drivers are available:\n\n
  201. ----Select the <def_cdtype> CD-ROM device driver from this list of available
  202. ---- device drivers using the  and  keys. Press ┘ (Enter) when ready.\n
  203. ----Press Esc to abort installation.
  204. GOTO instMore
  205.  
  206. :instOne
  207. SET msg = A <def_cdtype> CD-ROM driver is installed (see CONFIG.SYS):\n\n
  208.  
  209. :instMore
  210. HSDRIVER hsname = 25, 6
  211. CONFIG Driver = "<def_driver>=<hsname>"
  212. CLEAR
  213. TEXT <msg>The <def_cdtype> CD-ROM driver selected is named "<hsname>". If this is not
  214. ---- correct, press Esc to abort the installation and check your CONFIG.SYS
  215. ---- file.\n\n
  216. ----This software does NOT require the MSCDEX.EXE program (Microsoft
  217. ---- CD-ROM Extensions). Unless another program requires them, you may
  218. ---- remove this program from your \AUTOEXEC.BAT file (where the drive's
  219. ---- INSTALL program may have put it).
  220. WAIT
  221.  
  222. CLEAR
  223. TEXT Copying <def_cdtype> CD-ROM Interface...
  224. SET driver_name = <def_driver>.DRV
  225. GOSUB copy_driver
  226.  
  227. ;----------------------------------------------------------------------------
  228.  
  229. CLEAR
  230. TEXT Display Choices:\n
  231. ----   Use the  and  arrows to select a screen type and
  232. ---- press ┘ (Enter)
  233.  
  234. NEWMENU ? 6 46
  235. MENU Standard Screen     - No graphics
  236. MENU Hercules Graphics Card
  237. MENU CGA Adaptor
  238. MENU Olivetti, AT&T or Compaq Plasma
  239. MENU EGA Adaptor
  240. MENU MCGA Adaptor
  241. MENU VGA Adaptor
  242.  
  243. IF "<$Screen:1:3>"=="HER" DO MENU_DEFAULT 2
  244. IF "<$Screen:1:3>"=="CGA" DO MENU_DEFAULT 3
  245. IF "<$Screen:1:3>"=="EGA" DO MENU_DEFAULT 5
  246. IF "<$Screen:1:4>"=="MCGA" DO MENU_DEFAULT 6
  247. IF "<$Screen:1:3>"=="VGA" DO MENU_DEFAULT 7
  248.  
  249. SET Port = N
  250. SET Graphic = N
  251.  
  252. CHOICE 1
  253.  SET scr_type = SC_STD
  254. CHOICE 2
  255.  SET scr_type = SC_HERC
  256.  SET Port = ?
  257. CHOICE 3
  258.  SET scr_type = SC_CGA
  259.  SET Port = ?
  260.  SET Graphic = ?
  261. CHOICE 4
  262.  SET scr_type = SC_ATT
  263.  SET Port = ?
  264.  SET Graphic = ?
  265. CHOICE 5
  266.  SET scr_type = SC_EGA
  267.  SET Port = ?
  268.  SET Graphic = ?
  269. CHOICE 6
  270.  SET scr_type = SC_MCGA
  271.  SET Port = ?
  272. CHOICE 7
  273.  SET scr_type = SC_VGA
  274.  SET Port = ?
  275.  SET Graphic = ?
  276. ENDCHOICES
  277.  
  278. SET extra =
  279. IF NOT "<Port>" == "?" GOTO no_flash
  280.  
  281. CLEAR
  282. TEXT Display Detail Choices:\n
  283. ----   Use the  and  arrows to select screen option and
  284. ---- press ┘ (Enter)
  285.  
  286. NEWMENU ? 6 46
  287.  MENU Standard Color or Monochrome Monitor
  288.  MENU Portable Computer   - Built-in Monochrome monitor
  289.  IF "<Graphic>"=="?" DO MENU Use graphic mode only
  290.  IF "<scr_type>"=="SC_CGA" DO MENU Older Color Screens - interference or "snow"
  291.  
  292. IF "<$Screen:-4>"=="PORT" DO MENU_DEFAULT 2
  293.  
  294. CHOICE 2
  295.   SET extra = P
  296. CHOICE 3
  297.   SET extra = G
  298. CHOICE 4
  299.   SET extra = F
  300. ENDCHOICES
  301.  
  302. :no_flash
  303.  
  304. CONFIG Screen = "<scr_type>=<extra>"
  305.  
  306. CLEAR
  307. TEXT Copying Screen Driver...
  308. SET driver_name = <scr_type>.DRV
  309. GOSUB copy_driver
  310.  
  311. ;----------------------------------------------------------------------------
  312.  
  313. CLEAR
  314. TEXT Printer Choices:\n
  315. ----   Use the  and  arrows to select a printer type and
  316. ---- press ┘ (Enter)
  317.  
  318. NEWMENU ? 6 46
  319. MENU Printer w/o graphics
  320. MENU HP LaserJet 150 DPI
  321. MENU HP LaserJet 300 DPI
  322. MENU HP LaserJet with JLaser
  323. MENU Canon LBP with JLaser
  324.  
  325. SET extra =
  326. CHOICE 1
  327.  SET prn_type = PR_STD
  328.  SET extra = ?2
  329. CHOICE 2
  330.  SET prn_type = PR_PCL15
  331.  SET extra = ?1
  332. CHOICE 3
  333.  SET prn_type = PR_PCL30
  334.  SET extra = ?1
  335. CHOICE 4
  336.  SET prn_type = PR_JLHP
  337.  SET extra = ?1
  338. CHOICE 5
  339.  SET prn_type = PR_JLCAN
  340. ENDCHOICES
  341.  
  342. IF NOT "<extra>"=="?1" GOTO pr_type_1
  343. CLEAR
  344. TEXT Printer Detail Choices:\n
  345. ----   Use the  and  arrows to select printer option and
  346. ---- press ┘ (Enter)
  347.  
  348. NEWMENU ? 6 46
  349. MENU HP Roman-8 character set (std)
  350. MENU HP PC-8 character set (LJ II/III only)
  351.  
  352. SET extra =
  353. CHOICE 1
  354.  SET extra = R
  355. CHOICE 2
  356.  SET extra = X
  357. ENDCHOICES
  358. :pr_type_1
  359.  
  360. IF NOT "<extra>"=="?2" GOTO pr_type_2
  361. CLEAR
  362. TEXT Printer Detail Choices:\n
  363. ----   Use the  and  arrows to select printer option and
  364. ---- press ┘ (Enter)
  365.  
  366. NEWMENU ? 6 46
  367. MENU PC 8 bit character set (std)
  368. MENU 7 bit National character set
  369.  
  370. SET extra =
  371. CHOICE 2
  372.  SET extra = 7
  373. ENDCHOICES
  374. :pr_type_2
  375.  
  376. SET port =
  377. NEWMENU ? 6 40
  378. MENU LPT1       Parallel Printer # 1
  379. MENU LPT2       Parallel Printer # 2
  380. MENU COM1       Serial Printer # 1
  381. MENU COM2       Serial Printer # 2
  382. MENU PRN        DOS current printer
  383.  
  384. CLEAR
  385. TEXT Printer Connection Choices:\n
  386. ----   Use the  and  arrows to select a printer port and
  387. ---- press ┘ (Enter)
  388.  
  389. CHOICE 1
  390.  SET port = LPT1,
  391. CHOICE 2
  392.  SET port = LPT2,
  393. CHOICE 3
  394.  SET port = COM1,
  395. CHOICE 4
  396.  SET port = COM2,
  397. CHOICE 5
  398.  SET port = PRN,
  399. ENDCHOICES
  400.  
  401. CONFIG Printer = "<prn_type>=<port><extra>"
  402.  
  403. CLEAR
  404. TEXT Copying Printer Driver...
  405. SET driver_name = <prn_type>.DRV
  406. GOSUB copy_driver
  407.  
  408. ;----------------------------------------------------------------------------
  409.  
  410. IF "<alter>"=="Y" GOTO done
  411.  
  412. :read_disk
  413. GOSUB need_disk
  414.  
  415. CLEAR
  416. TEXT Installing Application files...
  417. COPY_OPT <insdrive>\DISK<curdisk>\*.* <dest>
  418.  
  419. CALC curdisk = <curdisk> + 1
  420. IF EXISTS <insdrive>MORE GOTO read_disk
  421.  
  422. CONFIG Language = "<def_lang>"
  423. goto DONE
  424.  
  425. :abort
  426. if "<dest>"=="" GOTO nofiles
  427. if "<alter>"=="Y" GOTO nofiles
  428. CLEAR
  429. TEXT \n\n!!! Installation Aborted !!!\n\n
  430. ----   Removing any copied files...
  431. UNCOPY
  432. :nofiles
  433. CLEAR
  434. TEXT \n\n!!! Installation Aborted !!!\n\n
  435. goto END
  436.  
  437. :copy_driver
  438. IF EXISTS <ins>\<driver_name> GOTO ok_copy
  439. CALC curdisk = <curdisk> + 1
  440. GOSUB need_disk
  441. GOTO copy_driver
  442. :ok_copy
  443. COPY <ins>\<driver_name> <dest>
  444. RETURN
  445.  
  446. :need_disk
  447. IF DIREXISTS <insdrive>\DISK<curdisk> DO RETURN
  448. :retry_disk2
  449. CLEAR
  450. TEXT Insert Install Disk Number <curdisk> and press ┘ (Enter) when ready.
  451. WAIT
  452. IF DIREXISTS <insdrive>\DISK<curdisk> DO RETURN
  453.  
  454. CLEAR
  455. TEXT The disk inserted is not Installation Disk Number <curdisk> !
  456. NEWMENU ?, 3, 15
  457. MENU Retry
  458. MENU Abort
  459.  
  460. CHOICE 1
  461. GOTO retry_disk2
  462. ENDCHOICES
  463.  
  464. ABORT
  465.  
  466. :done
  467. CLEAR
  468. TEXT Updating Configuration
  469. WRITECONFIG <dest>\_DW_.CFG
  470. IF "<alter>"=="Y" GOTO end
  471. WRITEFILE <dstdrive>\<prod>.BAT = <dstdrive>\ncd <path>\nDW\ncd \\n
  472.  
  473. CLEAR
  474. TEXT \n  Installation complete!\n\n
  475. ----A batch file was created in the <dstdrive>\ directory with the name <prod>.\n\n
  476. ----To execute the program, type:\n\n
  477. ----  <prod> ┘ (Enter)\n\n
  478. ----Important: In order for this command to work as shown, you must be in
  479. ---- the <dstdrive>\ directory or have it in your PATH variable.
  480.  
  481. :end
  482. WAIT
  483.  
  484. :end2
  485. CD <$CurDir>
  486.  
  487.