home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / bancabase_13 / install_eng < prev    next >
Text File  |  1997-02-01  |  5KB  |  195 lines

  1. ;   -----------------------------
  2. ;       Install BancaBase
  3. ;   -----------------------------
  4. ;   Description:
  5. ;
  6. ;   Commodore Installer Script for BancaBase 1.3
  7. ;   $VER: 1.01 (c) 1997 by Stefano Dardari
  8.  
  9. ; some useful variables
  10.     (set 
  11.         newline         "\n"
  12.         #bbprogname     "BancaBase13.lha"
  13.         #bb3-path       "BancaBase/"
  14.         #patternsname     "Patterns.lha"
  15.         #soundsname     "Sounds.lha"
  16.         #BBdocname      "BBase_doc.lha"
  17.         #bb3-dest       "SYS:"
  18.         #bb3-key        "BBase.key"
  19.         #bb3-prefs      "BancaBase.prefs"
  20.         #bb3-icon-MWB   "Icons/MagicWB/"
  21.         #bb3-icon-NI    "Icons/NewIcon/"
  22.         #bb3-icon-STD   "Icons/Standard/"
  23.         #STDTYPE        0
  24.         #NITYPE         1
  25.         #MWBTYPE        2
  26.         #iconpattern    "#?.info"
  27.     )
  28.  
  29. ; some strings
  30. (set #omp (cat "One moment please..." newline))
  31.  
  32. (set #installtext (cat "Welcome to the BancaBase installation script.\n\nBancaBase3 V 1.3 (C) 1996 by Stefano Dardari\n\nAll rights reserved"))
  33. (set #BB3dest-prompt "Please select the directory where you want the BancaBase drawer installed.\n(See help for details)")
  34. (set #BB3dest-help (cat "Select the desidered disk/directory were install the program.\nA drawer named BancaBase will be created."))
  35. (set #BB3patt-prompt "\n\n\nDo you want to install some pretty patterns to use with the GUI ?\nNOTE: you can use it, only with an WorkBench 3.0 or better.")
  36. (set #BB3patt-help (cat "The backdrop patterns are to be considere as add-on.\nBancaBase work well also without them, but are very nice if used with the program's GUI.\n\nNote that program uses the Datatypes to load picture files\nso if you don't have an V39 (or better) kickstart ... chose the NO gadget."))
  37. (set #BB3end (cat "Installation complete. Read the readme file before start."))
  38. (set #BB3icon-prompt "\nSelect from available the ICON set to install :")
  39. (set #BB3icon-help "Select desired type of icon-set to install for BancaBase and all the tools.\nIf for example your WorkBench use the MagicWB icons, you must select MagicWB.\nSame thing for the other types.")
  40. (set #copyng-icon-prompt "Please wait ... icon installation running.")
  41. (set #eng_doc_early "\n\nNOTE : English documentation will be early available on Aminet.")
  42.  
  43. (welcome #installtext)
  44.  
  45. (procedure set_icon
  46.    (set #def-icon
  47.       (askchoice
  48.          (prompt #BB3icon-prompt)
  49.          (help   #bb3icon-help)
  50.          (choices "Standard Icon" "NewIcon Icon" "MagicWB Icon")
  51.          (default 0)
  52.       )
  53.    )
  54. )
  55.  
  56. (procedure set_dir
  57.    (set #bb3-dest
  58.       (askdir
  59.          (prompt #BB3dest-prompt)
  60.          (help #BB3dest-help)
  61.          (default #bb3-dest)
  62.          (newpath)
  63.       )
  64.    )
  65. )
  66.  
  67. (set_dir)
  68. (set #dest-path (tackon #bb3-dest #bb3-path))
  69. (set @default-dest #dest-path)
  70.  
  71.  
  72. (if (exists #dest-path (noreq))
  73.    (
  74.       (set #file-exist (cat "Sorry but directory " #dest-path " already exist.\nPlease select a different destination .\n"))
  75.       (message #file-exist)
  76.       (set_dir)
  77.       (set #dest-path (tackon #bb3-dest #bb3-path))
  78.       (set @default-dest #dest-path)
  79.    )
  80. )
  81.  
  82. (makedir #dest-path (infos))
  83.  
  84. (working #omp "UnPacking and coping files.")
  85.  
  86. (run "lha -x x "#bbprogname" "#dest-path)
  87.  
  88. (complete 50)
  89.  
  90. ( if (exists #BBdocname (noreq))
  91.    (
  92.       (working #omp "UnPacking and coping documentation.")
  93.       (run "lha -x x "#BBdocname" "#dest-path )
  94.       (message #eng_doc_early)
  95.    )
  96. )
  97.  
  98. (complete 60)
  99.  
  100. (if (exists #patternsname (noreq))
  101.    (
  102.       (if (askbool (prompt #BB3patt-prompt) (help #BB3patt-help) (default 1))
  103.              (
  104.                 (working #omp "UnPacking and coping files.")
  105.                 (run "lha -x x "#patternsname" "#dest-path )
  106.              )
  107.       )
  108.    )
  109. )
  110.  
  111. (complete 70)
  112.  
  113. (set_icon)
  114. (if (= #def-icon #STDTYPE)
  115.     (set #src-icon #bb3-icon-STD)
  116.     )
  117. (if (= #def-icon #NITYPE)
  118.     (set #src-icon #bb3-icon-NI)
  119.     )
  120. (if (= #def-icon #MWBTYPE)
  121.     (set #src-icon #bb3-icon-MWB)
  122.     )
  123.  
  124. (copyfiles
  125.    (prompt #copyng-icon-prompt)
  126.    (source #src-icon)
  127.    (dest  #dest-path)
  128.    (pattern #iconpattern)
  129.    (noposition)
  130. )
  131.  
  132. (set #src-path (tackon #src-icon "Docs"))
  133. (set #dst-path (tackon #dest-path "Docs"))
  134.  
  135. (copyfiles
  136.    (prompt #copyng-icon-prompt)
  137.    (source #src-path)
  138.    (dest  #dst-path)
  139.    (all)
  140.    (noposition)
  141. )
  142.  
  143. (set #src-path (tackon #src-icon "Register"))
  144. (set #dst-path (tackon #dest-path "Register"))
  145.  
  146. (copyfiles
  147.    (prompt #copyng-icon-prompt)
  148.    (source #src-path)
  149.    (dest  #dst-path)
  150.    (all)
  151.    (noposition)
  152. )
  153.  
  154. (complete 80)
  155.  
  156. (if (exists #soundsname (noreq))
  157.        (
  158.           (working #omp "UnPacking and coping files.")
  159.           (run "lha -x x "#soundsname" "#dest-path )
  160.        )
  161. )
  162.  
  163.  
  164. (complete 90)
  165.  
  166. (if (exists #bb3-prefs (noreq))
  167.     (copyfiles
  168.         (prompt #omp "Coping prefs file.")
  169.         (source #bb3-prefs)
  170.         (dest #dest-path)
  171.         (files)
  172.     )
  173. )
  174.  
  175. (if (exists #bb3-key (noreq))
  176.     (copyfiles
  177.         (prompt #omp "Coping the KeyFile.")
  178.         (source #bb3-key)
  179.         (dest #dest-path)
  180.         (files)
  181.     )
  182. )
  183.  
  184. (complete 100)
  185.  
  186.  
  187. ; The last message
  188.     (set end_text (cat "Hope you like BancaBase!\n"
  189.                    "Don't hesitate to send me comments, bugreports and suggestions."))
  190.  
  191. ; the end
  192. (set @default-dest #dest-path)
  193.     (exit end_text)
  194. ;EOF
  195.