home *** CD-ROM | disk | FTP | other *** search
- ; $Id: Install Quid,v 1.0 97/05/15 17:39:10 lee Exp $
- ; $VER: Install-Quid 1.0
-
- (set app_prefix "Quid?_")
- (set app_disk1 "1")
- (set app_disk2 "2")
- (set app_disk3 "3")
-
- (set app_volume1 (cat app_prefix app_disk1 ":"))
- (set app_volume2 (cat app_prefix app_disk2 ":"))
- (set app_volume3 (cat app_prefix app_disk3 ":"))
-
-
-
-
- ; standard amiga error codes
- (set RC_OK 0
- RC_WARN 5
- RC_ERROR 10
- RC_FATAL 20
- )
- ;
- ; determine AmigaDos version and revision numbers
- ;
- (set AmigaDos_Number (getversion))
- (set AmigaDos_Version (/ AmigaDos_Number 65536))
- (set AmigaDos_Revision (- AmigaDos_Number (* AmigaDos_Version 65536)))
-
- ; --------------------------------------------------------------------
-
- (procedure get_lhex
-
- (if ( = (exists "ram:lhex" (noreq)) 0)
- (
- (working "I'm coping LHEX in Ram...\n")
- (copyfiles (source ("LHEX")) (dest "ram:"))
- )
- )
- )
-
- (procedure setup_hd_install
- (message
- "\nQUID? will be installed in a new drawer named "
- "\"Quid\". You will be asked where on your hard drive (or "
- "storage device) you want this drawer created.")
- (set app_path (tackon
- (askdir
- (prompt
- "Please indicate where you want the Quid drawer "
- "to be located.")
- (help @askdir-help)
- (default @default-dest)
- )
- "Quid")
- )
- (makedir app_path)
- )
-
-
-
- (procedure copy_volume1
- (complete 5)
- (get_lhex)
- (copyfiles
- (prompt "I'm coping data.lha ...")
- (source ("data.lha"))
- (dest app_path)
- (help @copyfiles-help)
- (infos)
- (fonts)
- )
- (complete 10)
- (copyfiles
- (prompt "I'm coping levels01.lha ...")
- (source ("levels01.lha"))
- (dest app_path)
- (help @copyfiles-help)
- (infos)
- (fonts)
- )
- (complete 20)
- (copyfiles
- (prompt "I'm coping levels02.lha ...")
- (source ("levels02.lha"))
- (dest app_path)
- (help @copyfiles-help)
- (infos)
- (fonts)
- )
- (complete 30)
- (set options
- (askoptions
- (prompt "Which of the following Amiga Guide do you wish to install?")
- (choices "English" "Italiano" "Deutsh")
- (help "\n"
- @askoptions-help)
- )
- )
- (if (bitand 1 options)
- (copyfiles
- (prompt "I'm coping QuidENG.guide ...")
- (source ("QuidENG.guide"))
- (dest app_path)
- (help @copyfiles-help)
- (infos)
- (fonts)
- ))
- (if (bitand 2 options)
- (copyfiles
- (prompt "I'm coping QuidITA.guide ...")
- (source ("QuidITA.guide"))
- (dest app_path)
- (help @copyfiles-help)
- (infos)
- (fonts)
- ))
- (if (bitand 4 options)
- (copyfiles
- (prompt "I'm coping QuidDE.guide ...")
- (source ("QuidDE.guide"))
- (dest app_path)
- (help @copyfiles-help)
- (infos)
- (fonts)
- ))
- (complete 40)
- (set @default-dest app_path)
- )
-
- (procedure dearchive
- (complete 60)
- (working "I'm dearchiving \"data.lha\".\nmore patience...")
- (run (cat (cat "ram:lhex <NIL: \"-w=" app_path)(cat (cat "/\" x \"" app_path) "/data.lha\"")))
- (complete 70)
- (working "I'm dearchiving \"levels01.lha\".\nmore patience...")
- (run (cat (cat "ram:lhex <NIL: \"-w=" app_path)(cat (cat "/\" x \"" app_path) "/levels01.lha\"")))
- (complete 80)
- (working "I'm dearchiving \"levels02.lha\".\nmore patience...")
- (run (cat (cat "ram:lhex <NIL: \"-w=" app_path)(cat (cat "/\" x \"" app_path) "/levels02.lha\"")))
- (complete 97)
- (delete (cat app_path "/levels01.lha"))
- (delete (cat app_path "/levels02.lha"))
- (delete (cat app_path "/data.lha"))
- (delete "ram:lhex")
- (rename (cat app_path "/levels/level00") (cat app_path "/levels/LEVEL00"))
- (rename (cat app_path "/levels/level01") (cat app_path "/levels/LEVEL01"))
- (rename (cat app_path "/levels/level02") (cat app_path "/levels/LEVEL02"))
- (rename (cat app_path "/levels/level03") (cat app_path "/levels/LEVEL03"))
- )
-
- ; --------------------------------------------------------------------
- ; do_exit
- ; does the language installation
- ; does the program registrations if requested
- ; puts up regcard reminder and says thanks...
- ;
- (procedure do_exit
-
- (complete 99)
- (message "\nQuid is now installed !"
- "Remeber that Quid? is mailware...if you like, send me "
- "an email to the address:\n"
- "gtoffoli@leonardo.math.unipd.it\n\n"
- )
- (exit)
- )
-
-
- ; --------------------------------------------------------------------
- ; This is the actual Install Script
- ; --------------------------------------------------------------------
-
- (if (< AmigaDos_Version 39)
- (
- (abort
- "Quid? required AmigaOS 3.0, I'm sorry."
- )
- )
- )
- (setup_hd_install)
- (copy_volume1)
- (dearchive)
- (do_exit)
-