/*
 * Project: Loremaster I: Send For The Loremaster
 * Version: 1
 *
 */

@DefineProject
	@Name = "Loremaster I: Send For The Loremaster."
	@Version = "1"
	@Immediate = 1
	@Subdir = "\\LM1"
	@OutDrive = y
	@Requires @HardDisk
        @Verify
        @Outdiskbell = 1
@EndProject

@GetOutDrive
	@Suppress z
	@Suppress b
	@Suppress a
	@Cls
	On which disk drive do you wish to install
        @Name?
@EndOutDrive

@SetAutoexec
	@AskOverwrite
	@Path = "@OutDrive:@Subdir\\EXE;@OutDrive:@Subdir\\DAT"
	@Verbatim "REM **LM1: lm1-exe & lm1-dat have been added to the path."
@EndAutoexec

@Display
	@Cls
	This program will install:
	@Name Version @Version
        in the subdirectory @Subdir of your hard disk and verify the integrity
        of the distribution disk(s).  You may press the [Esc] key at any time
        to abort the installation.

	The installation process will ask you questions about your
        computer hardware and verify that the equipment on your system
        will support the installation and execution of "Loremaster".

	Each question has a default answer.  If the default answer is
	correct, press the ENTER key in response to the question.
	Otherwise, type the answer and then press the ENTER key.

	If you make a mistake while typing, press the BACKSPACE key
	and then retype the answer.
	@Pause
@EndDisplay

@Display
/*
	@Cls
	Your system configuration is:
		 DOS Version: @OSMajor.@OSMinor
		 EMM Version: @EMMMajor.@EMMMinor
    EMM Available (in bytes): @EMMAvail
    EMM Installed (in bytes): @EMMTotal
    RAM Installed (in bytes): @RAMTotal
    RAM available (in bytes): @RAMAvail
		 Input drive: @InDrive
		Output drive: @OutDrive
	You are running on an 80@CPU CPU
	@Pause
	@Cls

    ANSI.SYS IS @If(@ANSIsys == 0) NOT @EndIf Installed
    Your Keyboard IS @If (@Keyboard == 0) NOT @EndIf Enhanced
    NetBIOS IS @If (@NetBIOS != 0) NOT @EndIf Installed

	      The current video mode number: @VideoMode
			 Video adapter card: @If(@VideoCard == 'M') MONO @ElseIf
				(@VideoCard == 'C') COLOR @ElseIf
			(@VideoCard == 'V') VGA @ElseIf
			(@VideoCard == 'E') EGA @EndIf
			      Video display: @If(@VideoMonitor == 'C') COLOR @ElseIf
				       (@VideoMonitor == 'M') MONO @ElseIf
		       (@VideoMonitor == 'H') ENHANCED @EndIf
		 The amount of video RAM is: @VideoRAM K
    The highest resolution graphics mode is: @VideoGraph
@Pause
*/
Checking DOS version & EMS available...
@If (@OSMajor < 3 || (@OSMajor == 3 && @OSMinor < 30))
        @Cls
	@Name requires that your operating system version be at least 3.30.
	Your are currently running version @OSMajor.@OSMinor. Loremaster
        is configured to make maximum use of MSDOS 5.0's LOADHIGH, EMM386,
        and SMARTDRV features and will not work properly on versions older
        than 3.3, please consider upgrading to a more current OS.
	@Pause  @Abort
@ElseIf (@EMMAvail < 1000000)
        @Cls
	Your system has @EMMAvail bytes of EMS memory available.  This is
	not sufficient for @Name
        which requires 1.0MB of EMS, installation stopped.
	@Pause  @Abort
@EndIf

@If (@DiskFree @OutDrive < 20000000)
        @If(@Exists "@OutDrive:\\@SubDir\\EXE\\LM1*.*")
            @Delete  ("@OutDrive:\\@SubDir\\EXE\\LM1*.*")
            @Delete  ("@OutDrive:\\@SubDir\\EXE\\Load*.dat")
        @EndIf
        @If(@Exists "@OutDrive:\\@SubDir\\DAT\\LM1*.*")
            @Delete  ("@OutDrive:\\@SubDir\\DAT\\LM1*.*")
        @EndIf
@EndIf

Checking DOS memory and hard drive space available...
@If (@DiskFree @OutDrive < 20000000)
        @Cls
	Your hard disk does not have enough free space to install
        @Name
        This software requires 20MB of free disk space, installation stopped.
	@Pause  @Abort
@ElseIf (@RamAvail < 575000 )
        @Cls
	Your system has @RamAvail bytes of DOS memory available.  This is
	not sufficient to run the Loremaster software.
        Loremaster requires a minimum of 575K to run. Try removing TSR's
        or using the DOS DeviceHigh & LoadHigh statements.
	@Pause  @Abort
@EndIf

Checking Video display for color VGA...
@If (@VideoCard != 'V')
        @Cls
	Your system does not have a VGA video card available.  This prevents
	@Name
        from running on your system. VGA and SVGA is required for Loremaster.
	@Pause  @Abort
@ElseIf (@VideoMonitor == 'M')
        @Cls
	Your system does not have a color video monitor available.
	This prevents @Name
        from running on your system.
	@Pause  @Abort
@EndIf

Checking CPU for 80286 or higher & LIM EMS version...
@If (@CPU < 286)
        @Cls
	Your system is earlier than an 80286, the software requires an 80286
	20MHZ as the minimum processor configuration.
	This prevents @Name
        from running on your system.
	@Pause  @Abort
@ElseIf (@EMMMajor < 4)
        @Cls
	This application requires a LIM EMS manager of version 4 or better.
	The EMS manager version  prevents
        @Name
        from running on your system. Please upgrade your EMS driver.
	@Pause  @Abort
@EndIf

@If (@NetBIOS != 0)
        @Cls
	WARNING @Name
        is not intended for a netbios networked system, it is recommeded
        that you take the network down prior to running LM1.
	@Pause
@ElseIf (@MCBSignature(1,"LANtastic"))
        @Cls
	WARNING @Name
        is not intended for a Lantastic networked system, we recommend that
        you take this PC off the network before running LM1.
	@Pause
@EndIf

Checking  for disk caching software...
@If (@MCBSignature(1,"SMARTDRV"))
        @Cls
	Smartdrv is present, excellent, "Loremaster I"
        is intended for use on a diskcached system,
        we recommend a minimum cache size of 512KB.
	@Pause
@Else
        @cls
	*PLEASE NOTE* @Name
        is intended for use on a diskcached system, if your system has
	SMARTDRV, we recommend configuring it with a minimum 512KB cache
        size.
	@Pause
@EndIf
	Your computer will support the installation and execution of
        @Name.
        The install program will now copy and expand the LM1 files
        to your hard disk. This process will take approximately 20
        minutes to complete. If you have not made backup copies of
        your disketts, you should consider doing so.  Please note,
        however, LM1 must be installed, for the first time, from the
        original product disketts.
	@Pause
@EndIf
@EndDisplay

@Display
   @Cls
   Copying the game...
   @MkDir("@OutDrive:\\@SubDir\\EXE")
   @MkDir("@OutDrive:\\@SubDir\\DAT")
   @Copy("@InDrive:\\LM1.EXE", "@OutDrive:\\@SubDir\\EXE\\LM1.EXE")
   @Copy("@InDrive:\\LM1_1.EXE", "@OutDrive:\\@SubDir\\EXE\\LM1_1.EXE")
   last copy step in progress...
   @Copy("@InDrive:\\LM1_1.OVR", "@OutDrive:\\@SubDir\\EXE\\LM1_1.OVR")
   @Copy("@InDrive:\\LOADDATA.DAT", "@OutDrive:\\@SubDir\\EXE\\*.*")
   @Copy("@InDrive:\\Myth.DAT", "@OutDrive:\\@SubDir\\DAT\\*.DAT")
   @Copy("@InDrive:\\GM.DAT", "@OutDrive:\\@SubDir\\DAT\\*.DAT")
   Transferring execution authorization,...patience...
@EndDisplay

@DefineDisk
	@Label = "Disk #1"
	@BeginLib LM1.001
		@F 0 @S 9506308 @O ..\LM1\EXE\LM1_DB.001
	@EndLib
@EndDisk

@DefineDisk
	@Label = "Disk #1"
	@BeginLib LM1.002
		@F 0 @A ..\LM1\EXE\LM1_DB.001
	@EndLib
@EndDisk

@DefineDisk
	@Label = "Disk #1"
	@BeginLib LM1.003
		@F 0 @A ..\LM1\EXE\LM1_DB.001
	@EndLib
@EndDisk

@DefineDisk
	@Label = "Disk #1"
	@BeginLib LM1.004
		@F 0 @A ..\LM1\EXE\LM1_DB.001
		@F 1 @S 9361932 @O ..\LM1\DAT\LM1_DB.002
		@F 2 @S 744021 @O ..\LM1\DAT\LM1_DB.003
	@EndLib
@EndDisk

@Finish
   @ChDrive(@OutDrive)
   @ChDir("@OutDrive:\\@SubDir\\EXE")
   @Cls
   The installation of Loremaster is complete.
   To start the game, make sure you are in the \lm1\exe directory
   then type LM1 and press the carriage return key.
   Good luck & Have fun!
   @Pause
@EndFinish

/* end-of-file */