/*
 * INSTALL.DAT
 *
 * Project: Tropez
 * Version: 1.3
 *
 * This INSTALL.DAT was automatically generated by DDB
 */

@DefineProject
	@Name = "Tropez"
	@Version = "1.2"
	
	@Subdir = "\\tropez"
	@OutDrive = C
@EndProject


/*
Options:
	1-4 Install, uninstall, configure, exit
	11-12 Full/custom installation
	21-22 DOS, Windows installation
	31-37 Windows apps to install
	38 Regular drivers - only used for configuration
	40 Copy in midimap.cfg?
	50 Delete whole tropez directory?
	60 Reboot after installation?
	70 Test hardware settings?         

    101-106 Main sound card settings menu
    111, 121, 131, 141, 151 for each of the main sound card settings

	201-203    Sound Blaster settings menu
	211, 221, 231  for each of the SB settings
    
    300 CD-ROM attached/not attached
    301-303 CD-ROM Mitsumi settings menu options
    311-314 CD-ROM type selection
    321-324 CD-ROM port address
    331-334 CD-ROM IRQ address
    341-344 CD-ROM DMA address
*/

@DefineVars
	@Dir @EnteredWinDir
	@Drive @EnteredWinDrive
	@Qstring @MainPort
	@Qstring @MainIRQ
	@Qstring @MainDMA
	@Qstring @WFPort
	@Qstring @WFIRQ
	@Integer @DosInstall
	@Integer @WindowsInstall
	@Qstring @cdtype =""
	@Qstring @cdport =""
	@Qstring @cdIRQ ="DISABLED"
	@Qstring @cddma ="DISABLED"
	@Qstring @blasterport =""
	@Qstring @blasterirq =""
	@Qstring @blasterdma =""
	@Qstring @TrySetting = ""

	
	//Tropez Title box (one of the flashier parts of this install) 
	@Qstring @box1 ="ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»"
	@Qstring @box2 ="Ί                                             Ί"
	@Qstring @box3 ="ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ"
	@Qstring @logo1 ="            Turtle Beach Systems            "
	@Qstring @logo2 ="  Installation Program for the Tropez  "
	@Integer @colformat = 15
	@Integer @rowformat = 0
	@Integer @boxcolor1 =126
	@Integer @boxcolor2 =116

	// File set sizes (all in KB)
	@Integer @DOSSize = 828
	@Integer @RegDrivSize = 298
	@Integer @SierraSize = 441
	@Integer @WaveSESize = 1608
	@Integer @MicroWaveSize = 709
	@Integer @StratosSize = 1534
	@Integer @MousePlayerSize = 89
	@Integer @MidiMapSize = 3
	@Integer @TBMixerSize = 246
	@Integer @WavePatchSize = 1210
	@Integer @TBCDSize = 82
	@Integer @TBDemoSize = 208
	@Integer @ControlPanelSize = 980 
	
	
	@Integer @TotalSize = 0
	@Integer @TotalSizeBytes = 0
	@Integer @WFReturn = 0
	
	@Qstring @SysIni = "C:\\WINDOWS\\SYSTEM.INI"
	@Qstring @BootLine = ""
	@Qstring @DrvPath
	@Qstring @TropezIni = ""
	
	@Integer @WSS = 1
	@Integer @SB = 2
	@Integer @MIDI = 3
	@Integer @WF = 4
	
	@Qstring @ActionStr = ""
    @Integer @Row = 1
    @Integer @Col = 1
    @Qstring @TempMIDIPort
    @Qstring @RunLine = ""
    @Qstring @GroupFilePath = ""

@EndVars





@ClearOption(60)  // reboot option

// ****************************************
// Welcome screen
// ****************************************
@movecstr(@rowformat,@colformat,@boxcolor1,"@box1")
@movecstr(@rowformat+1,@colformat,@boxcolor1,"@box2")
@movecstr(@rowformat+2,@colformat,@boxcolor1,"@box2")
@movecstr(@rowformat+3,@colformat,@boxcolor1,"@box3")
@movecstr(@rowformat+1,@colformat+1,@boxcolor2,"@logo1")
@movecstr(@rowformat+2,@colformat+1,@boxcolor2,"@logo2")
@Display





		 Welcome to the installation program for Tropez 

      
		    
			This program allows you to:
		
	- Install Tropez for DOS or Windows.
	      
	- Uninstall - delete all files and undo changes made to system files. 
      
	- Configure Tropez for DOS or Windows.


					@Pause
@EndDisplay

@FlushOptions()


// ******************************************
// Main menu
// ******************************************
@ClearOption(1)
@ClearOption(2)
@ClearOption(3)
@ClearOption(4)
@GetOption
	@movecstr(@rowformat,@colformat,@boxcolor1,"@box1")
	@movecstr(@rowformat+1,@colformat,@boxcolor1,"@box2")
	@movecstr(@rowformat+2,@colformat,@boxcolor1,"@box2")
	@movecstr(@rowformat+3,@colformat,@boxcolor1,"@box3")
	@movecstr(@rowformat+1,@colformat+1,@boxcolor2,"@logo1")
	@movecstr(@rowformat+2,@colformat+1,@boxcolor2,"@logo2")

	@LocalWindow(10,40)
    @Option 1 = "Install"
    @Option 2 = "Uninstall"
    @Option 3 = "Configure"
    @Option 4 = "Exit"
    
	
	
	@movecstr(14, 2, 23, "Install:")
		@movecstr(15, 4, 23, "Copies all Tropez files to your hard drive, configures hardware settings")
	@movecstr(17, 2, 23, "Uninstall:")
		@movecstr(18, 4, 23, "Deletes all Tropez files, deletes lines from system files")
	@movecstr(20, 2, 23, "Configure:")
		@movecstr(21, 4, 23, "Configures hardware settings")

    //@movecstr(20,5,31," Do you want to do an installation, uninstallation, or configure card settings?")
@EndOption

@if (4[=@option)
	@exit
@endif

@if(1[=@option)
	@ActionStr = "Installation"
@elseif(3[=@option)
	@ActionStr = "Configuration"
@elseif(2[=@option)
	@ActionStr = "Uninstallation"
@endif
		  


// ******************************************
// Select DOS or Windows installation so we know whether to ask for Windows directory
// ******************************************
BEGIN_INSTALLATION_SELECTIONS:

//@if (2[!@option)  // if not uninstall 


	@SetOption(21)
	@SetOption(22)
	@GetOption
		@Checkbox
	    
		@movecstr(0, 27, 30, "@ActionStr options")
		
	    @movecstr(2, 5, 27, "Up and down arrow keys - highlight the option you wish to change")
	    @movecstr(3, 5, 27, "Space bar - alternate selecting or deselecting the option")
	    @movecstr(5, 5, 27, "Enter - accept the options as shown")
	    
	    
		@LocalWindow(10,40)
		@Option 21 = "DOS @ActionStr"
		@Option 22 = "Windows @ActionStr"
	
		@movecstr(14, 5, 23, "DOS @ActionStr:")
		@if (1[=@option)
			@movecstr(16, 7, 23, "Copies all DOS applications to your hard drive")
		@endif
		@movecstr(15, 7, 23, "Configures hardware settings for DOS games and other DOS apps.")
		@movecstr(18, 5, 23, "Windows @ActionStr:")
		@if (1[=@option)
			@movecstr(20, 7, 23, "Copies Windows applications to your hard drive")
		@endif
		@movecstr(19, 7, 23, "Configures hardware settings for Tropez under Windows")
	
	@EndOption
	
	@if (21[=@option)
		@DOSInstall = @true
	@else
		@DOSInstall = @false
	@endif
	@if (22[=@option)
		@WindowsInstall = @true
	@else
		@WindowsInstall = @false
	@endif
//@endif  // not uninstall        






// ***********************************************
// Get output disk drive and directory
// ***********************************************
@GetOutDrive
	@Cls
    @suppress(0,17)
	@movecstr(0, 27, 30, "@ActionStr drive")
	@movecstr(4, 17, 27, "Please specify disk drive for @Name files")

	@LocalWindow(10, 37)

@EndOutDrive


@if(2[=@option)
	@if ( (@exists("@OutDrive:\\tzuninst.ini") == @TRUE) )
		@subdir = @GetProfString("@OutDrive:\\tzuninst.ini", "install", "InstallSubdir")
	@endif
@endif          
	


@GetSubdir
	@Cls
	@movecstr(0, 27, 30, "@ActionStr directory")
	@movecstr(4, 19, 27, "Please specify directory for @Name files")


	//@Prompt = "Which subdirectory ([Enter] = @Subdir) ?"
	@LocalWindow(10, 50)
@EndSubdir



// ***********************************************
// Get Windows disk drive and directory
// ***********************************************

GETWINDOWSDIR:

@if (@WindowsInstall == @true)

	@EnteredWinDir = "\\windows"
	
	@GetOutDrive @EnteredWinDrive
		@Cls
	    @suppress(0,17)
		@movecstr(0, 23, 30, "@ActionStr - Windows drive")
		@movecstr(4, 17, 27, "On which disk drive is Windows located?")
		
		@LocalWindow(10, 37)
	
	@EndOutDrive
		
	@GetSubDir @EnteredWinDir       
		@Cls
		@movecstr(0, 21, 30, "@ActionStr - Windows directory")
		@movecstr(4, 19, 27, "In which directory is Windows located?")
	
		@Prompt = "What is your windows directory?"
		@LocalWindow(12, 50)
	@EndSubDir
	  
	@if (@exists("@EnteredWinDrive:@EnteredWinDir\\win.com") != @TRUE)
		@Display
			
			No win.com in that directory.
			
					
					
					@Pause
		@EndDisplay
		@goto GETWINDOWSDIR      
	@Endif  // win.com exists
	@if (@exists("@EnteredWinDrive:@EnteredWinDir\\system.ini") != @TRUE)
		@Display
			No system.ini in that directory.
			
			@Pause
		@EndDisplay
		@goto GETWINDOWSDIR      
	@Endif  // system.ini exists
	@SysIni = "@EnteredWinDrive:@EnteredWinDir\\system.ini"
@Endif  // windows installation       


AFTERGETWINDOWSDIRECTORY:



// if user chose to install, don't jump anywhere
@if (2[=@option)
	@goto SHOW_ALL
@elseif (3[=@option)
	@goto START_CONFIGURE
@endif                  


// **********************************************
// File selection
// **********************************************

@if (@WindowsInstall == @true)
	// Full/Custom
	@ClearOption(11)
	@ClearOption(12)
	@GetOption
		@movecstr(0, 21, 30, "Full or custom installation of files")

		@movecstr(3, 5, 27, "Do you wish to automatically install all files, or pick and choose?")
		
		@LocalWindow(10, 40)
		@Option 11 = "Full installation"
		@Option 12 = "Custom installation"              
	
		@movecstr(13, 5, 23, "Full installation")
		@movecstr(14, 7, 23, "Automatically installs all DOS and Windows apps")
		@movecstr(16, 5, 23, "Custom installation")
		@movecstr(17, 7, 23, "Select which Windows apps you wish to install")
	@EndOption
	
	// if full installation
	@if (11[=@option)
		// Set all Windows apps on
		@SetOption(31)
		@SetOption(32)
		@SetOption(33)
		@SetOption(34)
		@SetOption(35)
		@SetOption(36)
		@SetOption(37)
		@SetOption(38)
		@SetOption(39)
	@else
		// Windows apps selection
		// Set all Windows apps on
		@SetOption(31)
		@SetOption(32)
		@SetOption(33)
		@SetOption(34)
		@SetOption(35)
		@SetOption(36)
		@SetOption(37)
		@SetOption(38)
		@SetOption(39)
		@GetOption
			@CheckBox
			@movecstr(0, 27, 30, "Windows applications")
    
		    @movecstr(2, 5, 27, "Up and down arrow keys - highlight the option you wish to change")
		    @movecstr(3, 5, 27, "Space bar - alternate selecting or deselecting the option")
		    @movecstr(5, 5, 27, "Enter - accept the options as shown")
			
			@LocalWindow(13, 38)
			
			@Option 31 = "TB Mixer"
			@Option 32 = "Wave SE"
			@Option 33 = "MicroWave"
			@Option 34 = "Mouse Player"
			@Option 35 = "Stratos"
			@Option 36 = "Sierra Audio Rack"
			@Option 37 = "Wave Patch"
			@Option 38 = "TBCD"
			@Option 39 = "TB Demo"
			@movecstr(19, 14, 23, "Choose which Windows applications to install")
		@EndOption
	@endif   

@endif  // Windows install


@if (!@WindowsInstall)
	// Set all Windows apps off just in case
	@ClearOption(31)
	@ClearOption(32)
	@ClearOption(33)
	@ClearOption(34)
	@ClearOption(35)
	@ClearOption(36)
	@ClearOption(37)
	@ClearOption(38)
	@ClearOption(39)
@endif  





// **********************************************
// Check space on drive
// **********************************************
CHECK_SPACE_ON_DRIVE:

// Figure out total disk space needed
@TotalSize = 0

@if (@DOSInstall == @true)
	@TotalSize = (@TotalSize + @DOSSize)
@endif
@if (@WindowsInstall == @true)
	@TotalSize = (@TotalSize + @RegDrivSize)
	@if (36[=@option)
		@TotalSize = (@TotalSize + @SierraSize)
	@endif
	@if (32[=@option)
		@TotalSize = (@TotalSize + @WaveSESize)
	@endif
	@if (33[=@option)
		@TotalSize = (@TotalSize + @MicroWaveSize)
	@endif
	@if (35[=@option)
		@TotalSize = (@TotalSize + @StratosSize)
	@endif
	@if (37[=@option)
		@TotalSize = (@TotalSize + @WavePatchSize)
	@endif
	@if (34[=@option)
		@TotalSize = (@TotalSize + @MousePlayerSize)
	@endif
	@if (31[=@option)
		@TotalSize = (@TotalSize + @TBMixerSize)
	@endif
	@if (38[=@option)
		@TotalSize = (@TotalSize + @TBCDSize)
	@endif
	@if (39[=@option)
		@TotalSize = (@TotalSize + @TBDemoSize)
	@endif

    @TotalSize = (@TotalSize + @ControlPanelSize)

	@TotalSize = (@TotalSize + @MidiMapSize)
@endif  

@TotalSizeBytes = (@TotalSize * 1024)


@if ((@DiskFree(@OutDrive)) < (@TotalSizeBytes))
	@Display
 Not enough disk space on drive @OutDrive.
 Press ESC to exit and delete files, or hit enter to select a different drive.
		
		
		@Pause
		@goto BEGIN_INSTALLATION_SELECTIONS 
	@EndDisplay
@endif           


// ******************************************
// Configuration start
// ******************************************
START_CONFIGURE:

@if (!@DOSInstall)
	@goto END_OF_CD_ROM_CONFIG  // skip past CD-ROM configuration
@endif  

// ******************************************
// CD-ROM configuration
// ******************************************
@ClearOption(300)
@GetOption
	@CheckBox
	@movecstr(0, 25, 30, "CD-ROM drive attachment")
    @movecstr(3, 5, 27, "Space bar - alternate selecting or deselecting the option")
    @movecstr(5, 5, 27, "Enter - accept the option as shown")
    @movecstr(8, 20, 31, "Is a CD-ROM attached to your Tropez?")
	@LocalWindow(12,37)
	@Option 300 = "CD-ROM?"
	//@Option 300 = "Is a CD-ROM attached to your Tropez?"
@EndOption

@if (300[!@option) // no CD-ROM attached
	@cdtype="DISABLED" 
	@cdport="DISABLED"
	@cddma="DISABLED"
	@cdIRQ="DISABLED"
	@goto END_OF_CD_ROM_CONFIG
@else  // otherwise configure the CD-ROM for ATAPI set up.
	@cdtype="IDE_SEC"           // ATAPI settings
	@cdport="DISABLED"
	@cdIRQ="DISABLED"
	@cdDMA="DISABLED" 
@endif  




END_OF_CD_ROM_CONFIG:




@SetOption(70)
@GetOption
	@movecstr(2, 5, 31, "                                                ")
	@movecstr(4, 7, 31, "                                    ")
	@movecstr(6, 7, 31, "                                    ")
	@CheckBox
	@movecstr(0, 27, 30, "Hardware testing")
	@movecstr(3, 5, 27, "Space bar - alternate selecting or deselecting the option")
	@movecstr(5, 5, 27, "Enter - accept the option as shown")
    @movecstr(8, 12, 31, "Do you want selected hardware settings to be tested?")
	@Option 70 = "Test hardware?"
	@LocalWindow(12,37)  // was 40
	@movecstr(19, 5, 23, "Testing the hardware settings could lock up your machine") 
@EndOption





// ******************************************
// Sound card configuration (main settings)
// ******************************************

// set defaults
@MainPort = "530"
@if ("@cdIRQ" != "7")
	@MainIRQ = "7"
@else
	@MainIRQ = "10"
@endif          

@if ("@cdDMA" != "1")
	@MainDMA = "1"
@else   
	@MainDMA = "0"
@endif  
	

@WFPort = "330"
@WFIRQ = "9"
/*
@if ("@cdPort" != "330")
	@MIDIPort = "330"
@else
	@MIDIPort = "300"
@endif  
		
@if ("@cdIRQ" != "9")
	@MIDIIRQ = "9"
@else
	@MIDIIRQ = "5"
@endif
*/              

MAIN_SETTINGS_MENU:
@ClearOption(101)
@ClearOption(102)
@ClearOption(103)
@ClearOption(104)
@ClearOption(105)
@ClearOption(106)

@GetOption
	@movecstr(0, 23, 30, "Tropez primary hardware settings")
    @movecstr(2, 5, 27, "Up and down arrow keys - highlight the setting you wish to change")
    @movecstr(4, 5, 27, "Enter - change the highlighted setting")
    @movecstr(5, 5, 27, "Hit enter again to come back to this menu with the changed setting.")
    @LocalWindow(12,40)
	
	@Option 101 = "Continue with settings as shown"
	@Option 102 = "Digital Audio Port Address....@MainPort"
	@Option 103 = "Digital Audio IRQ.............@MainIRQ"
	@Option 104 = "Digital Audio DMA.............@MainDMA"
	@Option 105 = "Wavetable MIDI Port Address...@WFPort"
	@Option 106 = "Wavetable MIDI IRQ............@WFIRQ"
@EndOption



@if(101[=@option) // user wants to continue with present settings
    // first check to see if the settings work and default IRQ not the same as CD-ROM IRQ 
    @goto END_OF_MAIN_SETTINGS
		
@elseif(102[=@option)  // Main Port
	@goto MAIN_PORT_SETTING
@elseif(103[=@option)  // Main IRQ
	@goto MAIN_IRQ_SETTING
@elseif(104[=@option)  // Main DMA
	@goto MAIN_DMA_SETTING
@elseif(105[=@option)  // WaveFront port
	@goto WAVEFRONT_PORT_SETTING
@elseif(106[=@option)  // WaveFront IRQ
	@goto WAVEFRONT_IRQ_SETTING
@endif


MAIN_PORT_SETTING: 
	@ClearOption(111)
	@ClearOption(112)
	@ClearOption(113)
	@ClearOption(114)
	@GetOption
		@movecstr(0, 32, 30, "Primary Port I/O")
		@LocalWindow(10,40)
		@Option 111 = "530 (default)"
		@Option 112 = "604"
		@Option 113 = "e80"
		@Option 114 = "f40"
	@EndOption
	@if(111[=@option)
		@TrySetting = "530"
	@elseif (112[=@option)
		@TrySetting = "604"
	@elseif (113[=@option)
		@TrySetting = "e80"
	@elseif (114[=@option)
		@TrySetting = "f40"
	@else //default
		@TrySetting = "530"     
	@endif                  
	
	@MainPort = "@TrySetting"
	@goto MAIN_SETTINGS_MENU

MAIN_IRQ_SETTING:

	@ClearOption(121)
	@ClearOption(122)
	@ClearOption(123)
	@ClearOption(124)
	
	@GetOption
		@movecstr(0, 34, 30, "Primary IRQ")
		@LocalWindow(10,40)
		@if (("@cdIRQ" != "7") && ("@WFIRQ" != "7")) 
			@Option 121 = "7 (default)" 
		@endif
		@if (("@cdIRQ" != "9") && ("@WFIRQ" != "9")) 
			@Option 122 = "9" 
		@endif
		@if (("@cdIRQ" != "10") && ("@WFIRQ" != "10")) 
			@Option 123 = "10" 
		@endif
		@if (("@cdIRQ" != "11") && ("@WFIRQ" != "11")) 
			@Option 124 = "11" 
		@endif
	@EndOption              

	
	@if(121[=@option)
		@TrySetting = "7"
	@elseif (122[=@option)
		@TrySetting = "9"
	@elseif (123[=@option)
		@TrySetting = "10"
	@elseif (124[=@option)
		@TrySetting = "11"
	@else //default
		@TrySetting = "7"
	@endif
    
	// now assign @MainIRQ to @TrySetting if it succeeds hardware test
	@MainIRQ = "@TrySetting"
	@goto MAIN_SETTINGS_MENU
					

MAIN_DMA_SETTING:
	@ClearOption(131)
	@ClearOption(132)
	@ClearOption(133)
	@ClearOption(134)
	@GetOption
		@movecstr(0, 34, 30, "Primary DMA")
		@LocalWindow(10,40)
		@if ("@cdDMA" != "1") 
			@Option 132 = "1 (default)" 
		@endif
		@if ("@cdDMA" != "0") 
			@Option 131 = "0" 
		@endif
		@if ("@cdDMA" != "2") 
			@Option 133 = "3" 
		@endif
	@EndOption
	@if(131[=@option)
		@TrySetting = "0"
	@elseif (132[=@option)
		@TrySetting = "1"
	@elseif (133[=@option)
		@TrySetting = "3"
	@else //default
		@TrySetting = "1"
	@endif                  
	
	// now assign @MainDMA to @TrySetting if it succeeds hardware test
	@MainDMA = "@TrySetting"
	@goto MAIN_SETTINGS_MENU




WAVEFRONT_PORT_SETTING:
	@ClearOption(141)
	@ClearOption(142)
	@ClearOption(143)
	@ClearOption(144)
	@ClearOption(145)
	@ClearOption(146)
	@ClearOption(147)
	@ClearOption(148)
	@GetOption
		@movecstr(0, 30, 30, "WaveFront Port I/O")
		@LocalWindow(10,40)
		@Option 147 = "330 (default)"
		@Option 141 = "210"
		@Option 142 = "230"
		@Option 143 = "260"
		@Option 144 = "290"
		@Option 145 = "300"
		@Option 146 = "320"
		@Option 148 = "338"
	@EndOption
	@if(141[=@option)
		@WFPort = "210"
	@elseif(142[=@option)
		@WFPort = "230" 
	@elseif(143[=@option)
		@WFPort = "260" 
	@elseif(144[=@option)
		@WFPort = "290" 
	@elseif(145[=@option)
		@WFPort = "300" 
	@elseif(146[=@option)
		@WFPort = "320" 
	@elseif(147[=@option)
		@WFPort = "330" 
	@elseif(148[=@option)
		@WFPort = "338" 
	@else  // default
		@WFPort = "330"
	@endif
	@goto MAIN_SETTINGS_MENU




WAVEFRONT_IRQ_SETTING:
	@ClearOption(151)
	@ClearOption(152)
	@ClearOption(153)
	@ClearOption(154)
	@GetOption
		@movecstr(0, 32, 30, "WaveFront IRQ")
		@LocalWindow(10,40)
		@if ("@MainIRQ" != "9")
			@Option 152 = "9 (default)"
		@endif
		@if ("@MainIRQ" != "5")
			@Option 151 = "5"
		@endif
		@if ("@MainIRQ" != "12")
			@Option 153 = "12"
		@endif
		@if ("@MainIRQ" != "15")
			@Option 154 = "15"
		@endif
	@EndOption
	
	@if(151[=@option)
		@WFIRQ = "5"    
	@elseif(152[=@option)
		@WFIRQ = "9"
	@elseif(153[=@option)
		@WFIRQ = "12"   
	@elseif(154[=@option)
		@WFIRQ = "15"   
	@else  // default
		@WFPort = "9"
	@endif
	@goto MAIN_SETTINGS_MENU


END_OF_MAIN_SETTINGS:
	
	



@if (70[=@option)
	@Row = 2

	@Display
	@cls
	Now hardware will be tested for availability. If there is a hardware 
	conflict, your computer may lock up. If the installation does not 
	continue within a minute or less, please reset your machine and
	begin the install again, choosing different settings.
					
					
					
					@pause
				@cls 
	@EndDisplay
		
    @movecstr(@Row, 5, 31, "Testing availability of chosen hardware settings")
    
	
	@Row = (@Row + 2)
    @movecstr(@Row, 7, 31, "Checking Primary Port Address: @MainPort")
	// Now check the hardware, going back to menu if anything fails
	@if ((@CheckPortIO(@WSS, "@MainPort")) != 0)
		@Display
			
			
			










		Port address @MainPort failed. Try a different setting.
			
			
			
					@pause
		@EndDisplay     
		@goto MAIN_SETTINGS_MENU

	//@elseif (@true)       
	@endif
	
	@Row = (@Row + 1)
    @movecstr(@Row, 7, 31, "Checking Primary IRQ: @MainIRQ")
	@if (@CheckIRQ(@WSS, "@MainPort", "@MainIRQ", "@MainDMA") != 0)     
		@Display
			
			
			










		Primary IRQ @MainIRQ failed. Try a different setting.
			
			
			
					@pause
		@EndDisplay     
		@goto MAIN_SETTINGS_MENU
	@endif

	@Row = (@Row + 1)
    @movecstr(@Row, 7, 31, "Checking Primary DMA: @MainDMA")
	@if (@CheckDMA(@WSS, "@MainPort", "@MainIRQ", "@MainDMA") != 0)     
		@Display
			
			
			










		Primary DMA @MainDMA failed. Try a different setting.
			
			
			
					@pause
		@EndDisplay     
		@goto MAIN_SETTINGS_MENU
	@endif


	@Row = (@Row + 1)
    @movecstr(@Row, 7, 31, "Checking WaveFront Port: @WFPort and IRQ: @WFIRQ. Please wait 10 seconds.")
	@WFReturn = (@CheckWFIOandInt(@WFPort, @WFIRQ))
	@if (@WFReturn != 0)
		@if (@WFReturn == 1)  // init failed
			@Display
			
			
			
			
			
			
			
			
			
			
  WaveFront initialization failed. Try a different setting for port or IRQ.
			
			
			
				@pause
			@EndDisplay
		
		@elseif (@WFReturn == 2)  // port addr failed
			@Display
			
			
			
			
			
			
			
			
			
			
			
	WaveFront Port @WFPort failed. Try a different setting.
		
		
				@pause
			@EndDisplay
			
		@elseif (@WFReturn == 3)  // irq failed
			@Display        
			
			










	WaveFront IRQ @WFIRQ failed. Try a different setting.
			
			
			
				@pause
			@EndDisplay
		@endif
		     
		@goto MAIN_SETTINGS_MENU
	@endif  // WaveFront return not okay

@endif  // user chose to test hardware.






@if (!@DosInstall)
	@goto END_OF_BLASTER_SETTINGS
@endif          

// ******************************************
// Sound Blaster Configuration
// ******************************************
@BlasterPort = "220"

@if ("@WFIRQ" != "7")
	@BlasterIRQ = "7"
@elseif ("@WFIRQ" != "5")
	@BlasterIRQ = "5"
@else
	@BlasterIRQ = "10"
@endif                  

@if ("@cdDMA" != "1")
	@BlasterDMA = "1"
@else 
	@BlasterDMA = "0"
@endif          

BLASTER_SETTINGS_MENU:
@ClearOption(201)
@ClearOption(202)
@ClearOption(203)
@ClearOption(204)

@GetOption
	@cls
	@movecstr(0, 26, 30, "Tropez blaster settings")
    @movecstr(2, 5, 27, "Up and down arrow keys - highlight the setting you wish to change")
    @movecstr(4, 5, 27, "Enter - change the highlighted setting")
    @movecstr(5, 5, 27, "Hit enter again to come back to this menu with the changed setting.")
    @LocalWindow(12,40)
	@Option 201 = "Continue with settings as shown"
	@Option 202 = "Port Address...@BlasterPort"
	@Option 203 = "IRQ............@BlasterIRQ"
	@Option 204 = "DMA............@BlasterDMA"
	@movecstr(20, 3, 23, "Sound Blaster hardware settings are necessary for most DOS games")
	//@movecstr(20, 7, 23, "Tip: Identical IRQ/DMA settings can be used ")
	//@movecstr(21, 7, 23, "for blaster settings and primary hardware settings")
@EndOption



@if(201[=@option) // user wants to continue with present settings
    // first check to see if the settings work and default IRQ not the same as CD-ROM IRQ 
    @goto END_OF_BLASTER_SETTINGS
		
@elseif(202[=@option)  // Blaster Port
	@goto BLASTER_PORT_SETTING
@elseif(203[=@option)  // Blaster IRQ
	@goto BLASTER_IRQ_SETTING
@elseif(204[=@option)  // Blaster DMA
	@goto BLASTER_DMA_SETTING
@endif




BLASTER_PORT_SETTING:
	@ClearOption(211)
	@ClearOption(212)
	@GetOption
		@movecstr(0, 28, 30, "Sound Blaster Port I/O")
		@LocalWindow(10,40)
		@Option 211 = "220 (default)"
		@Option 212 = "240"
	@EndOption
	@if(211[=@option)
		@TrySetting = "220"
	@elseif (212[=@option)
		@TrySetting = "240"
	@else //default
		@TrySetting = "220"     
	@endif                  
	
	/*
	This block of code will be placed after ever selection (Port, DMA, IRQ)
	
	// Now check this port address
	@if (@CheckIO("@TrySetting") == TRUE)
		@BlasterPort = "@TrySetting"
	@else
		@Display
			Port address @TrySetting failed.
			@pause
		@EndDisplay     
	@endif  
	*/
	@BlasterPort = "@TrySetting"
	@goto BLASTER_SETTINGS_MENU


BLASTER_IRQ_SETTING:
	@ClearOption(221)
	@ClearOption(222)
	@ClearOption(223)
	@GetOption
		@movecstr(0, 31, 30, "Sound Blaster IRQ")
		@LocalWindow(10,40)
		@if ("@WFIRQ" != "7") @Option 222 = "7 (default)" @endif
		@if ("@WFIRQ" != "5") @Option 221 = "5" @endif
		@if ("@WFIRQ" != "10") @Option 223 = "10" @endif
	@EndOption              
	@if(221[=@option)
		@TrySetting = "5"
	@elseif (222[=@option)
		@TrySetting = "7"
	@elseif (223[=@option)
		@TrySetting = "10"
	@else //default
		@TrySetting = "7"
	@endif                  
	
	// now assign @BlasterIRQ to @TrySetting if it succeeds hardware test
	@BlasterIRQ = "@TrySetting"
	@goto BLASTER_SETTINGS_MENU



BLASTER_DMA_SETTING:
	@ClearOption(231)
	@ClearOption(232)
	@ClearOption(233)
	@ClearOption(234)
	@GetOption
		@movecstr(0, 31, 30, "Sound Blaster DMA")
		@LocalWindow(10,40)
		@if ("@cdDMA" != "1") @Option 232 = "1 (default)" @endif
		@if ("@cdDMA" != "0") @Option 231 = "0" @endif
		@if ("@cdDMA" != "3") @Option 233 = "3" @endif
	@EndOption
	@if(231[=@option)
		@TrySetting = "0"
	@elseif (232[=@option)
		@TrySetting = "1"
	@elseif (233[=@option)
		@TrySetting = "3"
	@else //default
		@TrySetting = "1"
	@endif                  
	
	// now assign @BlasterDMA to @TrySetting if it succeeds hardware test
	@BlasterDMA = "@TrySetting"

	@goto BLASTER_SETTINGS_MENU



END_OF_BLASTER_SETTINGS:


@if (70[=@option)
	// Now check the hardware, going back to menu if anything fails


	@Row = 2
		
	@Display
	@cls
	Now hardware will be tested for availability. If there is a hardware 
	conflict, your computer may lock up. If the installation does not 
	continue within a minute or less, please reset your machine and
	begin the install again, choosing different settings.
					
					
					
					@pause
				@cls 
	@EndDisplay
    
    @movecstr(@Row, 5, 31, "Testing availability of chosen hardware settings")
	
	@Row = (@Row + 2)
    @movecstr(@Row, 7, 31, "Checking Blaster Port Address: @BlasterPort")
	@if ((@CheckPortIO(@SB, "@BlasterPort")) != 0)
		@Display



		










		
		
		Port address @BlasterPort failed. Try a different setting.



					@pause
		@EndDisplay     
		@goto BLASTER_SETTINGS_MENU
	@endif  

	@Row = (@Row + 1)
    @movecstr(@Row, 7, 31, "Checking Blaster IRQ: @BlasterIRQ")
	@if ("@BlasterIRQ" == "5") 
		@TempMIDIPort = ""
		@if (@CheckPortIO(@MIDI, "330") == 0)
			@TempMIDIPort = "330"
		@elseif (@CheckPortIO(@MIDI, "320") == 0)        
			@TempMIDIPort = "320"
		@elseif (@CheckPortIO(@MIDI, "310") == 0)        
			@TempMIDIPort = "310"
		@elseif (@CheckPortIO(@MIDI, "300") == 0)        
			@TempMIDIPort = "300"
		@else
			@Display
				@cls
				
				
				Could not determine whether IRQ 5 will work
				
				
				
					@pause
			@EndDisplay
		@endif
		
		@if ("@TempMIDIPort" != "")
			@if (@CheckIRQ(@MIDI, "@TempMIDIPort", "5", "") != 0)     
				@Display
					
					
		
		
		










		Blaster IRQ @BlasterIRQ failed. Try a different setting.
		
					
					
					@pause
				@EndDisplay     
				@goto BLASTER_SETTINGS_MENU
			@endif
		@endif
	
	@elseif (@CheckIRQ(@WSS, "@BlasterPort", "@BlasterIRQ", "@BlasterDMA") != 0)    
		@Display
			
			
		
		
		











		Blaster IRQ @BlasterIRQ failed. Try a different setting.

			
			
					@pause
		@EndDisplay     
		@goto BLASTER_SETTINGS_MENU
	@endif
		
	@Row = (@Row + 1)
    @movecstr(@Row, 7, 31, "Checking Blaster DMA: @BlasterDMA")
	@if (@CheckDMA(@WSS, "@BlasterPort", "@BlasterIRQ", "@BlasterDMA") != 0)    
		@Display
			
			
			
		
		
		










		Blaster DMA @BlasterDMA failed. Try a different setting.
			
			
			
					@pause
		@EndDisplay     
		@goto BLASTER_SETTINGS_MENU
    @endif

@endif

/*
	@display
		
		
		
		
		
		
		@pause
	@enddisplay     
*/





@if (@WindowsInstall == @true)
// Default MIDI device
	@SetOption(40)
	@GetOption
	@movecstr(2, 5, 31, "                                                ")
	@movecstr(4, 7, 31, "                                    ")
	@movecstr(6, 7, 31, "                                    ")
		@CheckBox
		@movecstr(0, 25, 30, "Windows default MIDI")
		@movecstr(3, 5, 27, "Space bar - alternate selecting or deselecting the option")
		@movecstr(5, 5, 27, "Enter - accept the option as shown")
		@LocalWindow(12,37)  // was 40
	@movecstr(8, 5, 31, "Would you like Tropez to be the Windows default MIDI device?")
		@Option 40 = "Tropez MIDI?"
	@EndOption
@endif


/*
@ClearOption(60)
@GetOption
	@CheckBox
	@movecstr(0, 25, 30, "Automatic reboot after install")
    @movecstr(3, 5, 27, "Space bar - alternate selecting or deselecting the option")
    @movecstr(5, 5, 27, "Enter - accept the option as shown")
	@LocalWindow(10,40)
	@Option 60 = "Do you want machine to automatically reboot at the end of install?"
@EndOption
*/


// *************************************************
// Show all settings; give user a chance to change them
// *************************************************

SHOW_ALL:

@Display
	@cls
@EndDisplay
	
@movecstr(0, 5, 30, "You have chosen a(n) @ActionStr")

//@if (2[!@option)
	@movecstr(0, 41, 30, "for environment(s): ")
	
	@if (@DosInstall)
		@movecstr(0, 61, 30, "DOS")
		@if (@WindowsInstall)
			@movecstr(0, 65, 30, "and Windows")
		@endif  
	@elseif (@WindowsInstall)
		@movecstr(0, 61, 30, "Windows")
	@endif
	
//@endif  


@movecstr(2, 5, 31, "Application directory used: @OutDrive:@subdir")
@if (@WindowsInstall == @true)
	@movecstr(3, 5, 31, "Windows directory used: @EnteredWinDrive:@EnteredWinDir")
@endif  

@if (1[=@option && @WindowsInstall)
	@movecstr(6, 5, 27, "Here are the Windows applications to be installed:")

	@if (31[=@option) 
		@movecstr(7, 7, 31, "TB Mixer") 
	@endif
	@if (32[=@option) 
		@movecstr(8, 7, 31, "Wave SE") 
	@endif
	@if (33[=@option) 
		@movecstr(9, 7, 31, "MicroWave") 
	@endif
	@if (34[=@option) 
		@movecstr(7, 25, 31, "Mouse Player") 
	@endif
	@if (35[=@option) 
		@movecstr(8, 25, 31, "Stratos") 
	@endif
	@if (36[=@option) 
		@movecstr(9, 25, 31, "Sierra Audio Rack") 
	@endif
	@if (37[=@option) 
		@movecstr(7, 46, 31, "Wave Patch") 
	@endif
	@if (38[=@option) 
		@movecstr(8, 46, 31, "TBCD") 
	@endif
	@if (39[=@option) 
		@movecstr(9, 46, 31, "TB Demo") 
	@endif



@endif

@if (1[=@option)
	@movecstr(11, 5, 31, "Disk space needed for this install: @TotalSizeBytes bytes")
	@movecstr(12, 5, 31, "Free disk space on @OutDrive: @DiskFree(@OutDrive) bytes")        
@endif


@if (2[!@option)
	@movecstr(14, 5, 27, "Primary hardware settings:")
	@movecstr(15, 5, 31, "Port: @MainPort")
	@movecstr(16, 5, 31, "IRQ: @MainIRQ")
	@movecstr(17, 5, 31, "DMA: @MainDMA")
	@movecstr(18, 5, 31, "WaveFront Port: @WFPort")
	@movecstr(19, 5, 31, "WaveFront IRQ: @WFIRQ")
	

	@if (@DOSInstall)
		@movecstr(14, 33, 27, "Blaster settings:")
		@movecstr(15, 33, 31, "Port: @BlasterPort")
		@movecstr(16, 33, 31, "IRQ: @BlasterIRQ")
		@movecstr(17, 33, 31, "DMA: @BlasterDMA")
	@endif

	@if (300[=@option)
		@movecstr(15, 58, 27, "CD-ROM attached:")
		@movecstr(16, 58, 31, "Type: @cdtype")
	@else 
		@movecstr(16, 58, 27, "No CD-ROM attached")
	@endif

@endif
	
@Display




















	@pause
@EndDisplay


@if(2[=@option)
	@goto UNINSTALL
@endif          


@Row = 1
@Display
	@Cls
@EndDisplay

@movecstr(@Row, 1, 30, "Please wait while changes are made to system startup files")


@Row = (@Row + 3)
@movecstr(@Row, 1, 31, "Backing up config.sys, autoexec.bat, and system.ini to .bak files")



// Backup autoexec.bat / config.sys / system.ini
@copy("@BootDrive:\\config.sys", "@BootDrive:\\config.bak")
@copy("@BootDrive:\\autoexec.bat", "@BootDrive:\\autoexec.bak")
@copy("@EnteredWinDrive:@EnteredWinDir\\system.ini", 
	"@EnteredWinDrive:@EnteredWinDir\\system.bak")

/*
@Display
	After backup up files!
	@pause
@EndDisplay     
*/

@if (@DosInstall)

	@Row = (@Row + 2)
	@movecstr(@Row, 1, 31, "Creating tzacdos.ini file for DOS settings")


	// *************************************************
	// Write tzacdos.ini
	// *************************************************

	@mkdir("@OutDrive:@subdir\\dosapps")
	@write("@OutDrive:@subdir\\dosapps\\TZACDOS.INI","wt","[MAD16]\n")
	@write(,,"MODE=SB\n")
	@write(,,"GAME_PORT=ENABLED\n")
	@write(,,"CDROM_MODEL=@cdtype \n")
	@write(,,"CDROM_BASE=@cdport \n")
	@write(,,"CDROM_IRQ=@cdIRQ \n")
	@write(,,"CDROM_DRQ=@cdDMA \n")
	@write(,,"MIDI=DISABLED\n")     
	@write(,,"OPL=3\n")
	@write(,,"POWER=ON\n")
	@write(,,"FREQUENCY_MAP=NORMAL\n")
	
	@write(,,"MIDI_IRQ=10\n")
	@write(,,"MIDI_PORT=300\n")
	@write(,,"WINDIR=@EnteredWinDrive:@EnteredWinDir\n")
	
	@write(,,"\n")

	@write(,,"[WAVEFRONT]\n")
	@write(,,"WF_PORT=@WFPort\n")
	@write(,,"WF_IRQ=@WFIRQ\n")
	@write(,,"WF_OSFILE=@outdrive:\\@subdir\\wf\\OSWF.MOT\n")
	@write(,,"WFVolume=100")
	
	@write(,,"\n")

	
	// write to the Mixer section
	@write(,,"[MIXER]\n")
	@write(,,"CD=Aux1,CD/Line\n")
	@write(,,"FM=Aux2,FM\n")
	@write(,,"Linein=Line,Line\n")
	@write(,,"\n")
	
	// write to the Sound Blaster pro section
	@write(,,"[SBPRO]\n")
	@write(,,"PORT=@blasterport \n")
	@write(,,"IRQ=@blasterirq \n")
	@write(,,"DRQ=@blasterDMA \n")
	@write(,,"\n")
	@write(,,"InputSelection=LINE\n\n")
	@write(,,"; Line input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lLineVolume=32767\nrLineVolume=32767\n\n")
	@write(,,"; Mic input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lMicVolume=32767\nrMicVolume=32767\n\n")
	@write(,,"; MicBoost indicates if 20db additional boost is added when the mic input is selected.\n")
	@write(,,"MicBoost=OFF\n\n")
	@write(,,"; Aux input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lAuxInVolume=32767\nrAuxInVolume=32767\n\n")
	@write(,,"; Loop back input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lLoopBackInputVolume=32767\nrLoopBackInputVolume=32767\n\n")
	@write(,,"; Monitor attenuation. 0 - 65535=full to no attenuation in 64 1.5 dB steps.\n")
	@write(,,"MonitorVolume=32767\n")
	@write(,,"MonitorMute=ON\n\n")
	@write(,,"; CS4231 output atten setting. 0 - 65535=full to no attenuation in 64 1.5 dB steps.\n")
	@write(,,"lMasterVolume=43252\nrMasterVolume=43252\nMasterMute=off\n\n")
	@write(,,"; Aux Volume setting 0 - 65535. No gain to full gain in 32 1.5 dB steps.\n")
	@write(,,"lAuxVolume=43252\nrAuxVolume=43252\nAuxMute=OFF\n\n")
	@write(,,"; Aux2 volume setting 0 - 65535. No gain to full gain in 32 1.5 dB steps.\n")
	@write(,,"lAux2Volume=43252\nrAux2Volume=43252\nAux2Mute=OFF\n\n")
	@write(,,"; Line Mix volume setting 0 - 65535. No gain to full gain in 32 1.5 dB steps.\n")
	@write(,,"lLineMixVolume=43252\nrLineMixVolume=43252\nLineMixMute=OFF\n\n")
	@write(,,"; Mono Mix volume setting 0 - 65535. full to no attenuation in 16 3dB steps.\n")
	@write(,,"MonoVolume=32767\nMonoMute=ON\nMonoOutMute=ON\n\n")
	@write(,,"; The default dither state.  This may be over-ridden at some record formats.\n")
	@write(,,"Dither=OFF\n")
	@write(,,"\n")
	
	// Windows sound system section
	
	@write(,,"[WSS]\n\n")
	@write(,,"PORT=@MainPort\n")
	
	@write(,,"IRQ=@MainIRQ\n")
	@write(,,"PDRQ=@MainDMA\n")
	@write(,,"CDRQ=@MainDMA\n")
	@write(,,"ISS=0\n\n")
	
	@write(,,"InputSelection=LINE\n\n")
	@write(,,"; Line input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lLineVolume=32767\nrLineVolume=32767\n\n")
	@write(,,"; Mic input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lMicVolume=32767\nrMicVolume=32767\n\n")
	@write(,,"; MicBoost indicates if 20db additional boost is added when the mic input is selected.\n")
	@write(,,"MicBoost=OFF\n\n")
	@write(,,"; Aux input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lAuxInVolume=32767\nrAuxInVolume=32767\n\n")
	@write(,,"; Loop back input gain. 0 to 65535=0 to 22.5 db gain in 16 1.5dB steps.\n")
	@write(,,"lLoopBackInputVolume=32767\nrLoopBackInputVolume=32767\n\n")
	@write(,,"; Monitor attenuation. 0 - 65535=full to no attenuation in 64 1.5 dB steps.\n")
	@write(,,"MonitorVolume=32767\n")
	@write(,,"MonitorMute=ON\n\n")
	@write(,,"; CS4231 output atten setting. 0 - 65535=full to no attenuation in 64 1.5 dB steps.\n")
	@write(,,"lMasterVolume=43252\nrMasterVolume=43252\nMasterMute=off\n\n")
	@write(,,"; Aux Volume setting 0 - 65535. No gain to full gain in 32 1.5 dB steps.\n")
	@write(,,"lAuxVolume=43252\nrAuxVolume=43252\nAuxMute=OFF\n\n")
	@write(,,"; Aux2 volume setting 0 - 65535. No gain to full gain in 32 1.5 dB steps.\n")
	@write(,,"lAux2Volume=43252\nrAux2Volume=43252\nAux2Mute=OFF\n\n")
	@write(,,"; Line Mix volume setting 0 - 65535. No gain to full gain in 32 1.5 dB steps.\n")
	@write(,,"lLineMixVolume=43252\nrLineMixVolume=43252\nLineMixMute=OFF\n\n")
	@write(,,"; Mono Mix volume setting 0 - 65535. full to no attenuation in 16 3dB steps.\n")
	@write(,,"MonoVolume=32767\nMonoMute=ON\nMonoOutMute=ON\n\n")
	@write(,,"; The default dither state.  This may be over-ridden at some record formats.\n")
	@write(,,"Dither=OFF\n")




	// *************************************************
	// Put SET BLASTER and Hot key mixer into autoexec.bat
	// *************************************************

	// Line must be removed first because it will get added a second time if install doesn't
	//  find an exact match

	@removeline("@bootdrive:\\autoexec.bat", "", "setupsnd", "", "REM")

	@setautoexec
		@overwrite
		@path="@OutDrive:@subdir\\DOSAPPS"
		@setreplace("blaster","a@blasterport i@blasterirq d@blasterdma t2")
		@verbatim="@OutDrive:\\@subdir\\dosapps\\setupsnd /a@WFPort /i@WFIRQ @OutDrive:\\@subdir\\dosapps\\oswf.mot"
	@endautoexec

@endif  // @DosInstall is TRUE







@if(3[=@option)
	@goto AFTER_DEFINE_DISKS
@endif  


// *************************************************
// Define the disk set
// *************************************************
@DefineDisk
	@Label = "Disk #1"
    @BeginLib dos.red
		// DOS files
		@F SOUNDTST.WAV @S 33692 @O DOSAPPS\*.* @option 21
		@F TZHKMIX.COM @S 5036 @O DOSAPPS\*.* @option 21
		//@F MCSBMIX.COM @S 8513 @O DOSAPPS\*.* @option 21   Got rid of this by Ted Wood's request
		@F TZACMIX.EXE @S 32871 @O DOSAPPS\*.* @option 21
		@F TZDIAG.EXE @S 65158 @O DOSAPPS\*.* @option 21
		@F TZMODE.EXE @S 41568 @O DOSAPPS\*.* @option 21
		@F TZSETUP.EXE @S 241534 @O DOSAPPS\*.* @option 21
		@F PLAYCD.EXE @S 10507 @O DOSAPPS\*.* @option 21
		//@F CUREG.KEY @S 51 @O DOSAPPS\*.* @option 21
		@F WFDOS.EXE @O DOSAPPS\*.* @option 21
		@F SETUPSND.EXE @O DOSAPPS\*.* @option 21
		@F OSWF.MOT @O DOSAPPS\*.* @option 21
		@F OSWF.MOT @O WF\*.* @option 22
	@EndLib 


	@if(@WindowsInstall == @true)
	
	    @BeginLib sierra.red    
		// Sierra files                                                                         
		
			@F SIERRA.EXE @S 380064 @O WINAPPS\*.* @option 36
			@F SIERRA.DLL @O WINAPPS\*.* @option 36
			@F SIERRAMM.DLL @S 4704 @O WINAPPS\*.* @option 36
			@F SIERRA.HLP @S 10752 @O WINAPPS\*.* @option 36
	    @EndLib
	
		@BeginLib wavese.red
		// WaveSE stuff
			@F VIEWS.DAT @S 1560 @O WINAPPS\*.* @option 32
			@F WAVEEQ.DAT @S 1760 @O WINAPPS\*.* @option 32
			@F BWCC.DLL @S 152304 @O WINAPPS\*.* @option 32
			@F KNBCTRL.DLL @S 27584 @O WINAPPS\*.* @option 32
			@F SLDCTRL.DLL @S 28768 @O WINAPPS\*.* @option 32
			@F WAVEMME.DLL @S 246784 @O WINAPPS\*.* @option 32
			@F WAVFRONT.DLL @S 38400 @O WINAPPS\*.* @option 32
			@F WAVE.EXE @S 784128 @O WINAPPS\*.* @option 32
			@F WAVEFONT.FON @S 4768 @O WINAPPS\*.* @option 32
			@F EFFECTS.WRI @S 2176 @O WINAPPS\*.* @option 32
			@F WAVESE.WRI @S 17536 @O WINAPPS\*.* @option 32
			@F DONE.WAV @S 10283 @O WINAPPS\*.* @option 32
			@F WAVEHELP.HLP @S 91093 @O WINAPPS\*.* @option 32
			@F WFGATE.DLL @O @EnteredWinDrive:@EnteredWinDir\*.* @option 32
			@F WFSYSEX.DLL @O @EnteredWinDrive:@EnteredWinDir\*.* @option 32
		@EndLib 

		
		@BeginLib tbcd.red
		// TBCD stuff
			@F TBCD.EXE @S 67328 @O WINAPPS\*.* @option 38
			@F TBCD.HLP @S 16919 @O WINAPPS\*.* @option 38
	@EndLib
	
	
	    @BeginLib winsetup.red    
		// Sierra files
			@F WINSETUP.EXE @O WINAPPS\*.* @option 22
	    @EndLib
	
		@File readme.wri
		@File qa.wri
	@endif

@EndDisk        

@if(@WindowsInstall == @true)
	@DefineDisk
		@Label = "Disk #2"
		@BeginLib midimap.red
			@File MIDIMAP.STD @O @EnteredWinDrive:@EnteredWinDir\SYSTEM\*.*
		@EndLib

	    @BeginLib driver.red
			// driver/386 files for regular driver
			@F TROPEZ.DRV @O DRV\*.*
			@F TROPMIDI.DRV @O DRV\*.*
			@F OPL3.DRV @O DRV\*.*
			@F VSNDSYS.386 @O DRV\*.*
			@F TROPEZ.INI @O @EnteredWinDrive:@EnteredWinDir\*.*
		@EndLib 
	
		@BeginLib mousplay.red  
			// Mouse Player files
			@F MOUSPLAY.EXE @S 75104 @O WINAPPS\*.* @option 34
			@F MOUSPLAY.HLP @S 13636 @O WINAPPS\*.* @option 34
			@F MOUSPLAY.INI @O WINAPPS\*.* @option 34
		@EndLib 
	
		@BeginLib stratos.red   
			// Stratos stuff
			@File bach.cmp @Size 51781 @O WINAPPS\*.* @option 35
			@F JESUJOY.CMP @S 42145 @O WINAPPS\*.* @option 35
			@F MOZART.CMP @S 44812 @O WINAPPS\*.* @option 35
			@F WILLTELL.CMP @S 86551 @O WINAPPS\*.* @option 35
			@F W3_MEM.DLL @S 3104 @O WINAPPS\*.* @option 35
			@F W3_MULTI.DLL @S 23552 @O WINAPPS\*.* @option 35
			@F W3DLL.DLL @S 95792 @O WINAPPS\*.* @option 35
			@F W3FONT.DLL @S 29696 @O WINAPPS\*.* @option 35
			@F W3HLPPRN.DLL @S 4352 @O WINAPPS\*.* @option 35
			@F W3PALETT.DLL @S 78576 @O WINAPPS\*.* @option 35
			@F COMPOSE3.EXE @S 334928 @O WINAPPS\*.* @option 35
			@F JUKEBOX3.EXE @S 36672 @O WINAPPS\*.* @option 35
			@F TAPEDEK3.EXE @S 103536 @O WINAPPS\*.* @option 35
			@F STRATOS.HLP @S 346750 @O WINAPPS\*.* @option 35
			@F BUMBLE.TDK @S 18522 @O WINAPPS\*.* @option 35
			@F EINKLEIN.TDK @S 18158 @O WINAPPS\*.* @option 35
			@F MINUETG.TDK @S 7262 @O WINAPPS\*.* @option 35
			@F POMP.TDK @S 13206 @O WINAPPS\*.* @option 35
			@F PRELUDE2.TDK @S 20726 @O WINAPPS\*.* @option 35
			@F REJOUIS.TDK @S 79274 @O WINAPPS\*.* @option 35
			@F RUSSIAN.TDK @S 16550 @O WINAPPS\*.* @option 35
			@F W3TTF.TTF @S 48012 @O WINAPPS\*.* @option 35
			@F W3TTFB.TTF @S 26332 @O WINAPPS\*.* @option 35
			@F STRATOS.INI @O @EnteredWinDrive:@EnteredWinDir\*.* @option 35
		@EndLib 
		
		@BeginLib tbmixer.red   
			// TBMixer files
			@F TBMIXER.EXE @S 124784 @O WINAPPS\*.* @option 31
			@F SLDCTRL2.DLL @S 77696 @O WINAPPS\*.* @option 31
			@F MSMIXMGR.DLL @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 31
		@EndLib 
			
		@BeginLib mcrowave.red
			// MicroWave stuff
			@F MICROWAV.EXE @S 285184 @O WINAPPS\*.* @option 33
			@F MWAVEMME.DLL @S 129792 @O WINAPPS\*.* @option 33
			@F MICROWAV.HLP @S 29624 @O WINAPPS\*.* @option 33
			@F WAVEFONT.FON @O WINAPPS\*.* @option 33
			@F BWCC.DLL @O WINAPPS\*.* @option 33
			
			@File OLECLI.DLL @Out @EnteredWinDrive:@EnteredWinDir\system\*.* @option 33
			@File OLESVR.DLL @Out @EnteredWinDrive:@EnteredWinDir\system\*.* @option 33
		@EndLib 
		
		@BeginLib tbsdemo.red
			// TB Demo stuff
			@F TBSDEMO.EXE @O WINAPPS\*.* @option 39
			@F WFJAZZ.MID @O WINAPPS\*.* @option 39
			@F WFNA.MID @O WINAPPS\*.* @option 39
			@F WFORCH.MID @O WINAPPS\*.* @option 39
			@F WFROCK.MID @O WINAPPS\*.* @option 39
		@EndLib 

	
	@EndDisk

	@DefineDisk
		@Label = "Disk #3"

		@BeginLib wavepach.red
			// WavePatch stuff
			@F WFLOADER.EXE @O WF\*.* @option 37
			@F WFPATCH.EXE @O WF\*.* @option 37
			@F WFPATCH.HLP @O WF\*.* @option 37
			@F HELPRINT.DLL @O @EnteredWinDrive:@EnteredWinDir\*.* @option 37
			@F RIOPATCH.INI @O @EnteredWinDrive:@EnteredWinDir\*.* @option 37
			@F SLIDER2.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 37
			@F KBDLIST.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 37
			@F GAUGE.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 37
			@F WFENVLOP.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 37
			@F SPIN.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 37
			@F CTL3DV2.DLL @O @EnteredWinDrive:@EnteredWinDir\system\*.* @option 37
		@EndLib
		
		@BeginLib wfcp.red
			// WaveFront Control Panel
			@F WFCP.EXE @O WF\*.*
			@F SLDCTRL.DLL @O WF\*.*
			@F GM_TROP.WFB @O WF\*.*
			@F GM_MAUI.WFB @O WF\*.*
			@F GM_RIO.WFB @O WF\*.*
			@F KNBCTRL.DLL @O WF\*.*
			@F WFCP.HLP @O WF\*.*
			@F WFPATCH.INI @O @EnteredWinDrive:@EnteredWinDir\*.*
			@F MAUI.INI @O @EnteredWinDrive:@EnteredWinDir\*.*
			@F WFGATE.DLL @O @EnteredWinDrive:@EnteredWinDir\*.*
			@F WFSYSEX.DLL @O @EnteredWinDrive:@EnteredWinDir\*.*
			@F WFCP.INI @O @EnteredWinDrive:@EnteredWinDir\*.*
		@EndLib

		@BeginLib dlls.red
			// DLLs to be updated.
			@F THREED.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.*
			@F ANIBUTON.VBX @O @EnteredWinDrive:@EnteredWinDir\system\*.*
			@F CTL3DV2.DLL @O @EnteredWinDrive:@EnteredWinDir\system\*.*
		@EndLib 

			
	@EndDisk

@endif  // This is a Windows install.


AFTER_DEFINE_DISKS:

//        Please wait while changes are made to your system.ini...

/*
@Display
	Please wait while changes are made to your system.ini...
@enddisplay
*/

// **********************************************
// All Windows ini file changes happen here
// **********************************************
@if (@WindowsInstall)
	/*
	New functions:
		@WriteProfString()
		@GetProfString()
		@ReplaceProfString()
	*/      
	
	@DrvPath = "@OutDrive:@subdir\\drv"

/*
	@Display
		drv path!
		@DrvPath
	@EndDisplay     
*/

	@Col = 0
	@Row = (@Row + 2)
	@movecstr(@Row, 1, 31, "Writing Tropez settings to system.ini")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")
	
	@WriteProfString("@SysIni", "sndsys.drv", "IOAddress", "@MainPort")     
	@WriteProfString("@SysIni", "sndsys.drv", "Interrupt", "@MainIRQ")      
	@WriteProfString("@SysIni", "sndsys.drv", "Duplex", "EnhancedFull")
	@WriteProfString("@SysIni", "sndsys.drv", "DMAADC", "@MainDMA") 
	@WriteProfString("@SysIni", "sndsys.drv", "DMADAC", "@MainDMA")
	@WriteProfString("@SysIni", "tropmidi.drv", "PortAddr", "@WFPort")
	@WriteProfString("@SysIni", "tropmidi.drv", "IrqNum", "@WFIRQ")
	

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

		
	@WriteProfString("@SysIni", "opl3.drv", "int", "0")
	@WriteProfString("@SysIni", "opl3.drv", "portFM", "388")


	@ReplaceProfString("@SysIni", "386Enh", "device", "vsndsys.386", "@DrvPath\\vsndsys.386")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	
	@WriteProfString("@SysIni", "sndsys.drv", "SingleModeDMA", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "DMABufferSize", "36")
	@WriteProfString("@SysIni", "sndsys.drv", "OldMSDosGameCompatibility", "1")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@WriteProfString("@SysIni", "sndsys.drv", "WatchMSDosExec", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "BlasterSupport", "OTI929")
	@WriteProfString("@SysIni", "sndsys.drv", "Msft Hardware", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "Msft Support", "1")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@WriteProfString("@SysIni", "sndsys.drv", "AutoSelect", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "Midi Play", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "EnableAutoAcquireOPL3", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "DMA 0", "1")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@WriteProfString("@SysIni", "sndsys.drv", "DMA 1", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "DMA 3", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "Default DMA", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "I/O 530", "1")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@WriteProfString("@SysIni", "sndsys.drv", "I/O 604", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "I/O E80", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "I/O F40", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "Default I/O", "530")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@WriteProfString("@SysIni", "sndsys.drv", "IRQ 7", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "IRQ 9", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "IRQ 10", "1")
	@WriteProfString("@SysIni", "sndsys.drv", "IRQ 11", "1")

	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@WriteProfString("@SysIni", "sndsys.drv", "Default IRQ", "7")
	@WriteProfString("@SysIni", "sndsys.drv", "FMMixer", "Aux2")
	@WriteProfString("@SysIni", "sndsys.drv", "CDMixer", "Aux1")
	@WriteProfString("@SysIni", "sndsys.drv", "LineMixer", " ")


	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	
	@RemoveDriver("@SysIni", "WAVE", "@DrvPath\\tropez.drv")
	@RemoveDriver("@SysIni", "MIDI", "@DrvPath\\tropmidi.drv")
	@RemoveDriver("@SysIni", "MIDI", "@DrvPath\\opl3.drv")
	@RemoveDriver("@SysIni", "AUX", "@DrvPath\\tropez.drv")
	@RemoveDriver("@SysIni", "MIXER", "@DrvPath\\tropez.drv")
	
	
	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

	@EstablishDriver("@SysIni", "MIDI", "@DrvPath\\opl3.drv")
	@EstablishDriver("@SysIni", "MIDI", "@DrvPath\\tropmidi.drv")
	@EstablishDriver("@SysIni", "WAVE", "@DrvPath\\tropez.drv")
	@EstablishDriver("@SysIni", "AUX", "@DrvPath\\tropez.drv")
	@EstablishDriver("@SysIni", "MIXER", "@DrvPath\\tropez.drv")


	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

		
	// set up msmixmgr.dll in system.ini
	@BootLine = @GetProfString("@SysIni", "boot", "drivers")
	
	@if ((@StrFind("@BootLine", "msmixmgr.dll") == -1) && 
		(@StrFind("@BootLine", "MSMIXMGR.DLL") == -1))
		@WriteProfString("@SysIni", "boot", "drivers", "@BootLine msmixmgr.dll")
	@endif          
			
				
	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")

		
    
	    
@endif  // this is windows install




@goto BEGIN_FINISH_BLOCK



// ******************************************
// Uninstall routine
// ******************************************
UNINSTALL:
	@if (!(@WindowsInstall || @DOSInstall))  // if neither was chosen, ensure that nothing is done
		goto ENDOFFILE
	@endif
			
	
	/*
	@ClearOption(50)
	@GetOption
		@CheckBox
		@Option 50 = "Are you sure you wish to delete @OutDrive:@subdir directory?"
	@EndOption
	*/
	
	@Row = 0
    @Col = 0;
	

	@chdrive(@OutDrive)
	@chdir("\\")

@if (@WindowsInstall && @DOSInstall)  // delete all files
	@if (@System("deltree @OutDrive:@SubDir /y") == -1)
		@Display
	Could not load command processor! Probably not enough memory.
			@pause
		@EndDisplay       
	@EndIf
@elseif (@WindowsInstall)  // delete Windows files only
	// if dos files do not exist, deltree whole tropez dir.
	// We're making the assumption here that if tzmode.exe is not at this location, they
	//  never installed for DOS and have no tropez lines in their autoexec.bat/config.sys
    @if (@exists("@OutDrive:@SubDir\\dosapps\\tzmode.exe") != @TRUE)
		@if (@System("deltree @OutDrive:@SubDir /y") == -1)
			@Display
		Could not load command processor! Probably not enough memory.
				@pause
			@EndDisplay
		@endif         
    @else  // just delete Windows components, not whole tropez dir.
		@if (@System("deltree @OutDrive:@SubDir\\winapps /y") == -1)
			@Display
		Could not load command processor! Probably not enough memory.
				@pause
			@EndDisplay       
		@else  // the first deltree was successful
			@System("deltree @OutDrive:@SubDir\\drv /y")
			@System("deltree @OutDrive:@SubDir\\wf /y")
			@Delete("@OutDrive:@SubDir\\readme.wri")
			@Delete("@OutDrive:@SubDir\\qa.wri")
		@EndIf
    @endif
	
	
@elseif (@DOSInstall)  // delete DOS files only
	// if windows files do not exist, deltree whole tropez dir.
	// We're making the assumption here that if these three files are not at this location,
	//  they never installed for Windows, and there are no tropez lines in system.ini
	@if ( (@exists("@OutDrive:@SubDir\\winapps\\tbmixer.exe") != @true)
		&& (@exists("@OutDrive:@SubDir\\drv\\tropez.drv") != @true)
		&& (@exists("@OutDrive:@SubDir\\readme.wri") != @true) )
		@if (@System("deltree @OutDrive:@SubDir /y") == -1)
			@Display
		Could not load command processor! Probably not enough memory.
				@pause
			@EndDisplay
		@endif         
		
    @else  // just delete dosapps dir, not whole tropez dir.
		@if (@System("deltree @OutDrive:@SubDir\\dosapps /y") == -1)
			@Display
		Could not load command processor! Probably not enough memory.
				@pause
			@EndDisplay
		@endif         
    @endif

@endif

	  


@if(@WindowsInstall)
	@DrvPath = "@OutDrive:@subdir\\drv"
	// first let's delete the Tropez group
	@RunLine = @GetProfString("@EnteredWinDrive:@EnteredWinDir\\win.ini", "windows", "run")
	
	@if ( (@StrFind("@RunLine", "winsetup.exe") != -1)    // make sure winsetup.exe never runs
		|| (@StrFind("@RunLine", "WINSETUP.EXE") != -1) )
	      
		@ReplaceProfString("@EnteredWinDrive:@EnteredWinDir\\win.ini", "windows", "run", "winsetup.exe", " ")
	@else  // remove the indicated group file and line from progman.ini
		@GroupFilePath = @GetProfString("@EnteredWinDrive:@EnteredWinDir\\tropez.ini", "GrpInfo", "GroupFilePath") 
		@if (@exists("@GroupFilePath") == @TRUE)
		    @Delete("@GroupFilePath")
		    @removeline("@EnteredWinDrive:@EnteredWinDir\\progman.ini", "Groups", "", "@GroupFilePath", ";")
		@endif
    @endif
    
	@Row = (@Row + 2)
	@movecstr(@Row, 1, 31, "Deleting ini files from @EnteredWinDir directory")
	@Delete("@EnteredWinDrive:@EnteredWinDir\\stratos.ini")
	@Delete("@EnteredWinDrive:@EnteredWinDir\\tropez.ini")
	@Delete("@EnteredWinDrive:@EnteredWinDir\\riopatch.ini")
	@Delete("@EnteredWinDrive:@EnteredWinDir\\helprint.dll")
	//@Delete("@EnteredWinDrive:@EnteredWinDir\\wfpatch.ini")
	//@Delete("@EnteredWinDrive:@EnteredWinDir\\maui.ini")
	@Delete("@EnteredWinDrive:@EnteredWinDir\\wfcp.ini")


	
	@Row = (@Row + 2)
	@movecstr(@Row, 1, 31, "Deleting lines from system.ini")

    
	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")
    
	
	
	@RemoveDriver("@SysIni", "WAVE", "@DrvPath\\tropez.drv")
	@RemoveDriver("@SysIni", "MIDI", "@DrvPath\\tropmidi.drv")
	@RemoveDriver("@SysIni", "MIDI", "@DrvPath\\opl3.drv")
	@RemoveDriver("@SysIni", "AUX", "@DrvPath\\tropez.drv")
	@RemoveDriver("@SysIni", "MIXER", "@DrvPath\\tropez.drv")
	
    
	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")
    
	@removeline("@SysIni", "", "device", "vsndsys.386", ";")
	
	// Remove whole sections.
	@removeline("@SysIni", "sndsys.drv", "", "", ";")
	@removeline("@SysIni", "opl3.drv", "", "", ";")
	@removeline("@SysIni", "tropmidi.drv", "", "", ";")
@endif
	
@if(@DOSInstall)
	@Row = (@Row + 2)
	@movecstr(@Row, 1, 31, "Deleting files from autoexec.bat and config.sys")
	
	@removeline("@bootdrive:\\autoexec.bat", "", "setupsnd", "", "REM")
	@removeline("@bootdrive:\\autoexec.bat", "", "wfdos", "", "REM")
	
	//@removeline("@bootdrive:\\autoexec.bat", "", "mchkmix", "", "REM")
	@removeline("@bootdrive:\\config.sys", "", "device", "tzmode", "REM")
	
	@removepath("@bootdrive:\\autoexec.bat", "path", "@SubDir", "rem")
    
	@Col = (@Col + 1)
	@movecstr((@Row+1), @Col, 31, ".")
@endif    

	//@Delete("@OutDrive:\\tzuninst.ini")
	
	@Display
		@Cls
  
  Uninstallation completed successfully.
				  
				  
				  @Pause
	@EndDisplay     



@goto ENDOFFILE



BEGIN_FINISH_BLOCK:

@Display
	@Cls
@EndDisplay


@TropezIni = "@EnteredWinDrive:@EnteredWinDir\\tropez.ini"


@Finish
	// make all system.ini/autoexec.bat/config.sys changes that could not be made above
	
	//Please wait while further changes are made.
	
	@if(@DOSInstall == @true)
		@if(@putmcmode1st("TZMODE", "@bootdrive:\\config.sys", "device=@outdrive:@subdir\\dosapps\\tzmode.exe")) @endif
	@endif
	
	@if (@WindowsInstall == @TRUE)
	
		
		@if(1[=@option)  // we are installing.
			
			
			// Set up Windows program group and items
		    
		    // write changes into tropez.ini
			@if (31[=@option)  // TB Mixer
				@if(@WriteProfString("@TropezIni", "ProgramItems", "TBMixer", 
					"@OutDrive:@subdir\\winapps\\tbmixer.exe")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "TBMixer", "0")) @endif
			@endif  
			
			@if (32[=@option)  // Wave SE
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WaveSE", 
					"@OutDrive:@subdir\\winapps\\wave.exe")) @endif   
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WaveWrite", 
					"write @OutDrive:@subdir\\winapps\\wavese.wri")) @endif   
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WaveEffects", 
					"write @OutDrive:@subdir\\winapps\\effects.wri")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WaveSE", "0")) @endif
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WaveWrite", "0")) @endif
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WaveEffects", "0")) @endif
			@endif  
			


			@if (33[=@option)  // MicroWave
				@if(@WriteProfString("@TropezIni", "ProgramItems", "MicroWave", 
					"@OutDrive:@subdir\\winapps\\microwav.exe")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "MicroWave", "0")) @endif
			@endif  
			
			@if (34[=@option)  // Mouse Player
				@if(@WriteProfString("@TropezIni", "ProgramItems", "MousPlay", 
					"@OutDrive:@subdir\\winapps\\mousplay.exe")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "MousPlay", "0")) @endif
			@endif  
			
			@if (35[=@option)  // Stratos
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Manuscript", 
					"@OutDrive:@subdir\\winapps\\compose3.exe")) @endif   
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Jukebox", 
					"@OutDrive:@subdir\\winapps\\jukebox3.exe")) @endif   
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Sequencer", 
					"@OutDrive:@subdir\\winapps\\tapedek3.exe")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Manuscript", "0")) @endif
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Jukebox", "0")) @endif
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Sequencer", "0")) @endif
			@endif  
			
			@if (36[=@option)  // Sierra
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Sierra", 
					"@OutDrive:@subdir\\winapps\\sierra.exe")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "Sierra", "0")) @endif
			@endif  


			@if (37[=@option)  // Wave Patch
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WavePatch", 
					"@OutDrive:@subdir\\wf\\wfpatch.exe")) @endif   
				@if(@WriteProfString("@TropezIni", "ProgramItems", "AutoLoader", 
					"@OutDrive:@subdir\\wf\\wfloader.exe")) @endif   
			@else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "WavePatch", "0")) @endif
				@if(@WriteProfString("@TropezIni", "ProgramItems", "AutoLoader", "0")) @endif
			@endif
						

	    @if (38[=@option)  // TBCD
				@if(@WriteProfString("@TropezIni", "ProgramItems", "TBCD", 
					"@OutDrive:@subdir\\winapps\\tbcd.exe")) @endif   
	    @else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "TBCD", "0")) @endif
	    @endif
	    
			
			// WaveFront Control Panel.
			@if(@WriteProfString("@TropezIni", "ProgramItems", "ControlPanel", 
				"@OutDrive:@subdir\\wf\\wfcp.exe")) @endif   
	    

	    @if (39[=@option)  // TB Demo
				@if(@WriteProfString("@TropezIni", "ProgramItems", "TropezDemo", 
					"@OutDrive:@subdir\\winapps\\tbsdemo.exe")) @endif   
	    @else
				@if(@WriteProfString("@TropezIni", "ProgramItems", "TropezDemo", "0")) @endif
	    @endif

		
			@if(@WriteProfString("@TropezIni", "ProgramItems", "ReleaseNotes", 
				"write @OutDrive:@subdir\\readme.wri")) @endif   
				
			@if(@WriteProfString("@TropezIni", "ProgramItems", "QA", 
				"write @OutDrive:@subdir\\qa.wri")) @endif   
			
			
			// We want Program groups and items to be set up the next time Windows is run
		    @if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\win.ini", "windows", "run", 
			"@OutDrive:@subdir\\winapps\\winsetup.exe")) @endif   
		
		@endif
	
	
		// Write lines to stratos.ini
	
		//@Row = (@Row + 2)
		//@movecstr(@Row, 1, 31, "Writing lines to stratos.ini")
			
		@if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\STRATOS.INI", "Stratos", 
			"MIDI Input", "Tropez Ext. In")) @endif
		@if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\STRATOS.INI", "Stratos", 
			"MIDI Output", "Tropez Sample Player")) @endif
		
		
		@if (37[!@option)
			// Write bank location lines to wfpatch.ini just in case WavePatch is not installed.
			@if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\wfpatch.ini", 
				"Autoload Banks", "Tropez", "@OutDrive:@subdir\\wf\\gm_trop.wfb")) @endif
			@if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\wfpatch.ini", 
				"Autoload Banks", "Tropez 1", "@OutDrive:@subdir\\wf\\gm_trop.wfb")) @endif
			@if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\wfpatch.ini", 
				"Autoload Banks", "Tropez 2", "@OutDrive:@subdir\\wf\\gm_trop.wfb")) @endif
	@endif
	
	
		@if(@WriteProfString("@EnteredWinDrive:@EnteredWinDir\\tropez.ini",
			"install", "InstallPath", "@OutDrive:@subdir")) @endif

		
		// the following is for uninstall; it will know what to put for default uninstall directory
		@write("@OutDrive:\\tzuninst.ini","wt","[dummy section]\n")

		@if(@WriteProfString("@OutDrive:\\tzuninst.ini", "install", "InstallDrive", "@OutDrive")) @endif
	
		@if(@WriteProfString("@OutDrive:\\tzuninst.ini", "install", "InstallSubdir", "@subdir")) @endif
	
		
		
		
		// copy correct midimapper in!
		@if (40[=@option)       
			@Delete("@EnteredWinDrive:@EnteredWinDir\\system\\midimap.old")
			@Rename("@EnteredWinDrive:@EnteredWinDir\\system\\midimap.cfg",
				"midimap.old")
			@Rename("@EnteredWinDrive:@EnteredWinDir\\system\\midimap.std",
				"midimap.cfg")
		@endif                              
	
	@endif   // Windows Install


	@Reboot("Your installation is finished. Please remove all diskettes and press any key to reboot your machine.", 0)
	
	
	@ChDrive @OutDrive
	@ChDir "@SubDir"


	Installation of @Name is now finished.

@EndFinish

ENDOFFILE:

/* end-of-file */

