  /*
******************* 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-WIN"
	@Version  = "2.8.8"
	@Subdir   = "\\XWIN"
	@OutDrive = C
	@AssumeHardDisk=1
@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\\xwin.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\\mxwin.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 XWIN.RED
			@File *.* @Out *.*
		@EndLib
	@Endif

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

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

		@BeginLib MISC.RED
			@File *.* @Out LIB\FONTS\MISC\*.*
		@EndLib
	@Endif
@EndDisk


@Finish
	@If (18 [! @Option)

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

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

		/* Set-up the group and add an item to that group */
		@ProgramManager("[CreateGroup (XX-Win)][AddItem(@OutDrive:\\@Subdir\\xwin.exe,X-Win)]")

	@Endif
@EndFinish

