home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 3
/
AACD03.BIN
/
AACD
/
Games
/
RevengeHD
/
Install
next >
Wrap
Text File
|
1999-10-03
|
4KB
|
180 lines
;****************************
(set #sub-dir "") ;sub directory containing data files
(set #readme-file "README") ;name of readme file
(set #cleanup "") ;files to delete after install
(set #slave-name "Revenge") ;RevengeOfTheMutantCamels is too long :)
(set #where-source "Please select the directory containing the original Revenge of the Mutant Camels files")
(set #install-msg
(cat "Revenge of the Mutant Camels installation script.\n\n"
"You will be asked to select the directory where the\n"
"original files from the game are. A file called REV\n"
"is required for the game to work.\n\n"
"If you have not installed the game, download it from\n"
"Aminet in the game/shoot directory. The files are\n"
"RevengeCamels.lha (NTSC) or RevengeCamelsP.lha (PAL).\n"
"Either one will work with this installer.\n\n"
"Codetapper/Action in 1999!\n"
"Visit http://zap.to/action/ for more installs!"
))
;****************************
;----------------------------
; Checks if given program is reachable via the path
; if not abort install
; IN: #program - to check
; OUT: -
(procedure P_chkrun
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
)
)
;----------------------------
; Wait for inserting disk
; IN: #AD_disk - name of disk
; OUT: -
(procedure P_disk
(askdisk
(dest #AD_disk)
(prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
(help @askdisk-help)
)
)
;****************************
(if
(exists #readme-file)
(if
(= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(set #program "WHDLoad")
(P_chkrun)
(set @default-dest
(askdir
(prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
(help @askdir-help)
(default @default-dest)
(disk)
)
)
(set #dest (tackon @default-dest @app-name))
(if
(exists #dest)
(
(set #choice
(askbool
(prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if
(= #choice 1)
(run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
)
)
)
(makedir #dest
(help @makedir-help)
(infos)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source ("%s.Slave" #slave-name))
(dest #dest)
)
(if
(exists ("%s.newicon" #slave-name))
(set #icon
(askchoice
(prompt "\nWhich icon do you like to install ?\n")
(default 0)
(choices "Normal" "NewIcon")
(help @askchoice-help)
)
)
(set #icon 0)
)
(select #icon
(set #icon ("%s.inf" #slave-name))
(set #icon ("%s.newicon" #slave-name))
)
(copyfiles
(help @copyfiles-help)
(source #icon)
(newname ("%s.info" #slave-name))
(dest #dest)
)
(if
(exists #readme-file)
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
)
(if
(exists ("%s.info" #readme-file))
(copyfiles
(help @copyfiles-help)
(source ("%s.info" #readme-file))
(dest #dest)
)
)
(if
(= #sub-dir "")
("")
(
(set #dest (tackon #dest #sub-dir))
(makedir #dest
(help @makedir-help)
)
)
)
;----------------------------
(message #install-msg)
;----------------------------
(set #sourcedir
(askdir
(prompt #where-source)
(help @askdir-help)
(default "RAM:")
)
)
(set #sourcefile (tackon #sourcedir "rev"))
(copyfiles
(help @copyfiles-help)
(source #sourcefile)
(dest #dest)
)
;----------------------------
(run ("Delete %s ALL QUIET FORCE" #cleanup))
(exit)