/*
 *  This INSTALL script will install Mission UFO to a hard disk which
 *  has a minimum of 2.0 megabytes available disk space.
 *
 *  The end-user specifies the output drive and the directory name in the
 *  blocks GetOutDrive and GetSubdir, respectively.
 *
 *  If a removable drive is specified, the installation will abort.
 *
 *  If less than 2,000,000 bytes are available on the hard drive
 *  specified, the installation will abort.
 *
 *  The script checks for a VGA card, which is the minimum graphics
 *  requirement for Mission UFO.  If a VGA card is not detected,
 *  the end-user is warned and given the option to continue or
 *  abort the installation.
 *
 *  First written 5/1/92 by Karin Honkonen.
 */

@DefineProject
     @Name       = "Mission UFO"   // exactly match line 1 of DISK.ID file
     @Version    = "1.0"           // exactly match line 2 of DISK.ID file
     @OutDrive   = C               // default; var is updated in GetOutDrive
     @Subdir     = "\\UFO"         // default; var is updated in GetSubdir
     @InDiskBell = 1               // beep for new input disk
     @Terse                        // suppress status msgs during file copy
     @Verify                       // check integrity of files from library
@EndProject

@Display  // if editing in WP51, change margins to 0.5" (SHFT-F8,1,7)

     This program will install @Name version @Version onto your computer
     system and verify the integrity of the distribution files.

     You need a hard disk with at least 2.0 megabytes (2,000,000 bytes)
     available to install @Name.  You cannot install to floppy disks.

     To run the installed @Name program, you will need a VGA card.
     If a VGA card is not detected by the INSTALL program, you will be
     warned and given the option to abort or continue the installation.
     (Be sure a VGA card is installed in your computer before trying to
     run @Name.)

     You will be asked to choose the hard drive and the directory in which
     @Name will be installed.

     You may quit the installation at any time by pressing the [Esc] key.

     @Pause
@EndDisplay

/*  The spacing of the following GetOutDrive block is critical.
 *  The drive menu box appears on the third line, so two lines
 *  are available above it for the end-user message.  If more
 *  space is required to display messages, place enough blank
 *  lines after the initial message so the additional message
 *  will be displayed below the drive menu box.  Be sure to test
 *  the script if any modifications are made to this block, to
 *  be sure the drive menu box doesn't obscure any of the message
 *  text.  Use the LocalWindow function to move the box if needed.
 *  See the INSTALL User's Manual Version 3.1 pages 149-150.
 *
 *  NOTE:  If the Suppress commands are used to prevent the
 *         end-user from selecting drives A: or B:, then the
 *         commands must be placed on the same line as the
 *         GetOutDrive command, or underneath the message text,
 *         so the message text spacing will not be disturbed.
 *         (If placed on separate lines under the GetOutDrive
 *         command, they WILL cause two blank lines to be displayed.)
 */

@GetOutDrive @Suppress A @Suppress B
     Use the arrow keys to position the FLASHING box over the hard drive on
     which @Name will be installed, then press the [Enter] key.
@EndOutDrive

/*  The Removable function returns non-zero value if drive is removable,
 *  and returns 0 if drive is not removable.
 */

@If ( @Removable )   // INSTALL aborts if floppy drive selected.
     @Display
     You have selected drive @OutDrive:, which is not a hard drive.
     You can't install @Name onto a floppy drive!

     This installation program will now exit.


          @Abort
     @EndDisplay
@EndIf

@If ( @DiskFree @OutDrive < 2000000  )  // INSTALL aborts if less than 2.0 MB
     @Display

     You have selected drive @OutDrive:, which has insufficient space
     available.  @Name version @Version requires a minimum of
     2,000,000 bytes (2.0 megabytes).

     This installation program will now exit.  Please be sure at least
     2.0 megabytes (2,000,000 bytes) are available on the hard disk you
     wish to select, then run the INSTALL program again.

          @Pause
          @Abort
     @EndDisplay
@EndIf

/*  The following block will check for a VGA card, and warn the end-user if
 *  it is not detected.  Since some valid VGA cards may not be detected by
 *  the VideoCard function, or the end-user may modify hardware components
 *  after the software is installed, this installation will not abort if
 *  VGA is not detected; a warning will be displayed and the end-user will
 *  be given the option to continue the installation, or to abort by pressing
 *  the [Esc] key.
 */

 @If ( @VideoCard != 'V' )
     @Display

     The INSTALL program has not detected a VGA (Video Graphics Array)
     video adapter card on your computer system.

     @Name version @Version requires VGA graphics capability to run.
     Please be sure your system has a VGA card and a VGA monitor
     before you try to run @Name version @Version.

     If you wish to abort the installation procedure now,
     please press the [Esc] key.

     If you believe the INSTALL program is in error and you do have VGA,
     you may continue the installation by pressing any other key now.

          @Pause
     @EndDisplay
@EndIf

@GetSubdir

     If you wish to install @Name to a directory named @Subdir,   
     press the [Enter] key.  If you wish to change the default name, 
     press the [Backspace] key (do not erase the first backslash) and
     type a new name; then press the [Enter] key.



     @Prompt = "     Which directory ( [Enter] = @Subdir )?     "
@EndSubdir

@DefineDisk
     @Label = "Installation Disk 1"  // exactly match line 3 of DISK.ID 
     @BeginLib MUFO.LIF
          @File *.* 
     @EndLib
     @File MUFO.001 @Out UFO.GXL @Decompress
@EndDisk

@DefineDisk
     @Label = "Installation Disk 2"  // exactly match line 3 of DISK.ID
     @File MUFO.002 @AppendTo UFO.GXL @Decompress
@EndDisk

@DefineDisk
     @Label = "Installation Disk 3"  // exactly match line 3 of DISK.ID
     @File MUFO.003 @AppendTo UFO.GXL @Decompress
@EndDisk

@DefineDisk
     @Label = "Installation Disk 4"  // exactly match line 3 of DISK.ID
     @File MUFO.004 @AppendTo UFO.GXL @Decompress
@EndDisk

@Finish

     @Name version @Version has been successfully installed onto your
     computer system.  Please remove the last Installation Disk from
     the floppy drive now, and place the set of Installation Disks in
     a safe place (away from heat, direct sunlight, magnetic fields
     such as in a telephone or electric appliance).  You may reinstall
     from these disks if your working copy becomes damaged.
     
     To run @Name, first change to the drive on which you installed
     @Name, then change directory to the @Name directory
     name you selected, then type the program name ("UFO").

     Type    @OutDrive:    and press the [Enter] key.

     Type    CD@Subdir    and press the [Enter] key.

     Type    UFO    and press the [Enter] key.

          @Pause
@EndFinish
