@DefineProject
	@Name   = "INSTALLX"
	@Version = "1.7.3"
	@SubDir = "XDOS"
	@OutDrive = C
	@Requires @HardDisk
@EndProject

@DefineVars
	@Qstring @MxClr     = "x3c"
	@Qstring @MxMon     = "x3m"

	@Qstring @VgaDriver = "STDVGA.DRV"
	@Qstring @TcpDriver = "SNTCP.NET"

	@Qstring @HostName  = ""
	@Qstring @HostLogin = ""
	@Qstring @HostCmd   = ""
	@Qstring @Null      = ""

	@Qstring @MxRxx     = "rsh"
	@Qstring @MxExe     = ""
	@Qstring @MxSu      = "-su"
	@Qstring @MxMode    = "-mode 1"
	@Qstring @MxXdm     = ""
	@Qstring @MxRun     = "-once"

	@Qstring @X11       = @GetEnv "X11"
	@Qstring @Xbat      = "X.BAT"
@EndVars

/* ---------------------Configure Startup screen----------------------- */
@GetOption
			Configure Startup - XDMCP mode
	            ------------------------------------------









	REXEC (Remote Exec)  executes a command line on a specified host.
	RSH   (Remote Shell) executes a command line on a specified host.
	(The command line executed usually calls a script file like Xstart.)

	Query     sends a query to a specified host.
	Indirect  sends a query to a specified host to get another host name.
	Broadcast sends a query to the network to find any host running XDMCP.

	None waits for a remote host (node) to start the X session.

	@Option 6 = "REXEC  (Host Requires Password)    "
	@Option 5 = "RSH    (No Password)               "
	@Option 1 = "XDMCP Query                        "
	@Option 2 = "XDMCP Indirect                     "
	@Option 3 = "XDMCP Broadcast                    "
	@Option 4 = "None   (Passive - remote startup)  "
@EndOption


@If     (1 [= @Option)
	@MxXdm = "-query"
@ElseIf (2 [= @Option)
	@MxXdm = "-indirect"
@ElseIf (3 [= @Option)
	@MxXdm = "-broadcast"
@Endif


@If ((1 [= @Option) || (2 [= @Option) || (5 [= @Option) || (6 [= @Option))
HOST1:
	@GetString @HostName
	Configure Startup - Get host name
	---------------------------------

	Enter the IP address (in the dotted notation a.b.c.d) of the host
	to which you want to send the XDMCP query.  If you have a nameserver
	you can use the name of the host.

	example = 192.1.1.31
	example = sun1

	@Prompt = "Host Name"
	@EndString

	@If ("@HostName" == "@Null")
		@Display
		Host name is required.
		We will try again...
		@Pause
		@Goto HOST1
	@Endif

@Endif


/* --- set MxRxx to rexec --- */
@If (6 [= @Option)
	@MxRxx = "rexec"
@Endif

@If ((5 [= @Option) || (6 [= @Option))
LOGIN1:
	@GetString @HostLogin
	Configure Startup - Get host login
	----------------------------------

	This will be your login into @HostName.
	@Prompt = "Host login"
	@EndString

	@If ("@HostLogin" == "@Null")
		@Display
		Host login is required.
		We will try again...
		@Pause
		@Goto LOGIN1
	@Endif

CMD1:
	@GetString @HostCmd
	Configure Startup - Get host command script file name
	-----------------------------------------------------

	This will be the name of a file on the remote host computer.
	Normally this will be a script file which will set the display to
	your PC, start an xterm, and start the window manager.

	Example:	Xstart 192.1.1.23:0  or  Xstart PC23:0
	                ------ ------------      ------ ------
                          |          |             |      |
                      script file    |        script file |
	                         display               display

	There is a boilerplate Xstart file included in your XBIN directory.
	FTP that file to the remote unix host, modify the pathing if necessary,
	and make it executable.
	@Prompt = "Host Command"
	@EndString

	@If ("@HostCmd" == "@Null")
		@Display
		Host command is required.
		We will try again...
		@Pause
		@Goto CMD1
	@Endif

@Endif

/* -----------------End Configure Startup screen----------------------- */


/* ---------------------Change VGA driver------------------------------ */
@GetOption
			Change VGA Driver
	             -----------------------------------------





	The system initially starts out with the vga driver set to STDVGA.DRV
	which only operates in mono at 640x480.  You will have to change the
	vga driver to achieve higher resolutions or color.

	@Option 10 = "Do not change VGA driver          "
	@Option 11 = "Change VGA driver                 "
@EndOption

@If (11 [= @Option)
@GetOption
	         Driver    Model           Color           Mono
	         ------    -----           -----           ----
















	         Modes:   1=640x480, 2=800x600, 3=1024x768

	@Option 12 = "NO CHANGE                                      "
	@Option 13 = "AHEADB    WIZARD          1,2,3           1,2,3"
	@Option 14 = "ATI3      WONDER          1,2,3           1,2,3"
	@Option 15 = "ATI3      ULTRA,VANTAGE   1,2,3           1,2  "
	@Option 16 = "EVEREX    VGA-8800-CS     1               1,2,3"
	@Option 17 = "EVEREX    VGA-ET-4000     1,2,3           1,2,3"
	@Option 18 = "GENOA     6300,6400       1,2             1,2,3"
	@Option 19 = "GENOA     8800            1,2             1,2,3"
	@Option 20 = "HEADLAND  1024i           1,2,3           1,2,3"
	@Option 21 = "HEADLAND  VRAM II         1,2,3           1,2,3"
	@Option 22 = "OAK       037/067/077     1,2,3           1,2,3"
	@Option 23 = "STDVGA                                    1    "
	@Option 24 = "TRIDENT0  8800            1               1,2,3"
	@Option 25 = "TRIDENT1  8900            1,2,3           1,2,3"
	@Option 26 = "TSENG3    ET-3000         1,2             1,2,3"
	@Option 27 = "TSENG4    ET-4000         1,2,3           1,2,3"
	@Option 28 = "VESA                      1,2,3           1,2,3"
	@Option 29 = "WDC00     90C00,11,30     1,2,3           1,2,3"
	@Option 30 = "WDC1A     90C10,PGVA1A    1               1    "


@EndOption
@Endif


@If     (13 [= @Option)
	@VgaDriver = "aheadb.drv"
@ElseIf (14 [= @Option)
	@VgaDriver = "ati3.drv"
@ElseIf (15 [= @Option)
	@VgaDriver = "ati3.drv"
@ElseIf (16 [= @Option)
	@VgaDriver = "everex.drv"
@ElseIf (17 [= @Option)
	@VgaDriver = "everex.drv"
@ElseIf (18 [= @Option)
	@VgaDriver = "genoa.drv"
@ElseIf (19 [= @Option)
	@VgaDriver = "trident0.drv"
@ElseIf (20 [= @Option)
	@VgaDriver = "headland.drv"
@ElseIf (21 [= @Option)
	@VgaDriver = "headland.drv"
@ElseIf (22 [= @Option)
	@VgaDriver = "oad.drv"
@ElseIf (23 [= @Option)
	@VgaDriver = "stdvga.drv"
@ElseIf (24 [= @Option)
	@VgaDriver = "trident0.drv"
@ElseIf (25 [= @Option)
	@VgaDriver = "trident1.drv"
@ElseIf (26 [= @Option)
	@VgaDriver = "tseng3.drv"
@ElseIf (27 [= @Option)
	@VgaDriver = "tseng4.drv"
@ElseIf (28 [= @Option)
	@VgaDriver = "vesa.drv"
@ElseIf (29 [= @Option)
	@VgaDriver = "wdc00.drv"
@ElseIf (30 [= @Option)
	@VgaDriver = "wdc1a.drv"
@Endif
/* -----------------End Change VGA driver------------------------------ */


/* ---------------------Change TCP/IP support-------------------------- */
@GetOption
			Change TCP/IP support
	             -----------------------------------------





	The system initially starts out with the tcp/ip support set to
	the integrated tcp/ip stack (SNTCP.NET).

	@Option 50 = "Do not change tcp/ip support      "
	@Option 51 = "Change tcp/ip support             "
@EndOption

@If (51 [= @Option)
@GetOption
    	                  Supported tcp/ip stack
	                  ----------------------








	@Option 52 = "NO CHANGE                    "
	@Option 53 = "SN/TCP integrated tcp/ip"
	@Option 54 = "Lanera TCPOpen support"
	@Option 55 = "Novell LWP4DOS support"
	@Option 56 = "PC/TCP support"
	@Option 57 = "PC-NFS support"


@EndOption
@Endif


@If     (53 [= @Option)
	@TcpDriver = "sntcp.net"
@ElseIf (54 [= @Option)
	@TcpDriver = "tcpopen.net"
@ElseIf (55 [= @Option)
	@TcpDriver = "novell.net"
@ElseIf (56 [= @Option)
	@TcpDriver = "pctcp.net"
@ElseIf (57 [= @Option)
	@TcpDriver = "pcnfs.net"
@Endif
/* -----------------End Change tcp/ip support-------------------------- */




/* ---------------------Monitor setup---------------------------------- */
@GetOption
			Monitor Setup
	             -----------------------------------------




	You may want to select Black & White to run in the faster mono mode.

	Color mode is 256 simultaneous colors and requires at least 512KB
	of video memory on your (s)vga card.

	@Option 40 = "Color Monitor                     "
	@Option 41 = "Black & White                     "
@EndOption


@If     (40 [= @Option)
	@MxExe = "@MxClr"
@ElseIf (41 [= @Option)
	@MxExe = "@MxMon"
@Endif


@GetOption
			Monitor Resolution
	             -----------------------------------------





	If you are running in color, the video memory requirements are:

	            Resolution     Video RAM
	            ----------     ---------
	               640x480         512KB
	               800x600         512KB
	              1024x768        1024KB

	@Option 42 = " 640 x 480    (mode 1)            "
	@Option 43 = " 800 x 600    (mode 2)            "
	@Option 44 = "1024 x 768    (mode 3)            "
@EndOption

@If     (42 [= @Option)
	@MxMode = "-mode 1"
@ElseIf (43 [= @Option)
	@MxMode = "-mode 2"
@ElseIf (44 [= @Option)
	@MxMode = "-mode 3"
@Endif
/* -----------------End Monitor setup---------------------------------- */



/* ---------------------Server operation------------------------------- */
@GetOption
			X Server Operation
	             -----------------------------------------





	XDMCP Running - Query/Indirect/Broadcast chosen on 1st screen.

	    When Logout is chosen (usually by logging-out/exiting the xterm
	    created by .xsession) XDMCP closes down all clients and:
	   	1. returns to DOS.
		2. resets the server and returns to the XDMCP login window.

	XDMCP not running - None/RSH/REXEC chosen on 1st screen.

	   When all clients are logged-out the X server will:
	   	1. return to DOS.
		2. reset the server and wait (not a logical choice).

	@Option 45 = "1. Return to DOS on logout        "
	@Option 46 = "2. Continuous X sever operation   "
@EndOption
/* -----------------End Server operation------------------------------- */


/* ---------------------Save file option ------------------------------ */
SAVE1:
@GetString @Xbat
	Configure Startup - Change file name
	------------------------------------

	Normally this file will be saved as X.BAT.  If you wish to have more
	than one X.BAT type file, you may rename it now.  Giving it the name
	of the host that you wish to access is a good idea.  Remember to
	put the .BAT on the name.

	Example:	SUN1.BAT

@Prompt = "File Name"
@EndString

@If ("@Xbat" == "@Null")
	@Display
	A file name is required.
	We will try again...
	@Pause
	@Goto SAVE1
@Endif
/* -----------------End Save file option ------------------------------ */

/* ---
@Display
	Display of variables ...

	@@VgaDriver = @VgaDriver

	@@HostName  = @HostName
	@@HostLogin = @HostLogin
	@@HostCmd   = @HostCmd

	@@MxRxx     = @MxRxx
	@@MxExe     = @MxExe
	@@MxXdm     = @MxXdm
	@@MxSu      = @MxSu
	@@MxMode    = @MxMode
	@@MxRun     = @MxRun
	@@X11       = @X11

	@Pause
@Enddisplay
--- */


@Finish

/* ---------------------Change vga driver------------------------------ */
@Chdir("@X11")
@If     ((11 [= @Option) && (12 [! @Option))
	@Copy("@VgaDriver", "vga.drv")
@Endif
/* -----------------End Change vga driver------------------------------ */

/* ---------------------Change tcp driver------------------------------ */
@Chdir("@X11")
@If     ((51 [= @Option) && (52 [! @Option))
	@Copy("@TcpDriver", "net.net")
@Endif
/* -----------------End Change tcp driver------------------------------ */




/* ---------------------Create new x.bat------------------------------- */
@Chdir("..\\xbin")

@Copy("x.set", "@Xbat")

@If ((5 [= @Option) || (6 [= @Option))
	@Write(".\\@Xbat", , "@MxRxx @HostName -l @HostLogin @Hostcmd\n")
	@Write(".\\@Xbat", , "@MxExe @MxSu @MxMode @MxRun\n")
@Else
	@Write(".\\@Xbat", , "@MxExe @MxSu @MxXdm @HostName @MxMode @MxRun\n")
@Endif
/* -----------------End Create new x.bat------------------------------- */

@EndFinish

