
//
// Install script for Archimedean Dynasty
// 10th of December 1996
// (c) 1996 Blue Byte Software GmbH
//

// set language
SET_LANGUAGE 2

// load background image
LOAD_BACKGROUND "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 "Archimedean Dynasty: Installation"
MENU_ENTRY "Install Archimedean Dynasty" InstallGame
MENU_ENTRY "Quit" ExitInstallFromInstall
MENU_END

//
// install the game
//

:InstallGame

// select a target drive with at least 26mb free space
SELECT_TARGET_DRIVE 31000 InstallMainMenu

// select target path
SELECT_TARGET_PATH BLUEBYTE\AD

// confirm installation
// ASSERT "Continue with installation ?" InstallMainMenu

// inform the user that installation has started
PRINT "Preparing installation..."

// change to target directory
CD_TARGET

// delete everything that may already be here (incl. all subdirs and its contents)
DELETE *.*
DELETE VFX
DELETE TXT
DELETE SFX\SND\DESKTOP
DELETE SFX\SND\COCKPIT
DELETE SFX\SND\VFX
DELETE SFX\SND
DELETE SFX\DRV
DELETE SFX
DELETE GFX\PAL\GUI
DELETE GFX\PAL\DEPOT
DELETE GFX\PAL\NOTEBOOK
DELETE GFX\PAL
DELETE GFX\IMG\ICON
DELETE GFX\IMG\COCKPIT
DELETE GFX\IMG
DELETE GFX\FNT
DELETE GFX

// create directories
MD DAT
MD DAT\SAVE
MD GFX
MD GFX\FNT
MD GFX\IMG
MD GFX\IMG\COCKPIT
MD GFX\IMG\ICON
MD GFX\PAL
MD GFX\PAL\NOTEBOOK
MD GFX\PAL\DEPOT
MD GFX\PAL\GUI
MD GFX\PIC
MD GFX\PIC\LOADING
MD SFX
MD SFX\DRV
MD SFX\SND
MD SFX\SND\VFX
MD SFX\SND\COCKPIT
MD SFX\SND\DESKTOP
MD TXT
MD VFX

// cd to source drive
CD_SOURCE

// inform the user that installation has started
PRINT "Archimedean Dynasty will now be installed."

// copy stuff
INSTALL DOS4GW.EXE DOS4GW.EXE
INSTALL AD.EXE AD.EXE
INSTALL ADD4G.EXE ADD4G.EXE
INSTALL AD2.EXE AD2.EXE
INSTALL ADD4G2.EXE ADD4G2.EXE
INSTALL NEW4G.VMC NEW4G.VMC
INSTALL DESKTOP.EXE DESKTOP.EXE
INSTALL FIGHT.EXE FIGHT.EXE
INSTALL DESKTOP2.EXE DESKTOP2.EXE
INSTALL FIGHT2.EXE FIGHT2.EXE
INSTALL INSTALL.SCR INSTALL.SCR
INSTALL INSTALL.LBM INSTALL.LBM
INSTALL README.TXT README.TXT
INSTALL SETUP.EXE SETUP.EXE
INSTALL INSTALL.BAT INSTALL.BAT
INSTALL SETSOUND.BAT SETSOUND.BAT
INSTALL SFX\SND\SMPMAP.DES SFX\SND\SMPMAP.DES
INSTALL SFX\SND\SMPMAP2.DES SFX\SND\SMPMAP2.DES

INSTALL DAT\SAVE\*.* DAT\SAVE\*.*
INSTALL GFX\FNT\*.* GFX\FNT\*.*
INSTALL GFX\IMG\COCKPIT\*.* GFX\IMG\COCKPIT\*.*
INSTALL GFX\IMG\ICON\*.* GFX\IMG\ICON\*.*
INSTALL GFX\PAL\NOTEBOOK\*.* GFX\PAL\NOTEBOOK\*.*
INSTALL GFX\PAL\DEPOT\*.* GFX\PAL\DEPOT\*.*
INSTALL GFX\PAL\GUI\*.* GFX\PAL\GUI\*.*
INSTALL GFX\PIC\LOADING\*.* GFX\PIC\LOADING\*.*
INSTALL SFX\DRV\*.* SFX\DRV\*.*
INSTALL SFX\SND\VFX\*.* SFX\SND\VFX\*.*
INSTALL SFX\SND\COCKPIT\*.* SFX\SND\COCKPIT\*.*
INSTALL SFX\SND\DESKTOP\*.* SFX\SND\DESKTOP\*.*
INSTALL TXT\FIGHTEXT.DES TXT\FIGHTEXT.DES
INSTALL_DIRS DAT\*.* DAT\*.*
INSTALL_DIRS VFX\*.* VFX\*.*

// cd to target drive
CD_TARGET

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

// Inform the user that installation has been completed successfully
INFO "Installation complete. Please read the additional information."

GOTO SetupMainMenu

//
// Setup main menu
//

:SetupMainMenu

MENU_START
MENU_ENTRY "Archimedean Dynasty: Setup"
MENU_ENTRY "Setup soundcard" SetupSound
MENU_ENTRY "Additional information" ReadDoc
MENU_ENTRY "Quit" ExitInstallFromSetup
MENU_END

:SetupSound
CD SFX\DRV
EXECUTE_OWN_SCREEN SETSOUND.EXE
CD ..
CD ..
GOTO SetupMainMenu

:ReadDoc
TEXT README.TXT
GOTO SetupMainMenu

:ExitInstallFromSetup
INFO "Start AD.EXE from your target directory."

END

:ExitInstallFromInstall
END
