home *** CD-ROM | disk | FTP | other *** search
Wrap
; HomeBank Installtion Script ;$VER HomeBank-Install 1.2 (05.09.98) ;************************************************************** ; English strings (set #msg_badkick "\n Sorry, this package requires OS v2.04 or better.\n") (set #msg_welcome (cat "\nWelcome to «HomeBank» installation\n\n" "This script installs version 1.2 on your Amiga.\n\n" "HomeBank © 1995-1998 Maxime Doyen\n" "All Rights Reserved\n\n" ) ) (set #msg_warn_mui (cat "\nWarning\n\nMUI (Magic User Interface)\n" "seem not to be installed on your system.\n\n" "MUI is absolutely needed for «HomeBank» to run.\n" "MUI © 1993-1998 Stefan Stuntz" ) ) (set #msg_warn_nlist (cat "\nWarning\n\nNList.mcc is not installed,\n" "or need to be updated with version 0.84" ) ) (set #msg_warnlocale (cat "\nWarning\n\nThe catalogs cannot be found, if you need\n" "another language than english, you must get the file named\n" "\"HomeBankLoc.lha\" and unarchive it to the same location\n" "than this main archive before to run the install.\n" ) ) (set #msg_askdestdir (cat "Please select a place for \"HomeBank\".\n" "A drawer will be created there for you." ) ) (set #msg_wichlang "Please select the language(s) you wish to install." ) (set #reg_prompt "Thank you very much for purchasing `HomeBank'. To turn your demo version into a registered version, your personalized keyfile needs to be installed on your hard disk in the L: directory. Do you want to do that now (recommended)?") (set #reg_yes "Yes, install keyfile") (set #reg_no "No, don't install keyfile") (set #reg_help "\nThe keyfile turns any `HomeBank' demo version into a registered version. After installation in the L: directory of your harddisk, all features will be enabled. The keyfile is personalized with your name and address and may not be redistributed under any circumstances.") (set #reg_noway "\nYou choose not to install your keyfile. The options for registered users won't be enabled until you do that.\n\nYou can restart the installer script later or copy the keyfile manually with a command like\n\ncopy homebank.key L:") ;======================================================= ;================== Procedures! ======================== ;======================================================= (procedure P_copydir dirname (copyfiles (infos) (all) (source dirname) (dest (tackon destination dirname)) ) (copyfiles (source (cat dirname ".info")) (dest destination) ) ) ;======================================================= ;=================== Settings! ========================= ;======================================================= ;**** sure we are running under OS2.04 or above (if (< (/ (getversion) 65536) 37) ( (message #msg_badkick) (exit (quiet)) ) ) (message #msg_welcome (all)) (welcome) (complete 0) ;**** test if mui is installed (if (= (exists "mui:" (noreq)) 0) (message #msg_warnmui) ) (if (= (exists "Catalogs" (noreq)) 0) (message #msg_warnlocale) ) ;**** get destination directory (set destdir (askdir (prompt #msg_askdestdir) (help @askdir-help) (default "SYS:") ) ) (set @default-dest (expandpath destdir)) (set destination (tackon destdir "HomeBank")) ;======================================================= ;==================== Action! ========================== ;======================================================= ;**** test if nlist is installed and get version (set vernum 0) (if (<> (exists "MUI:Libs/mui/NList.mcc" (noreq)) 0) (set vernum (/ (getversion "MUI:Libs/mui/NList.mcc") 65536)) ) (if (< vernum 19) (message #msg_updatenlist) (copylib (source "Libs/MUI/NList.mcc") (dest "MUI:Libs/mui")) (copylib (source "Libs/MUI/NListview.mcc") (dest "MUI:Libs/mui")) (copylib (source "Libs/MUI/NListviews.mcp") (dest "MUI:Libs/mui")) ) (if (= (exists destination) 0) (makedir destination ) ) (if (= (exists (tackon @default-dest "HomeBank.info")) 0) (copyfiles (noposition) (source "/HomeBank.info") (dest @default-dest) (optional nofail force) ) ) (copyfiles (infos) (source "ReadMe") (dest destination) ) ;**** get the installed cpu (set cpu (database "cpu")) (if (= cpu 68000) (set #cpu 0)) (if (= cpu 68010) (set #cpu 1)) (if (= cpu 68020) (set #cpu 2)) (if (= cpu 68030) (set #cpu 3)) (if (= cpu 68040) (set #cpu 4)) (if (= cpu 68060) (set #cpu 5)) (complete 20) (copyfiles (source "HomeBank.info") (dest destination) ) (if (AND (>= #cpu 2) (exists ("HomeBank020")) ) (copyfiles (source "HomeBank020") (dest destination) (newname "HomeBank") ) (copyfiles (source "HomeBank") (dest destination) ) ) (complete 40) (P_copydir "Docs") (P_copydir "Accounts") (P_copydir "Goodies") (makedir (tackon destination "Icons")) (copyfiles (all) (source "Icons") (dest (tackon destination "Icons")) ) (copyfiles (infos) (source "OrderForm") (dest destination) ) (complete 50) (delete "ENV:mui/HomeBank.config") (delete "ENVARC:mui/HomeBank.config") (copyfiles (source "Goodies/HomeBank.config") (dest "ENV:mui")) (copyfiles (source "Goodies/HomeBank.config") (dest "ENVARC:mui")) (complete 60) (if (exists "Catalogs") (set lang (askoptions (prompt #msg_wichlang) (help @askoptions-help) (default 0) (choices "Français" "Deutsch" "Norsk" ) ) ) (makedir (tackon destination "Catalogs")) (copyfiles (source "Catalogs.info") (dest destination) ) (if (BITAND lang 1) ( (delete "LOCALE:Catalogs/français/homebank.catalog") (copyfiles (source (tackon "Catalogs/français" "homebank.catalog")) (dest (tackon destination "Catalogs/français")) ) ) ) (if (BITAND lang 2) ( (delete "LOCALE:Catalogs/deutsch/homebank.catalog") (copyfiles (source (tackon "Catalogs/deutsch" "homebank.catalog")) (dest (tackon destination "Catalogs/deutsch")) ) ) ) (if (BITAND lang 3) ( (delete "LOCALE:Catalogs/norsk/homebank.catalog") (copyfiles (source (tackon "Catalogs/français" "homebank.catalog")) (dest (tackon destination "Catalogs/norsk")) ) ) ) ) ; Copy Keyfile if exist (complete 80) (if (exists "/homebank.key") ( (if (askbool (prompt (cat #intro_0 "\n\n" #reg_prompt)) (choices #reg_yes #reg_no) (default 1) (help #reg_help)) ( (copyfiles (prompt #reg_copying) (source "/homebank.key") (dest "L:") (help @copyfiles-help) (confirm "expert") ) ) ( (message #reg_noway) ) ) ) ) (complete 100)