// Install script for the Settlers II
// 5th of December 1995
// 24th of January 1996
// (c) 1995 Blue Byte Software GmbH


// Set language
SET_LANGUAGE 2

// Load background image
LOAD_BACKGROUND "gfx\pics\install.lbm"

// Go to setup if already installed, else go to install
IF_EXISTS setup.ini
	GOTO SetupMainMenu
ELSE
	GOTO InstallMainMenu
ENDIF


// Install main menu
:InstallMainMenu

MENU_START
MENU_ENTRY "Settlers II Installation"
MENU_ENTRY "Install Settlers II" InstallGame
MENU_ENTRY "Quit program" ExitInstallFromInstall
MENU_END


// Install the game
:InstallGame

// Select a target drive
SELECT_TARGET_DRIVE 25000 InstallMainMenu

// Select target path
SELECT_TARGET_PATH BLUEBYTE\SETTLER2

// Confirm installation
// ASSERT "M”chten Sie die Installation fortsetzen?" InstallMainMenu

// Inform the user that installation has started
PRINT "Preparing installation"

// Change to target directory
CD_TARGET

// Delete everything that may already be here
DELETE *.*
DELETE DRIVERS
DELETE DATA\MASKS
DELETE DATA\BOBS
DELETE DATA\IO
DELETE DATA\TXT
DELETE DATA\ANIMDAT
DELETE DATA\SOUNDDAT\SNG
DELETE DATA\SOUNDDAT\SAM
DELETE DATA\SOUNDDAT
DELETE DATA\TEXTURES
DELETE DATA\MBOB
DELETE DATA\CBOB
DELETE DATA\TXT2
DELETE DATA\MISSIONS
DELETE DATA\MAPS
DELETE DATA\ONLINE
DELETE DATA
DELETE GFX\PALETTE
DELETE GFX\PICS
DELETE GFX\TEXTURES
DELETE GFX\LAND
DELETE GFX
DELETE SAVE

// DELETE VIDEO

// Create directories
MD DRIVERS
MD DATA
MD DATA\MASKS
MD DATA\BOBS
MD DATA\IO
MD DATA\TXT
MD DATA\ANIMDAT
MD DATA\SOUNDDAT
MD DATA\SOUNDDAT\SAM
MD DATA\SOUNDDAT\SNG
MD DATA\TEXTURES
MD DATA\MBOB
MD DATA\CBOB
MD DATA\TXT2
MD DATA\MISSIONS
MD DATA\MAPS
MD DATA\ONLINE
MD GFX
MD GFX\PALETTE
MD GFX\PICS
MD GFX\TEXTURES
MD GFX\LAND
MD SAVE

// MD VIDEO

// Change to source directory
CD_SOURCE

// Inform the user that installation has started
PRINT "Installing Settlers II"

// Copy AIL drivers
INSTALL DRIVERS\*.* DRIVERS\*.*

// Copy stuff
INSTALL ROOT\S2.exe       S2.exe
INSTALL ROOT\START.BAT    START.BAT
INSTALL ROOT\NOSOUND.BAT  NOSOUND.BAT
INSTALL ROOT\SETTLER2.EXE SETTLER2.EXE
INSTALL ROOT\SETTLER2.VMC SETTLER2.VMC
INSTALL SETUP.EXE         SETUP.EXE
INSTALL INSTALL.SCR       INSTALL.SCR
INSTALL INSTALL.LBM       INSTALL.LBM
INSTALL DOS4GW.EXE        DOS4GW.EXE
INSTALL README.TXT        README.TXT
INSTALL NEWS.TXT          NEWS.TXT
INSTALL DATA\*.*          DATA\*.*
INSTALL DATA\MASKS\*.*    DATA\MASKS\*.*
INSTALL DATA\BOBS\*.*     DATA\BOBS\*.*
INSTALL DATA\IO\*.*       DATA\IO\*.*
INSTALL DATA\TXT\*.*      DATA\TXT\*.*
INSTALL DATA\ANIMDAT\*.*  DATA\ANIMDAT\*.*
INSTALL DATA\SOUNDDAT\*.* DATA\SOUNDDAT\*.*
// INSTALL DATA\SOUNDDAT\SAM\*.* DATA\SOUNDDAT\SAM\*.*
INSTALL DATA\SOUNDDAT\SNG\*.* DATA\SOUNDDAT\SNG\*.*
INSTALL DATA\TEXTURES\*.* DATA\TEXTURES\*.*
INSTALL DATA\MBOB\*.*     DATA\MBOB\*.*
INSTALL DATA\CBOB\*.*     DATA\CBOB\*.*
INSTALL DATA\TXT2\*.*     DATA\TXT2\*.*
INSTALL DATA\MISSIONS\*.* DATA\MISSIONS\*.*
INSTALL DATA\MAPS\*.*     DATA\MAPS\*.*
INSTALL DATA\ONLINE\*.*   DATA\ONLINE\*.*
INSTALL GFX\*.*           GFX\*.*
INSTALL GFX\PALETTE\*.*   GFX\PALETTE\*.*
INSTALL GFX\PICS\*.*      GFX\PICS\*.*
INSTALL GFX\TEXTURES\*.*  GFX\TEXTURES\*.*
INSTALL GFX\LAND\*.*      GFX\LAND\*.*
INSTALL SAVE\*.*          SAVE\*.*

// INSTALL VIDEO\*.*         VIDEO\*.*

CD_TARGET

// Create and update setup file
CREATE SETUP.INI
UPDATE_INI

// Inform the user that installation has been completed successfully
INFO "Settlers II has been installed successfully"

GOTO SetupMainMenu


// Setup main menu
:SetupMainMenu

MENU_START
MENU_ENTRY "Settlers II: Setup"
MENU_ENTRY "Setup sound" SetupSound
MENU_ENTRY "Additional information" ReadDoc
MENU_ENTRY "Blue Byte News" NewsInfo
MENU_ENTRY "Quit program" ExitInstallFromSetup
MENU_END


:SetupSound
CD DRIVERS
EXECUTE_OWN_SCREEN SETSOUND.EXE
CD ..
GOTO SetupMainMenu


:ReadDoc
TEXT README.TXT
GOTO SetupMainMenu


:NewsInfo
TEXT NEWS.TXT
GOTO SetupMainMenu


:ExitInstallFromSetup
// INFO "Starten Sie nun Settler II von dem Datentr„ger, auf den Sie das Spiel installiert haben. Viel Spaá beim Spielen!"
INFO "Have fun playing Settlers II!"
END

:ExitInstallFromInstall
END

