 /*
  *********************** Options *****************************************
@Option 8 = "Don't reinstall the X server"
@Option 7 = "Reinstall the X server"
@Option 18 = "Don't reinstall the X configuration file"
@Option 17 = "Reinstall the X configuration file"
@Option 51 = "No, don't install the fonts."
@Option 50 = "Yes, reinstall the fonts."
  **************************************************************************
  */
@DefineProject
	@Name     = "X-WIN32"
	@Version  = "3.1.X"
	@Subdir   = "\\XWIN32"
	@OutDrive = C
	@Requires @HardDisk
	@AssumeHardDisk=@TRUE
@EndProject


@DefineVars
 	@Drive @WDrive = @WindowsDrive
 	@Dir   @WDir   = @WindowsDir
@EndVars


@GetOutDrive
	@DLGCTRLSIZE(0,4,4,10,40)
	@Suppress A
	@Suppress B
	@Cls
	On which disk drive do you wish to install @Name?
@EndOutDrive


@GetSubdir
	@DLGCTRLSIZE(0,4,4,5,40)
	@Cls
	Enter directory on drive @OutDrive in which to install @Name.
	Start your entry with a backslash (\). 
@EndSubdir


@If (@Exists ("@OutDrive:@SubDir\\xwin32.exe"))
	@GetOption
	@DLGCTRLSIZE(0,4,4,10,40)
	@Cls
	The X server and support programs are already installed.  

	@Option 8 = "Don't reinstall the X server"
	@Option 7 = "Reinstall the X server"

	@EndOption
@EndIf


@If (@Exists ("@WDrive:@WDir\\xwin32.ini"))
	@GetOption
	@DLGCTRLSIZE(0,6,4,10,60)
	@Cls
	An X server configuration file has previously been installed.
	If you choose to replace it, you will lose any configured
	sessions, xhosts info, and start-up data.


	@Option 18 = "Don't reinstall the X configuration file"
	@Option 17 = "Reinstall the X configuration file"

	@EndOption
@EndIf


@If (@Exists ("@OutDrive:@SubDir\\LIB\\FONTS\\MISC\\fonts.dir"))
	@GetOption
	@DLGCTRLSIZE(0,4,4,10,40)
	@Cls
	X fonts are already installed.
	
	@Option 51 = "No, don't install the fonts."
	@Option 50 = "Yes, reinstall the fonts."

	@EndOption
@Endif



@DefineDisk
	@Label  = "Disk 1"

	@If (8 [! @Option)

		@BeginLib LIB.RED
			@File *.* @Out LIB\*.*
		@EndLib

		@BeginLib XWIN32.RED
			@File xwin32.exe @Out *.*
			@File mkfondir.exe @Out *.*
			@File bdftofon.exe @Out *.*
			@File bdftopcf.exe @Out *.*
			@File xutil.exe @Out *.*
			@File VBRUN300.DLL @Out @WDrive:@WDir\*.*
			@File xwin32.hlp @Out *.*
			@File XWIN32.INI @Out *.*
		@EndLib
	@Endif

	@If (18 [! @Option)
		@BeginLib XWIN32.RED
			@File XWIN32.INI @Out @WDrive:@WDir\*.*
		@EndLib
	@Endif

	@If (51 [! @Option)
		@BeginLib MISC.RED
		@File *.* @Out LIB\FONTS\MISC\*.*
		@EndLib

		@BeginLib 75DPI.RED
		@File *.* @Out LIB\FONTS\75DPI\*.*
		@EndLib
 /* 
  *   ---------------------------------------------
  *		@BeginLib 100DPI.RED
  *		@File *.* @Out LIB\FONTS\100DPI\*.*
  *		@EndLib
  *   ---------------------------------------------
  */
	@Endif

@EndDisk



@Finish
	@If (18 [! @Option)

		/* Modify XWIN32.INI - Directory line */
		@SetINI ("settings", "directory", "@OutDrive:\\@SubDir\\LIB", "XWIN32.INI")

		/* Modify XWIN32.INI - Fontpath line */
		@SetINI ("settings", "fontpath", "@OutDrive:\\@SubDir\\LIB\\FONTS\\MISC,@OutDrive:\\@SubDir\\LIB\\FONTS\\75DPI", "XWIN32.INI") 

		/* Set-up the group and add an X-Win to tht group */
		/* Add X-Util to the previouly made group         */
		@ProgramManager("[CreateGroup (X-Win32)] [AddItem(@OutDrive:\\@Subdir\\xwin32.exe, X-Win32)] [AddItem(@OutDrive:\\@Subdir\\xutil.exe, X-Util)]")
	@Endif
@EndFinish

