/*
 INSTALL.DAT

 Project: Xj1000 Series Windows 8-bit drivers
 Version: 2.04 with PowerZoom & EnergyStar 
	  drivers 


*/

@DefineProject
	@AssumeHardDisk = 1
	@Requires @HardDisk
	@Name = "Xj1000 Series Windows Drivers" 
	@Version = "2.04"
	@Subdir = "\\Xj1000"
	@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     = "\\Xj1000"
	@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 ARTIST Xj1000 Display Drivers 
 Version 2.04 for Windows 3.1 onto your computer system.  
 
 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 
ARTIST Xj1000 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
ARTIST Xj1000 Series Display Drivers for Windows files. 
You can install the files in an existing ARTIST Xj1000
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 XJ1KWIN.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(ARTIST Xj1000)]
	[AddItem(@WINDRV:@WINDIR\\WSSETUP.EXE,Xj1000 Setup)]
	[AddItem(@WINDRV:@WINDIR\\SBLOCK.EXE,Starting Block)]
	[AddItem(@WINDRV:@WINDIR\\PWRSAVE.EXE,PowerSave Setup)]
	[AddItem(@WINDRV:@WINDIR\\PWRZOOM.EXE,PowerZoom)]
	")

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

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

@EndFinish
