home *** CD-ROM | disk | FTP | other *** search
- ; CD Answer Installation Script - Generic jdk
- ; <<CDA>> Feb 5 1991;2.03
-
- ; single/multiple disk version
- ;
- ; To customize this install script:
- ; 1. Put the product name (1-8 characters) in a file called
- ; 'PRODNAME'. There should be no carriage return/line feed at
- ; the end of the name- the file should contain just the characters
- ; of the name.
- ; 2. Put the application name (CD Author 4 character project identifier)
- ; in a file called 'APPLNAME'. Again, no other chars should be
- ; the file. Multiple applications are formed by adding a space,
- ; then another application identifier
- ; 3. Put the start-up message in a file called PRODSCRN.<language>
- ; There should not be more than 10 lines.
- ;
- ; The first disk must contain the \INSTALL directory.
- ; This contains the general system files for the install
- ; process and may be repeated on disk #2, etc.
- ; The application specific files are kept in a directory
- ; named 'DISK1'. If additional disks are required, create
- ; an (empty) file on the current disk named '\MORE' and
- ; put the overflow files in a directory named \DISK2 (3, 4, ...).
-
- BREAK abort
-
- ; install disk
- PARSE_PATH <$ProgDir>
- SET insdrive = <$Drive>
- SET ins = <insdrive>\INSTALL
- SET curdisk = 1
- GOSUB need_disk
-
- ; here are some defaults:
-
- ; default destination drive
- PARSE_PATH <$CurDir>
- SET def_dest = C:\
- IF NOT "<$Drive>"=="<insdrive>" DO SET def_def = <$Drive>
-
- ; default CD-ROM interface (FS_HSGEN {High Sierra} or FS_ISGEN {ISO})
- SET def_cdtype = High Sierra
- SET def_driver = FS_HSGEN
- IF EXISTS <insdrive>\INSTALL\<def_driver>.* GOTO ok_driver
- SET def_cdtype = ISO
- SET def_driver = FS_ISGEN
- :ok_driver
-
- ; language
- SET def_lang = <$Language>
-
- ; application name(s) (4 char ident(s) on CD-ROM)
- READFILE names = <ins>\APPLNAME.
-
- ; product name (application name for batch file, subdirectory name)
- READFILE prod = <ins>\PRODNAME.
-
- ; default dest drive and directory
- PARSE_PATH <def_dest><prod>.CD
- SET dstdrive = <$Drive>
- SET path = <$Dir>
- CD <dstdrive>\
-
- ; read and display Application Installation Screen
- IF NOT EXISTS <insdrive>\DISK1\PRODSCRN.<def_lang> GOTO no_banner
- READFILE screen = <insdrive>\DISK1\PRODSCRN.<def_lang>
- GOTO show_banner
- :no_banner
- SET screen =
- ---- CD Answer Installation for:\n\n
- ---- <prod>\n\n
- ---- Application(s): <names>
- :show_banner
- CLEAR
- TEXT <screen>
- SET screen =
- WAIT
-
- SET def_drive=<dstdrive>
- SET def_path=<path>
-
- GOTO okdir
- :getdir
- CLEAR
- TEXT \nError -\n\n
- ---- The path "<dstdrive><path>" is not allowed!\n
- ----There must be both a drive and a valid subdirectory name in order
- ---- to install the software.
- WAIT
- :okdir
- CLEAR
- TEXT The retrieval software must be installed on your hard disk or on a
- ---- formatted floppy disk. The standard values are drive <def_drive> (normally
- ---- the hard disk), and a subdirectory named <def_path>. To use these values,
- ---- press the ┘ (Enter) key twice. To alter them, type the new drive or
- ---- subdirectory at the appropriate prompt, then type ┘ (Enter).
-
- INPUT 6,6,5 dstdrive = Install on drive ?
- INPUT 6,8,40 path = Install in directory ?
- SET dest = <dstdrive><path>
- SET confile = <ins>\_DW_.CFG
-
- IF "<dstdrive>"=="" GOTO getdir
- IF "<path>"=="\" GOTO getdir
- IF "<path>"=="" GOTO getdir
- IF NOT DIREXISTS <dstdrive>\ GOTO getdir
-
- CD <dstdrive>\
-
- IF NOT DIREXISTS <dest> GOTO nopath
- IF NOT EXISTS <dest>\DW.EXE GOTO nopath
- CLEAR
- TEXT The directory "<dest>" already exists.
- NEWMENU ?, 3, 54
- MENU Remove the old version; install new version
- MENU Remove the old version; do not install new software
- MENU Alter configuration; do not copy software
- MENU Stop the installation without making any changes
-
- CHOICE 1
- CLEAR
- TEXT Deleting previous contents of <dest>...
- FOREACH name = <names>
- DEL <dest>\<name>*.*
- NEXT
- DEL <dest>\FS_*.DRV
- DEL <dest>\SC_*.DRV
- DEL <dest>\PR_*.DRV
- DEL <dest>\GR_*.DRV
- DEL <dest>\_DW_*.*
- DEL <dest>\DW.EXE
- DEL <dest>\UPDATE.EXE
- GOTO okpath
-
- CHOICE 2
- CLEAR
- TEXT Removing <dest> directory...
- FOREACH name = <names>
- DEL <dest>\<name>*.*
- NEXT
- DEL <dest>\FS_*.DRV
- DEL <dest>\SC_*.DRV
- DEL <dest>\PR_*.DRV
- DEL <dest>\GR_*.DRV
- DEL <dest>\_DW_*.*
- DEL <dest>\DW.EXE
- DEL <dest>\UPDATE.EXE
- IF NOT EXISTS <dest>\*.* GOTO remdest
- TEXT <dest> directory has unknown files, directory not removed!!
- WAIT
- GOTO norem
- :remdest
- RD <dest>
- :norem
- DEL <dstdrive>\<prod>.BAT
- GOTO end2
-
- CHOICE 3
- SET alter = Y
- SET confile = <dest>\_DW_.CFG
- GOTO okpath
-
- CHOICE 4
- GOTO end2
- ENDCHOICES
-
- :nopath
- MD <dest>
- IF NOT DIREXISTS <dest> GOTO getdir
- :okpath
-
- IF NOT EXISTS <confile> GOTO no_config
- DISP 5,14 Reading configuration...
- READCONFIG <confile>
- :no_config
-
- HSCOUNT hs
- IF NOT <hs>==0 GOTO have_hs
-
- CLEAR
- TEXT Problem- You have no CD-ROM drives installed.\n\n
- ----Please use the install disk supplied by your CD-ROM drive manufacturer
- ---- to install the device driver software, and then repeat this install
- ---- program.\n\n
- ----Note: The CD-ROM drive install disk will copy some files to your system
- ---- disk and modify the CONFIG.SYS and AUTOEXEC.BAT files.\n
- ----Unless you have other programs which use the MSCDEX program, it is
- ---- recommended that you remove the line calling this program from your
- ---- AUTOEXEC.BAT file, since this software does not require it.\n\n
- ----Be sure to reboot after the CD-ROM drivers are installed.
- WAIT
- ABORT
-
- :have_hs
-
- SET msg =
- IF <hs>==1 GOTO instOne
-
- TEXT A selection of <def_cdtype> CD-ROM drivers are available:\n\n
- ----Select the <def_cdtype> CD-ROM device driver from this list of available
- ---- device drivers using the and keys. Press ┘ (Enter) when ready.\n
- ----Press Esc to abort installation.
- GOTO instMore
-
- :instOne
- SET msg = A <def_cdtype> CD-ROM driver is installed (see CONFIG.SYS):\n\n
-
- :instMore
- HSDRIVER hsname = 25, 6
- CONFIG Driver = "<def_driver>=<hsname>"
- CLEAR
- TEXT <msg>The <def_cdtype> CD-ROM driver selected is named "<hsname>". If this is not
- ---- correct, press Esc to abort the installation and check your CONFIG.SYS
- ---- file.\n\n
- ----This software does NOT require the MSCDEX.EXE program (Microsoft
- ---- CD-ROM Extensions). Unless another program requires them, you may
- ---- remove this program from your \AUTOEXEC.BAT file (where the drive's
- ---- INSTALL program may have put it).
- WAIT
-
- CLEAR
- TEXT Copying <def_cdtype> CD-ROM Interface...
- SET driver_name = <def_driver>.DRV
- GOSUB copy_driver
-
- ;----------------------------------------------------------------------------
-
- CLEAR
- TEXT Display Choices:\n
- ---- Use the and arrows to select a screen type and
- ---- press ┘ (Enter)
-
- NEWMENU ? 6 46
- MENU Standard Screen - No graphics
- MENU Hercules Graphics Card
- MENU CGA Adaptor
- MENU Olivetti, AT&T or Compaq Plasma
- MENU EGA Adaptor
- MENU MCGA Adaptor
- MENU VGA Adaptor
-
- IF "<$Screen:1:3>"=="HER" DO MENU_DEFAULT 2
- IF "<$Screen:1:3>"=="CGA" DO MENU_DEFAULT 3
- IF "<$Screen:1:3>"=="EGA" DO MENU_DEFAULT 5
- IF "<$Screen:1:4>"=="MCGA" DO MENU_DEFAULT 6
- IF "<$Screen:1:3>"=="VGA" DO MENU_DEFAULT 7
-
- SET Port = N
- SET Graphic = N
-
- CHOICE 1
- SET scr_type = SC_STD
- CHOICE 2
- SET scr_type = SC_HERC
- SET Port = ?
- CHOICE 3
- SET scr_type = SC_CGA
- SET Port = ?
- SET Graphic = ?
- CHOICE 4
- SET scr_type = SC_ATT
- SET Port = ?
- SET Graphic = ?
- CHOICE 5
- SET scr_type = SC_EGA
- SET Port = ?
- SET Graphic = ?
- CHOICE 6
- SET scr_type = SC_MCGA
- SET Port = ?
- CHOICE 7
- SET scr_type = SC_VGA
- SET Port = ?
- SET Graphic = ?
- ENDCHOICES
-
- SET extra =
- IF NOT "<Port>" == "?" GOTO no_flash
-
- CLEAR
- TEXT Display Detail Choices:\n
- ---- Use the and arrows to select screen option and
- ---- press ┘ (Enter)
-
- NEWMENU ? 6 46
- MENU Standard Color or Monochrome Monitor
- MENU Portable Computer - Built-in Monochrome monitor
- IF "<Graphic>"=="?" DO MENU Use graphic mode only
- IF "<scr_type>"=="SC_CGA" DO MENU Older Color Screens - interference or "snow"
-
- IF "<$Screen:-4>"=="PORT" DO MENU_DEFAULT 2
-
- CHOICE 2
- SET extra = P
- CHOICE 3
- SET extra = G
- CHOICE 4
- SET extra = F
- ENDCHOICES
-
- :no_flash
-
- CONFIG Screen = "<scr_type>=<extra>"
-
- CLEAR
- TEXT Copying Screen Driver...
- SET driver_name = <scr_type>.DRV
- GOSUB copy_driver
-
- ;----------------------------------------------------------------------------
-
- CLEAR
- TEXT Printer Choices:\n
- ---- Use the and arrows to select a printer type and
- ---- press ┘ (Enter)
-
- NEWMENU ? 6 46
- MENU Printer w/o graphics
- MENU HP LaserJet 150 DPI
- MENU HP LaserJet 300 DPI
- MENU HP LaserJet with JLaser
- MENU Canon LBP with JLaser
-
- SET extra =
- CHOICE 1
- SET prn_type = PR_STD
- SET extra = ?2
- CHOICE 2
- SET prn_type = PR_PCL15
- SET extra = ?1
- CHOICE 3
- SET prn_type = PR_PCL30
- SET extra = ?1
- CHOICE 4
- SET prn_type = PR_JLHP
- SET extra = ?1
- CHOICE 5
- SET prn_type = PR_JLCAN
- ENDCHOICES
-
- IF NOT "<extra>"=="?1" GOTO pr_type_1
- CLEAR
- TEXT Printer Detail Choices:\n
- ---- Use the and arrows to select printer option and
- ---- press ┘ (Enter)
-
- NEWMENU ? 6 46
- MENU HP Roman-8 character set (std)
- MENU HP PC-8 character set (LJ II/III only)
-
- SET extra =
- CHOICE 1
- SET extra = R
- CHOICE 2
- SET extra = X
- ENDCHOICES
- :pr_type_1
-
- IF NOT "<extra>"=="?2" GOTO pr_type_2
- CLEAR
- TEXT Printer Detail Choices:\n
- ---- Use the and arrows to select printer option and
- ---- press ┘ (Enter)
-
- NEWMENU ? 6 46
- MENU PC 8 bit character set (std)
- MENU 7 bit National character set
-
- SET extra =
- CHOICE 2
- SET extra = 7
- ENDCHOICES
- :pr_type_2
-
- SET port =
- NEWMENU ? 6 40
- MENU LPT1 Parallel Printer # 1
- MENU LPT2 Parallel Printer # 2
- MENU COM1 Serial Printer # 1
- MENU COM2 Serial Printer # 2
- MENU PRN DOS current printer
-
- CLEAR
- TEXT Printer Connection Choices:\n
- ---- Use the and arrows to select a printer port and
- ---- press ┘ (Enter)
-
- CHOICE 1
- SET port = LPT1,
- CHOICE 2
- SET port = LPT2,
- CHOICE 3
- SET port = COM1,
- CHOICE 4
- SET port = COM2,
- CHOICE 5
- SET port = PRN,
- ENDCHOICES
-
- CONFIG Printer = "<prn_type>=<port><extra>"
-
- CLEAR
- TEXT Copying Printer Driver...
- SET driver_name = <prn_type>.DRV
- GOSUB copy_driver
-
- ;----------------------------------------------------------------------------
-
- IF "<alter>"=="Y" GOTO done
-
- :read_disk
- GOSUB need_disk
-
- CLEAR
- TEXT Installing Application files...
- COPY_OPT <insdrive>\DISK<curdisk>\*.* <dest>
-
- CALC curdisk = <curdisk> + 1
- IF EXISTS <insdrive>MORE GOTO read_disk
-
- CONFIG Language = "<def_lang>"
- goto DONE
-
- :abort
- if "<dest>"=="" GOTO nofiles
- if "<alter>"=="Y" GOTO nofiles
- CLEAR
- TEXT \n\n!!! Installation Aborted !!!\n\n
- ---- Removing any copied files...
- UNCOPY
- :nofiles
- CLEAR
- TEXT \n\n!!! Installation Aborted !!!\n\n
- goto END
-
- :copy_driver
- IF EXISTS <ins>\<driver_name> GOTO ok_copy
- CALC curdisk = <curdisk> + 1
- GOSUB need_disk
- GOTO copy_driver
- :ok_copy
- COPY <ins>\<driver_name> <dest>
- RETURN
-
- :need_disk
- IF DIREXISTS <insdrive>\DISK<curdisk> DO RETURN
- :retry_disk2
- CLEAR
- TEXT Insert Install Disk Number <curdisk> and press ┘ (Enter) when ready.
- WAIT
- IF DIREXISTS <insdrive>\DISK<curdisk> DO RETURN
-
- CLEAR
- TEXT The disk inserted is not Installation Disk Number <curdisk> !
- NEWMENU ?, 3, 15
- MENU Retry
- MENU Abort
-
- CHOICE 1
- GOTO retry_disk2
- ENDCHOICES
-
- ABORT
-
- :done
- CLEAR
- TEXT Updating Configuration
- WRITECONFIG <dest>\_DW_.CFG
- IF "<alter>"=="Y" GOTO end
- WRITEFILE <dstdrive>\<prod>.BAT = <dstdrive>\ncd <path>\nDW\ncd \\n
-
- CLEAR
- TEXT \n Installation complete!\n\n
- ----A batch file was created in the <dstdrive>\ directory with the name <prod>.\n\n
- ----To execute the program, type:\n\n
- ---- <prod> ┘ (Enter)\n\n
- ----Important: In order for this command to work as shown, you must be in
- ---- the <dstdrive>\ directory or have it in your PATH variable.
-
- :end
- WAIT
-
- :end2
- CD <$CurDir>
-