home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -coverdisks- / 112a / homebank / install-homebank < prev    next >
Text File  |  1998-05-02  |  5KB  |  217 lines

  1. ; HomeBank Installtion Script
  2. ;$VER Install-HomeBank 1.11 (18.04.98)
  3.  
  4. ;**************************************************************
  5. ; English strings
  6.  
  7. (set #badkick "\n Sorry, this package requires OS v2.04 or better.\n")
  8.  
  9. (set #msg_welcome
  10.   (cat
  11.     "\nWelcome to `HomeBank' installation\n\n"
  12.     "This script installs `HomeBank 1.11'\n"
  13.     "on your Amiga.\n\n"
  14.     "Registered user gets their personal\n"
  15.     "keyfile installed too.\n\n"
  16.     "HomeBank © 1995-1998 Maxime Doyen\n"
  17.     "All rights reserved\n\n"
  18.     "MUI © 1993-1998 Stefan Stuntz"
  19.   )
  20. )
  21.  
  22. (set #msg_askdestdir
  23.   (cat
  24.     "Please select a place for \"HomeBank\".\n"
  25.     "A drawer will be created here for you."
  26.   )
  27. )
  28.  
  29. (set #msg_askcpu
  30. "\nWhat version of HomeBank would you like to install?\n"
  31. )
  32.  
  33. (set #msg_wichlang
  34.   "Select the language(s) you wish to install."
  35. )
  36.  
  37. (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)?")
  38. (set #reg_yes    "Yes, install keyfile")
  39. (set #reg_no     "No, don't install keyfile")
  40. (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.")
  41. (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:")
  42.  
  43. ;=======================================================
  44. ;=================== Settings! =========================
  45. ;=======================================================
  46.  
  47. ;sure we are running under OS2.04 or above
  48. (if (< (/ (getversion) 65536) 37)
  49.     (
  50.       (message #msg_badkick)
  51.       (exit (quiet))
  52.     )
  53. )
  54.  
  55. ;get cpu
  56. (set cpu (database "cpu"))
  57. (if (= cpu 68000) (set #cpu 0))
  58. (if (= cpu 68010) (set #cpu 1))
  59. (if (= cpu 68020) (set #cpu 2))
  60. (if (= cpu 68030) (set #cpu 3))
  61.  
  62.  
  63. (message #msg_welcome (all))
  64. (welcome)
  65. (complete 0)
  66.  
  67. ; get destination directory
  68. (set destdir
  69.   (askdir
  70.     (prompt #msg_askdestdir)
  71.     (help @askdir-help)
  72.     (default "SYS:")
  73.   )
  74. )
  75.  
  76. (set @default-dest (expandpath destdir))
  77.  
  78. (set destination (tackon destdir "HomeBank"))
  79.  
  80.  
  81. ;=======================================================
  82. ;================== Procedures! ========================
  83. ;=======================================================
  84.  
  85. (procedure P_copydir dirname
  86.   (copyfiles (infos) (all)
  87.     (source dirname)
  88.     (dest (tackon destination dirname))
  89.   )
  90.   (copyfiles
  91.     (source (cat dirname ".info"))
  92.     (dest destination)
  93.   )
  94. )
  95.  
  96.  
  97. ;=======================================================
  98. ;==================== Action! ==========================
  99. ;=======================================================
  100.  
  101. (if (= (exists destination) 0)
  102.   (makedir destination )
  103. )
  104. (if (= (exists (tackon @default-dest "HomeBank.info")) 0)
  105.   (copyfiles (noposition)
  106.     (source "/HomeBank.info")
  107.     (dest @default-dest)
  108.     (optional nofail force)
  109.   )
  110. )
  111.  
  112. (copyfiles (infos)
  113.   (source "ReadMe")
  114.   (dest destination)
  115. )
  116.  
  117. (complete 20)
  118. (set cpuvar
  119.   (askchoice
  120.     (choices "68000" "68030")
  121.     (prompt #msg_askcpu)
  122.     (help   #msg_askcpu)
  123.     (default 0)
  124.   )
  125. )
  126. (copyfiles
  127.   (source "HomeBank.info")
  128.   (dest destination)
  129. )
  130. (if (AND (= cpuvar 1) (exists ("HomeBank030")) )
  131.   (copyfiles
  132.     (source "HomeBank030")
  133.     (dest destination)
  134.     (newname "HomeBank")
  135.   )
  136.   (copyfiles
  137.     (source "HomeBank")
  138.     (dest destination)
  139.   )
  140. )
  141.  
  142. (complete 40)
  143. (P_copydir "Docs")
  144.  
  145. (P_copydir "Accounts")
  146.  
  147. (P_copydir "Docks")
  148.  
  149. (makedir (tackon destination "Icons"))
  150. (copyfiles (all)
  151.   (source "Icons")
  152.   (dest (tackon destination "Icons"))
  153. )
  154.  
  155. (copyfiles (infos)
  156.   (source "OrderForm")
  157.   (dest destination)
  158. )
  159.  
  160. (complete 60)
  161. (set lang
  162.   (askoptions
  163.     (prompt #msg_wichlang)
  164.     (help @askoptions-help)
  165.     (choices
  166.       "Deutsch"
  167.       "Français"
  168.     )
  169.   )
  170. )
  171. (makedir (tackon destination "Catalogs"))
  172. (copyfiles
  173.   (source "Catalogs.info")
  174.   (dest destination)
  175. )
  176. (if (BITAND lang 1)
  177.   (
  178.     (delete "LOCALE:Catalogs/deutsch/homebank.catalog")
  179.     (copyfiles
  180.       (source (tackon "Catalogs/deutsch" "homebank.catalog"))
  181.       (dest (tackon destination "Catalogs/deutsch"))
  182.     )
  183.   )
  184. )
  185. (if (BITAND lang 2)
  186.   (
  187.     (delete "LOCALE:Catalogs/français/homebank.catalog")
  188.     (copyfiles
  189.       (source (tackon "Catalogs/français" "homebank.catalog"))
  190.       (dest (tackon destination "Catalogs/français"))
  191.     )
  192.   )
  193. )
  194.  
  195. ; Copy Keyfile if exist
  196. (complete 80)
  197. (if (exists "/homebank.key")
  198.   (
  199.     (if (askbool (prompt (cat #intro_0 "\n\n" #reg_prompt)) (choices #reg_yes #reg_no) (default 1) (help #reg_help))
  200.       (
  201.         (copyfiles
  202.       (prompt #reg_copying)
  203.           (source "/homebank.key")
  204.           (dest "L:")
  205.           (help @copyfiles-help)
  206.           (confirm "expert")
  207.         )
  208.       )
  209.       (
  210.         (message #reg_noway)
  211.       )
  212.     )
  213.   )
  214. )
  215.  
  216. (complete 100)
  217.