/*
 INSTALL.DAT

 Project: WinSprint 1000i Series Windows 8-bit drivers
 Version: 2.04 with Image PowerPack, EnergyStar, and 
	  Keyfile drivers 


*/

@DefineProject
	@AssumeHardDisk = 1
	@Requires @HardDisk
	@Name = "WinSprint 1000i Series Windows Drivers" 
	@Version = "2.04"
	@Subdir = "\\WS1000i"
	@OutDrive = C
@EndProject

@DefineVars
	@Integer @Red        = @RGB(255,0,0)
	@Integer @Green      = @RGB(0,255,0)
	@Integer @Blue       = @RGB(0,0,255)
	@Integer @Black      = @RGB(0,0,0)
	@DRIVE   @WINDRV     = C
	@DIR     @WINDIR     = "\\WS1000i"
	@DIR     @NEWDIR     = " "
/*      @DRIVE   @KFDRIVE    = C*/
	@QSTRING @KFINIDIR   = @GETENV "KEYFILE"
	@QSTRING @SETUP      = "WSSETUP.EXE"
	@DRIVE @WDLLDRV      = @WindowsDrive
	@DIR   @WDLLDIR      = @WindowsDir
@EndVars

@BackgroundMode(3,@Blue,@Black)
@Display
 This program will install WinSprint 1000i Display Drivers 
 Version 2.04 for Windows 3.1 and ARTIST Graphics' Image 
 PowerPak software onto your computer system. If you use 
 Keyfile, you also have the option of installing the ARTIST 
 Keyfile driver for ARTIST 1000i, 1000 and 1000L Series 
 graphics controllers. 
 
 At any time you may abort installation by selecting the Cancel
 button on the bottom of each text screen.
@Pause
@EndDisplay

NEWDRIVE:  // Goto label for reselecting drive
/*
	wINSTALL will now prompt the end-user for the
	drive where they want to install the Windows
	drivers.
*/
@BackgroundMode(3,@Blue,@Black)
@DlgCtrlSize(0,7,15,14,27)
@GetOutDrive @WINDRV @Prompt = "Enter target drive"
Please select the drive where you want to install the 
WinSprint 1000i Series Display Drivers for Windows files.
@EndOutDrive

/*
	wINSTALL will now prompt the end-user for the
	directory where they want to install the Windows
	drivers.
*/

NEWDIR:
@BackgroundMode(3,@Blue,@Black)
@DlgCtrlSize(0,7,0,8,35)
@GetSubdir @WINDIR @Prompt = "Enter target subdirectory"
Please enter directory where you want to install the
WinSprint 1000i Series Display Drivers for Windows files. 
You can install the files in an existing WinSprint 1000i
Series Windows driver directory or let INSTALL create
a new directory for you.
@EndSubdir


@If (@Exists("@WINDRV:\\@WINDIR"))
	@BackgroundMode(3,@Blue,@Black)
	@DlgCtrlSize(0,5,10,8,30)
	@GetOption @Prompt = "Check Subdirectory"
		The directory you entered already
		exists.  Do you wish to add files 
		to that directory?
	@Option 8 = "Yes, continue"
	@Option 9 = "No, re-enter"
	@EndOption

@If(9 [= @Option)
@GOTO NEWDIR
@EndIf

@EndIf



@GetOption
	@BackgroundMode(3,@Blue,@Black)
	@DlgCtrlSize(0,5,10,8,25)
	@Cls
	Would you like to install the ARTIST display driver 
	for Keyfile?








	Use the up and down cursor keys to scroll through the list of
	options. Press the RETURN key to select an option.

	@Option 500 = "Yes"
	@Option 600 = "No"
@EndOption


@If (500 [= @Option)
@Display
 @Cls
	This program will install the ARTIST Keyfile driver
	onto your system. The installed files will work on 
	ARTIST 1000i, 1000 and 1000L Series graphic controllers.

@Pause
@EndDisplay


@If( @StrLen( @KFINIDIR ) <= 5 )
 @DefineVars
	@DRIVE   @KFDRIVE    = C
	@DIR @KFDIR = @WindowsDir
 @EndVars
	@BackgroundMode(3,@Red,@Black)
	@DlgCtrlSize(0,5,10,8,30)
	@Display
		The Keyfile environment variable
		does not exist.  Please install
		Keyfile before installing the
		ARTIST Keyfile driver.
	@Pause
	@EndDisplay
	
@Else
 @DefineVars
	@DIR @KFDIR = @StrDel( @GETENV "KEYFILE", @StrFind(@KFINIDIR, "\\INIT"), 5 )
	@DRIVE @KFDRIVE      = (@STRINDEX( @GETENV "KEYFILE", 0))
/*      @QSTRING @KFDIR = @STRINDEX (@GETENV "KEYFILE", 0)*/      
 @EndVars
	@SetINI( "Viewers", "TIFF", "ARTVIEW.DLL, Tiff Page", "@KFINIDIR\\keyfile.ini")
@Display
 @Cls
	Your KEYFILE.INI file is being modified to use
	the ARTIST driver.
       

@Pause
@EndDisplay
@EndIf
@EndIf
@BackgroundMode(3,@Blue,@Black)

@DefineDisk
 @Label = "Windows Display Drivers"
  @BeginLib WS1KIWIN.RED
   @File *.* @Out @WINDRV:@WINDIR\*.*
  @ENDLIB
  @BeginLib AESTAR.RED
   @File *.* @Out @WINDRV:@WINDIR\*.*
  @ENDLIB
   @BeginLib IPP.RED
   @File *.* @Out @WINDRV:@WINDIR\*.*
   @ENDLIB
  @BeginLib windll.RED
   @File *.* @Out @WDLLDRV:@WDLLDIR\*.*
  @ENDLIB
  @If (500 [= @Option)
   @BeginLib KEYFILE.RED
   @File *.* @Out @KFDRIVE:@KFDIR\bin\*.*
   @ENDLIB
  @ENDIF
@EndDisk

@Finish
CHDRIVE("@WINDRV")
CHDIR("@WINDIR")
@Programmanager("
	[CreateGroup(WinSprint 1000i)]
	[AddItem(@WINDRV:@WINDIR\\WSSETUP.EXE,WS1000i Setup)]
	[AddItem(@WINDRV:@WINDIR\\SBLOCK.EXE,Starting Block)]
	[AddItem(@WINDRV:@WINDIR\\PWRSAVE.EXE,PowerSave Setup)]
	[AddItem(@WINDRV:@WINDIR\\PWRZOOM.EXE,PowerZoom)]
	[AddItem(@WINDRV:@WINDIR\\CACHE.EXE,PowerCache)]
	[AddItem(@WINDRV:@WINDIR\\AG-VIEW.EXE,PowerView)]
	")

@Cls
The installation program will now automatically 
load the WinSprint 1000i Setup program to allow you 
to configure to your ARTIST Graphics WinSprint 1000i
Series display driver for Windows 3.1.
@Pause

@winexec ("@WINDRV:@WINDIR\\@SETUP") 

@EndFinish
