##############################################################################
#
#				PA3D.DAT
#
#	This data menu includes the following menus or scripts:
#		PA3DAUTO.DAT
#		PA3DCSTM.DAT
#		PA3DHDWR.DAT
#
##############################################################################

##############################################################################
#				menu startup
##############################################################################

menu startup		at 0,0 dims 25,80
	background blue
	textcolor btwhite

	set title1 type str		"     Media Vision     "
        set productname type str        "  Premium 3-D SCSI2   "
	set title2 type str		" Installation Program "

	display title1 at 1,29 background blue textcolor ltgreen
	display productname at 2,29 background blue textcolor ltcyan
	display title2 at 3,29 background blue textcolor btwhite

	box at  8,-1 dims 10,40 background blue textcolor yellow border shadow single
	text " Startup Menu " at  8,-1 background blue  textcolor ltblue
	item " Main Menu - One moment... " at 12,-1 script main
###	item " Exit Facility " at 14,-1 return 1

##############################################################################
#				script main
##############################################################################

script main
	set filetitle	type str " Select System Files to Modify "
	set file1	type str "AUTOEXEC.BAT"
	set file2	type str "CONFIG.SYS"
	set fl3		type str "WIN.INI"
	set file3	type str $fl3
	set fl4		type str "SYSTEM.INI"
	set file4	type str $fl4

	set autoexec1	type str ""
	set autoexec2	type str ""
	set autoexec3	type str ""
	set autoexec4	type str ""
	set autoexec5	type str ""

	set config1	type str ""
	set config2	type str ""
	set config3	type str ""

	set winini1	type str ""

	set systemini1	type str ""
	set systemini2	type str ""
	set systemini3	type str ""
	set systemini4	type str ""
	set systemini5	type str ""
	set systemini6	type str ""
	set systemini7	type str ""
	set systemini8	type str ""
	set systemini9	type str ""
	set systemini10	type str ""
	set systemini11	type str ""
	set systemini12	type str ""
	set systemini13	type str ""
	set systemini14	type str ""
	set systemini15	type str ""
	set systemini16	type str ""
	set systemini17	type str ""
	set systemini18	type str ""
	set systemini19	type str ""
	set systemini20	type str ""
	set systemini21	type str ""
	set systemini22	type str ""
	set systemini23	type str ""

	set blnk	type str ""
	set dash	type str "-"
	set yes		type str "Yes"
	set no		type str "No"

	set always		type str "Always"

	set cimtitle	type str " Custom Installation Menu "
	set cimpik1	type str "Select System Files to Modify"
	set cimpik2	type str "Select Installation Directory"
	set cimpik5	type str "Done - Exit Menu"

	set paktitle	type str " Software Menu "
	set softpak1	type str "Sound Card Drivers"
	set softpak2	type str "Monologue For Windows"
	set softpak3	type str "Recording Session"
	set softpak4	type str "Sound Impression"

	set dosoftpak1	type str $always
	set dosoftpak2	type str $yes
	set dosoftpak3	type str $yes
	set dosoftpak4	type str $yes

	set pathtitle	type str " Directory Menu "
	set sub1	type str "MEDVSN"
	set sub2	type str "MONOLOG"
	set sub3	type str "MSOFTRS"
	set sub4	type str "MSOFTSI"

	set path1	type str "C:\MEDVSN"
	set path2	type str "${path1}\${sub2}"
	set path3	type str "${path1}\${sub3}"
	set path4	type str "${path1}\${sub4}"

	set windows	type str $yes
	set winpth	type str "C:\WINDOWS"
	set ptherrmsg	type str " Bad Windows Path !!!!  Try Again "

	set szsoftpak1 type long 2048
	set szsoftpak2 type long 2048
	set szsoftpak3 type long 2048
	set szsoftpak4 type long 3096

	set rds		type str "Needed Disk Space:"
	set vds		type str "Free Disk Space:"

	set rqrd_dsk_spc type long $szsoftpak1 + $szsoftpak2 + $szsoftpak3 + $szsoftpak4
	set vlbl_dsk_spc type long `dfree ${path1}
# - $rqrd_dsk_spc
	set need_space type long ${rqrd_dsk_spc} / 1024
	set free_space type long ${vlbl_dsk_spc} / 1024


	set installed	type str $no

	set dofile1	type str $yes
	set dofile2	type str $yes
	set dofl3	type str $yes
	set dofile3	type str $dofl3
	set dofl4	type str $yes
	set dofile4	type str $dofl4

	set pathtitle	type str " Select Installation Directory "
	set windows	type str $yes
	set winpth	type str "C:\WINDOWS"
	set ptherrmsg	type str " Bad Windows Path !!!!  Try Again "

	set irq		type str "Sound Card IRQ:"
	set dma8	type str "Sound Card 8-Bit DMA:"
	set dma16	type str "Sound Card 16-Bit DMA:"
	set port	type str "Sound Card Port:"
	set mpunbl	type str "MPU 401 Enable:"
	set mpuirq	type str "MPU 401 IRQ:"
	set mpuprt	type str "MPU 401 Port:"

	set hwtitle	type str " Hardware Menu "
	set hrdwr1	type str "IRQ"
	set hrdwr2	type str "Port"
	set hrdwr3	type str "DMA8"
	set hrdwr4	type str "MPU Enable"
	set hrdwr5	type str "DMA16"
	set hrdwr6	type str "MPU IRQ"
	set hrdwr7	type str "MPU Port"

	set dma1	type str 1
	set irq2	type str 2
	set irq3	type str 3
	set irq5	type str 5
	set irq7	type str 7
	set irq10	type str 10
	set irq15	type str 15

	set prt210	type str 210
	set prt220	type str 220
	set prt230	type str 230
	set prt240	type str 240
	set prt250	type str 250
	set prt260	type str 260
	set prt300	type str 300
	set prt310	type str 310
	set prt320	type str 320
	set prt330	type str 330

	set dirq	type str 0
	set ddma8	type str 0
	set ddma16	type str 0
	set dprt	type str 0
	set dmpunbl	type str $yes
	set dmpuirq	type str 0
	set dmpuprt	type str 0

	set board 	type int 0
	set cdport	type int 230
	set cdrom 	type str $yes
	set no_instcd	type str $no
	set installed	type str $no

	set vesa 	type str $yes

	set conPORT type int type hex 0
	set conDMA  type int 0
	set conIRQ  type int 0
	set conHDMA type int 0
	set conMPUPORT type int type hex 0
	set conMPUIRQ  type int 0
	set cSHCOUNT type int 0
	set cVERBOSE type str ""
	set cMIXER type int 0
	set cLISTEN type str ""
	set cUNLOAD type str ""
	set cTSRMIX type str ""

	set verIRQ type str ""
	set verDMA type str ""

	set esctext1	type str "Press ESC to Restore Original Path and Exit"
	set esctext2	type str "           Press ESC to Exit Menu         "
	set esctext3	type str " Press ESC to Return to Hardware Menu "
	set esctext4	type str " Press ESC to Exit Menu "
	set esctext5	type str " Press ESC to Return to Hardware Configuration Menu "

	set no_hardware type str ${yes}
	if not isfile files.lzh runmenu from_hard_disk return 1
:reauto
	set path1	type str "C:\MEDVSN"
	set auto_failed	type str $no
	runmenu main
        if issame ${installed} $yes runmenu bootinfo
        if issame ${auto_failed} $yes goto reauto
	return 1

###############################################
# bootinfo
###############################################

menu bootinfo at 8,-1 dims 14,60 background white textcolor red border shadow flushkeys
        name " Important "

#        text "1) Place the Reno CD in the CD-ROM drive.          "  at 2,-1
#        text "2) The installation process will be completed      "  at 4,-1
#        text "automatically after a reboot using the CD drive.   "  at 5,-1

        text " Exit this program, remove the installation        "  at 2,-1
        text "diskette and reboot your computer by simultaneously"  at 3,-1
        text "pressing the Alt,Ctrl, and Del keys.               "  at 4,-1
        text " Press ESC to Exit " at 11,-1
        item "" at 11,-1 return 1
        item "" at 12,-1 return 1


##############################################################################
#				from hard disk
##############################################################################
menu from_hard_disk		at 0,0 dims 25,80
	background blue
	textcolor btwhite
	display title1 at 1,29 background blue textcolor ltgreen
	display productname at 2,29 background blue textcolor ltcyan
	display title2 at 3,29 background blue textcolor btwhite
	item "" at 10,10 script hd_stuff


##############################################################################
#				hd_stuff
##############################################################################
script hd_stuff
	set ${path1} type str `pwd
	set dummyy	type str "Completed"
	set xit type int	-1
	runmenu get_win_info
	if issame ${xit} -1 return 1
	set no_instcd ${yes}

	runmenu hd_only
	return 1

##############################################################################
#				menu main
##############################################################################

menu main		at 0,0 dims 25,80
	background blue 
	textcolor btwhite

	display title1 at 1,29 background blue textcolor ltgreen
	display productname at 2,29 background blue textcolor ltcyan
	display title2 at 3,29 background blue textcolor btwhite

	box at  8,-1 dims 9,40 background blue textcolor yellow border shadow single
	text " Main Menu " at  8,-1 background blue  textcolor ltgreen
	item " Automatic Installation "	at 10,29 script automatic_installation return 1
	item " Custom Installation "	at 12,29 script custom_installation return 1
	item " Exit to DOS "	at 14,29 return 1

	text " Press ESC to Exit Program " at 24,-1 background blue textcolor btwhite


##############################################################################
#				script automatic_installation
##############################################################################

script automatic_installation
	runmenu get_cd_response
	set xit type int	-1
	runmenu get_win_info
	if issame ${xit} -1 return 1
	runscript auto_install
	return 1

##############################################################################
#				script custom_installation
##############################################################################

script custom_installation
	runmenu get_cd_response
	set xit type int	-1
	runmenu get_win_info
	if issame ${xit} -1 return 1
	runmenu target_paths
	runscript soft_select
	runscript custom_install
	return 1


##############################################################################
#				menu get_win_info
##############################################################################

menu get_win_info	at 9,15 dims  7,50
	background blue
	textcolor btwhite

	text " Do you have Windows 3.1 or higher installed ?" at  2,-1 background blue textcolor yellow

	item " Yes " 	at  4,22 background blue textcolor yellow script win_yes return 1
	item " No  "    at  5,22 background blue textcolor yellow script win_no  return 1

##############################################################################
#				scripts win_yes
##############################################################################

script win_yes
:badpath
	runmenu get_win_dir
	if issame ${xit} 2 goto badpath

	set file3	type str $fl3
	set file4	type str $fl4
	set dofile3	type str $dofl3
	set dofile4	type str $dofl4
	set windows	$yes

	return 1

##############################################################################
#				scripts win_no
##############################################################################

script win_no
	set xit		type int	0

	set file3	type str $blnk
	set file4	type str $blnk
	set dofile3	type str $blnk
	set dofile4	type str $blnk
	set windows	$no

	return 1

##############################################################################
#				scripts win_dir
##############################################################################

script win_dir
	if issame ${xit} 2 display ptherrmsg at 15,23 background red textcolor btwhite

	display winpth at 13,21 using "%-38s" background black textcolor yellow
	set xit type int	-1

	getstring winpth length 38 uppercase allownull wordonly
	set xit type int	1

	set winfl1 type str "${winpth}\${fl3}"
	if not isfile ${winfl1} set xit type int	2

	set winfl2 type str "${winpth}\${fl4}"
	if not isfile ${winfl2} set xit type int	2

	return 1

##############################################################################
#				menu get_win_dir
##############################################################################
menu get_win_dir	at 9,15 dims  7,50
	background blue
	textcolor btwhite

	text " Please Enter Windows Drive and Directory" at  2,-1 background blue textcolor yellow

	item "$winpth" at  4,6		script win_dir return 1


##############################################################################
#				menu get_cd_response
##############################################################################

menu get_cd_response	at 9,15 dims  7,50
	background blue
	textcolor btwhite

	text " Install CD-ROM drivers now ?" at  2,-1 background blue textcolor yellow

	item " Yes " 	at  4,22 background blue textcolor yellow script install_cd_yes return 1
	item " No  "    at  5,22 background blue textcolor yellow script install_cd_no  return 1


##############################################################################
#				scripts install_cd_yes
##############################################################################

script install_cd_yes
	set cdrom 	type str $yes
	return 1

##############################################################################
#				scripts install_cd_no
##############################################################################

script install_cd_no
	set cdrom 	type str $no
	return 1

include installc.dat
include installa.dat
include installh.dat
include installv.dat

