' 컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
'  SSG Carriers II Install 930702
' 컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴


BACKGROUND 31
TELESCOPE OFF                              

WINOPEN 0 2 31
"                          S.S.G."
""
"                  Strategic Studies Group"
""
"         Carriers at War II Installation Program             "
""

TELESCOPE ON
SHADOW ON

VIDEO VGA                   
JUMP.YES GOTVGA
BEEP
WINOPEN 0 11 78

"      CAWII requires VGA graphics to run!"
""
"         This is not a VGA machine."
"     You can still install CAWII      "
"           but it will not work!"
""
"Do you wish to continue with the installation?"
""
ASK 40 19
JUMP.NO LEFIN
WINCLOSE
:GOTVGA

CPU 386                
JUMP.YES GOT386
BEEP
WINOPEN 0 11 78

"     CAWII requires a 386 or better to run!"
""
"         This is not a 386 machine."
"     You can still install CAWII"
"           but it will not work!"
""
"Do you wish to continue with the installation?"
""
ASK 40 19
JUMP.NO LEFIN
WINCLOSE
:GOT386

:PROMPT
DRIVE C 28 12 47 15 32 14 79
PATH \CAW 0 14 47 15 32 14 79

' this could even have the oldest version of CAW
EXIST ~1~2\CAW2.EXE
JUMP.NO WARNING

WINOPEN 0 15 47
"When CAW II is installed it will automatically upgrade CAW I and the"
"Construction Kit. This will result in the modification of all 'lst' "
"files. The 'aiq' and 'caw' files will not be affected."
""
"Do you wish to proceed with the update proceedure Y or N ?          "
ASK 65 20
WINCLOSE
JUMP.NO TERMINATE
:WARNING

' this could even have the oldest version of CAW
EXIST ~1~2\CAW1.EXE
JUMP.NO OLD_CAW

WINOPEN 0 15 47
"~1~2 currently contains CAW Version 1"
""
"The current version will not operate with version 1 so an update must"
"be performed. This will result in the loss of any saved games."
"Do you wish to proceed with the update proceedure Y or N ?              "
ASK 65 20
WINCLOSE
JUMP.NO TERMINATE
' At this point we purge the original CAW directories
WINOPEN 0 12 47
"Removing old Carriers At War Version 1 files"
""
""
""
""
""
""
""
TELESCOPE OFF
SHADOW OFF
DELETE ~1~2\CAW1.EXE 		 0 15 47
DELETE ~1~2\TITLE.EXE 		 0 15 47
DELETE ~1~2\*.SAV 			 0 15 47
DELETE ~1~2\*.DAT 			 0 15 47
DELETE ~1~2\*.TBL 			 0 15 47
DELETE ~1~2\*.VER 			 0 15 47
DELETE ~1~2\README.COM 	 	 0 15 47
DELETE ~1~2\PICTS\*.PCK 	 0 15 47
DELETE ~1~2\COMBAT\*.PCK 	 0 15 47
DELETE ~1~2\SHIPS\*.PCK 	 0 15 47
DELETE ~1~2\PLANES\*.PCK 	 0 15 47
DELETE ~1~2\SCENARIO\*.PCK  0 15 47
DELETE ~1~2\SCENARIO\*.AIQ  0 15 47
DELETE ~1~2\SCENARIO\*.LST  0 15 47
DELETE ~1~2\SCENARIO\*.OVR  0 15 47
JUMP.FAIL INSTALL_FAILURE
WINCLOSE
TELESCOPE ON
WINOPEN 0 12 47
"INSTALLING CAW Version 1.0 Upgrade     "
""
""
""
""
""
""
""
TELESCOPE OFF
SHADOW OFF
TELESCOPE ON
UNPACK CAWV1.PAK 0 15 47 26 14 79
TELESCOPE OFF                              
SHADOW ON
WINCLOSE
:OLD_CAW

' if we detect that CAW II is already in and old CAW I has been
' put over it then upgrade CAW II as well
EXIST ~1~2\CAWV2.EXE
JUMP.NO SKIP0
EXIST ~1~2\CAW.BAT
JUMP.NO SKIP0
EXIST ~1~2\CAW.VER
JUMP.YES SKIP0
' go straight to caw ii upgrade so that pcks are ok
JUMP INSTALL.CAWII
:SKIP0

' do we detect that CAW II has already been installed successfully
EXIST ~1~2\CAWV2.EXE
JUMP.NO INSTALL.CAWII0
' this is a fairly long way but I cann't think how to shorten it
'FILE.SIZE ~1~2\cawii.ver 65 this was version 2.03a
'JUMP.YES CONTINUE1
'FILE.SIZE ~1~2\cawii.ver 70 this was version 2.04
'JUMP.YES CONTINUE1
' this is the current version 2.05
FILE.SIZE ~1~2\cawii.ver 75
JUMP.YES CONTINUE1
FILE.SIZE ~1~2\cawii.ver 80
JUMP.YES CONTINUE1
FILE.SIZE ~1~2\cawii.ver 85
JUMP.YES CONTINUE1
FILE.SIZE ~1~2\cawii.ver 90
JUMP.YES CONTINUE1
FILE.SIZE ~1~2\cawii.ver 95
JUMP.YES CONTINUE1
FILE.SIZE ~1~2\cawii.ver 100
JUMP.YES CONTINUE1

:INSTALL.CAWII0
' only at this point do we need to test for space
SPACE 4000
:INSTALL.CAWII
WINOPEN 0 12 47
"INSTALLING Carriers at War II          "
""
""
""
""
""
""
""
TELESCOPE OFF
SHADOW OFF
' make the punter re-initialise the sound system after any install
DELETE ~1~2\caw.ini 		 	 	0 15 47
TELESCOPE ON
UNPACK CAW2.PAK 0 15 47 26 14 79

' this next bit puts a dummy exe into the directory to fool the construction 
' kit. This is done only if caw1 is not in the system
TELESCOPE OFF                              
COPY ~1~2\TEST.EXE ~1~2\CAW2.EXE  0 15 47
TELESCOPE ON

SHADOW ON
JUMP.FAIL INSTALL_FAILURE
WINCLOSE

:CONTINUE1

' now if the guy has an old copy of caw1 then we must upgrade it
' do we detect that CAW II has already been installed successfully
EXIST ~1~2\CAW.BAT
JUMP.NO CONTINUE2
' this is a fairly long way but I cann't think how to shorten it
'FILE.SIZE ~1~2\caw.ver 65 version 2.03a
'JUMP.YES CONTINUE2
'FILE.SIZE ~1~2\caw.ver 70	version 2.04
'JUMP.YES CONTINUE2
' this is the current version 2.05
FILE.SIZE ~1~2\caw.ver 75
JUMP.YES CONTINUE2
FILE.SIZE ~1~2\caw.ver 80
JUMP.YES CONTINUE2
FILE.SIZE ~1~2\caw.ver 85
JUMP.YES CONTINUE2
FILE.SIZE ~1~2\caw.ver 90
JUMP.YES CONTINUE2
FILE.SIZE ~1~2\caw.ver 95
JUMP.YES CONTINUE2
FILE.SIZE ~1~2\caw.ver 100
JUMP.YES CONTINUE2

' Lets ask for the correct disk to be inserted
EXIST CAW2A.PAK
JUMP.YES INSTALL.CAW1
DISK 3 caw2a.pak 0 15 47

:INSTALL.CAW1
WINOPEN 0 12 47
"UPDATING Carriers at War I             "
""
""
""
""
""
""
""
SHADOW OFF
TELESCOPE OFF
' make the punter re-initialise the sound system after any install
DELETE ~1~2\caw2.exe 		 	  		0 15 47
DELETE ~1~2\title.exe 		 	  		0 15 47
COPY   ~1~2\TEST.EXE ~1~2\CAW2.EXE  0 15 47
TELESCOPE ON
UNPACK CAW2A.PAK 0 15 47 26 14 79
SHADOW ON
JUMP.FAIL INSTALL_FAILURE
WINCLOSE
:CONTINUE2

' now upgrade the construction kit if that has been detected
EXIST ~1~2\CREATE.BAT
JUMP.NO CONTINUE3
' this is a fairly long way but I cann't think how to shorten it
'FILE.SIZE ~1~2\create.ver 65 this was version 2.03a
'JUMP.YES CONTINUE3
'FILE.SIZE ~1~2\create.ver 70 this was version 2.04
'JUMP.YES CONTINUE3
' this is the current version 2.05
FILE.SIZE ~1~2\create.ver 75
JUMP.YES CONTINUE3
FILE.SIZE ~1~2\create.ver 80
JUMP.YES CONTINUE3
FILE.SIZE ~1~2\create.ver 85
JUMP.YES CONTINUE3
FILE.SIZE ~1~2\create.ver 90
JUMP.YES CONTINUE3
FILE.SIZE ~1~2\create.ver 95
JUMP.YES CONTINUE3
FILE.SIZE ~1~2\create.ver 100
JUMP.YES CONTINUE3

' Lets ask for the correct disk to be inserted
EXIST CAWCREAT.PAK
JUMP.YES INSTALL.CREATE
DISK 3 cawcreat.pak 0 15 47

:INSTALL.CREATE
WINOPEN 0 12 47
"UPDATING CAW Construction Kit          "
""
""
""
""
""
""
""
SHADOW OFF
UNPACK CAWCREAT.PAK 0 15 47 26 14 79
SHADOW ON
JUMP.FAIL INSTALL_FAILURE
WINCLOSE
:CONTINUE3

:DONE

'
'       View the readme file
'
WINOPEN 0 12 47
"     Press the [Enter] key"
"  to see the CAW Read.me file          "
""
WAIT 50 14
WINCLOSE
VIEW ~1~2\READ.ME 47 31

BEEP
WINOPEN 0 12 47
"Carriers at War II has successfully installed!"
""
""
"      To start the game just type" 
""
"                CAWII"
""
""
"   Press the [Enter] key to continue."
""

WAIT 50 20

WINCLOSE

SHELL
"~1"
"cd ~2"

:LEFIN
:TERMINATE
END


' you've seen this before in other examples:

:INSTALL_FAILURE

WINOPEN 0 11 79

"THE INSTALLATION PROGRAM FAILED PRIOR TO COMPLETION"
""
"Possible reasons:"
"   -- The floppy disk was damaged during shipping."
"   -- Your disk drive is out of alignment."
"   -- The floppy disk was removed prior to completion."
""
"Press [Enter] to remove incomplete program files."

WAIT 62 19
WINCLOSE

WINOPEN 0 11 31

"Partially Installed Files are Now Deleted."
""
"Please try to install the software again."
"If you get this error message again,"
"call SSG (02) 858-5854 for"
"a new floppy disk."
""
"      Press [Enter] to Quit."

WAIT 47 19
WINCLOSE
