; HomeBank Installtion Script ;$VER Install-HomeBank 1.11 (18.04.98) ;************************************************************** ; English strings (set #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 `HomeBank 1.11'\n" "on your Amiga.\n\n" "Registered user gets their personal\n" "keyfile installed too.\n\n" "HomeBank © 1995-1998 Maxime Doyen\n" "All rights reserved\n\n" "MUI © 1993-1998 Stefan Stuntz" ) ) (set #msg_askdestdir (cat "Please select a place for \"HomeBank\".\n" "A drawer will be created here for you." ) ) (set #msg_askcpu "\nWhat version of HomeBank would you like to install?\n" ) (set #msg_wichlang "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:") ;======================================================= ;=================== Settings! ========================= ;======================================================= ;sure we are running under OS2.04 or above (if (< (/ (getversion) 65536) 37) ( (message #msg_badkick) (exit (quiet)) ) ) ;get 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)) (message #msg_welcome (all)) (welcome) (complete 0) ; get destination directory (set destdir (askdir (prompt #msg_askdestdir) (help @askdir-help) (default "SYS:") ) ) (set @default-dest (expandpath destdir)) (set destination (tackon destdir "HomeBank")) ;======================================================= ;================== Procedures! ======================== ;======================================================= (procedure P_copydir dirname (copyfiles (infos) (all) (source dirname) (dest (tackon destination dirname)) ) (copyfiles (source (cat dirname ".info")) (dest destination) ) ) ;======================================================= ;==================== Action! ========================== ;======================================================= (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) ) (complete 20) (set cpuvar (askchoice (choices "68000" "68030") (prompt #msg_askcpu) (help #msg_askcpu) (default 0) ) ) (copyfiles (source "HomeBank.info") (dest destination) ) (if (AND (= cpuvar 1) (exists ("HomeBank030")) ) (copyfiles (source "HomeBank030") (dest destination) (newname "HomeBank") ) (copyfiles (source "HomeBank") (dest destination) ) ) (complete 40) (P_copydir "Docs") (P_copydir "Accounts") (P_copydir "Docks") (makedir (tackon destination "Icons")) (copyfiles (all) (source "Icons") (dest (tackon destination "Icons")) ) (copyfiles (infos) (source "OrderForm") (dest destination) ) (complete 60) (set lang (askoptions (prompt #msg_wichlang) (help @askoptions-help) (choices "Deutsch" "Français" ) ) ) (makedir (tackon destination "Catalogs")) (copyfiles (source "Catalogs.info") (dest destination) ) (if (BITAND lang 1) ( (delete "LOCALE:Catalogs/deutsch/homebank.catalog") (copyfiles (source (tackon "Catalogs/deutsch" "homebank.catalog")) (dest (tackon destination "Catalogs/deutsch")) ) ) ) (if (BITAND lang 2) ( (delete "LOCALE:Catalogs/français/homebank.catalog") (copyfiles (source (tackon "Catalogs/français" "homebank.catalog")) (dest (tackon destination "Catalogs/français")) ) ) ) ; 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)