home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga Shareware Floppies / ma69.dms / ma69.adf / Misc / Install-Misc < prev    next >
Text File  |  1996-06-28  |  9KB  |  243 lines

  1. ;**********************************************************
  2. ;
  3. ;    Installation script for Misc v1.0
  4. ;       v0.95
  5. ;
  6. ;**********************************************************
  7.  
  8. ;************
  9. ; PROCEDURES
  10. ;************
  11.  
  12. (procedure P_choosestuff
  13. (select @user-level
  14.     ( ; This is the NOVICE-mode part
  15.         (set @default-dest "SYS:Utilities")
  16.         (set #docdir "HELP:ENGLISH")
  17.         (set #copygadget "to: `sys:classes/gadgets'")
  18.         (set #icontype "MagicWB")
  19.         (set #putadditional "won't")
  20.     )
  21.  
  22.     ( ; This is the ADVANCED-mode part
  23.         (set @default-dest
  24.             (askdir
  25.                 (prompt (cat    "Choose directory where you would like to place the Misc-executable.\n"
  26.                                 "»»» A directory named `Misc' will be created! «««"))
  27.                 (help @askdir-help)
  28.                 (default @default-dest)
  29.             )
  30.         )
  31.         (set #icons
  32.             (askchoice
  33.                 (prompt "What type of Icons would you like to have installed?")
  34.                 (help (cat  "You should choose what type of Icons you would like to have installed for your programs."
  35.                             "The choices are:\n\n"
  36.                             "MagicWB - Default. Icons using the MagicWB-standard by Martin Huttenloher.\n\n"
  37.                             "Smallbench - MagicWB-style icons for screenmodes with a pixel aspect ratio of 1:2,"
  38.                             "e.g. High Res NoLace. By Tom Oszczepalski & Paul Henrik.\n\n"
  39.                             "Normal Workbench icons - These are the standard AmigaOS2-look icons. They suck!\n\n"
  40.                             "If you don't know what to choose, pick MagicWB!"))
  41.                 (choices "MagicWB" "Smallbench (NoLace)" "Normal Workbench icons")
  42.             )
  43.         )
  44.         (select #icons
  45.             (set #icontype "MagicWB")
  46.             (set #icontype "Smallbench")
  47.             (set #icontype "Normal")
  48.         )
  49.         (set #putadditional "will")
  50.         (set #copygadget "to: `sys:classes/gadgets'")
  51.     )
  52.  
  53.     ( ; This is the EXPERT-mode part
  54.         (set @default-dest
  55.             (askdir
  56.                 (prompt (cat    "Choose directory where you would like to place the Misc-executable.\n"
  57.                                 "»»» The Installer will NOT create a directory. «««"))
  58.                 (help @askdir-help)
  59.                 (default @default-dest)
  60.             )
  61.         )
  62.         (set #docdir
  63.             (askdir
  64.                 (prompt (cat    "Choose directory where you would like to place the Misc documentation\n"
  65.                                 "»»» Again, no directory will be created! «««"))
  66.                 (help (cat "This could be a place where you generally store program documentations,"
  67.                            "or it could be the directory of Misc itself.\n\n"
  68.                            @askdir-help))
  69.                 (default @default-dest)
  70.             )
  71.         )
  72.         (if
  73.             (askbool
  74.                 (prompt (cat    "Misc requires Textfield.gadget to run, it must be installed in the"
  75.                                 "`sys:classes/gadgets' - drawer.\n"
  76.                                 "If there's a newer version already installed, it won't be overwritten.\n\n"
  77.                                 "Is this OK?"))
  78.                 (help (cat  "Misc uses Textfield.gadget for editing files in."
  79.                             "The Textfield.gadget is included in the package and it can be installed for you now.\n"
  80.                             "The version to be installed is version 3.1,"
  81.                             "if there is a newer version it won't be overwritten.\n"
  82.                             "For information on how to use the Textfield.gadget, please read the documentation!\n\n"
  83.                             "It will be installed in `sys:classes/gadgets'."))
  84.                 (default 1)
  85.             )
  86.             (set #copygadget "to: `sys:classes/gadgets'")
  87.             (set #copygadget "won't be installed.")
  88.         )
  89.         (set #icons
  90.             (askchoice
  91.                 (prompt "What type of Icons would you like to have installed?")
  92.                 (help (cat  "You should choose what type of Icons you would like to have installed for your programs."
  93.                             "The choices are:\n\n"
  94.                             "MagicWB - Default. Icons using the MagicWB-standard by Martin Huttenloher.\n\n"
  95.                             "Smallbench - MagicWB-style icons for screenmodes with a pixel aspect ratio of 1:2,"
  96.                             "e.g. High Res NoLace. By Tom Oszczepalski & Paul Henrik.\n\n"
  97.                             "Normal Workbench icons - These are the standard AmigaOS2-look icons. They suck!"))
  98.                 (choices "MagicWB" "Smallbench (NoLace)" "Normal Workbench icons")
  99.             )
  100.         )
  101.         (select #icons
  102.             (set #icontype "MagicWB")
  103.             (set #icontype "Smallbench")
  104.             (set #icontype "Normal")
  105.         )
  106.         (set #putadditional
  107.             (askbool
  108.                 (prompt (cat    "Would you like to have the Additional Icons installed?\n"
  109.                                 "These are icons for different ToolManager docks and an Imagedrawer.\n"
  110.                                 "They will be put in a drawer called `MiscIcons'"))
  111.                 (help (cat  "Here you can choose whether you would like to install some additional icons to"
  112.                             "the ones necessary to run Misc. They are different ToolManager dockicons"
  113.                             "(MagicWB, TMTM (TinyMiniToolManager), KMI...). Plus an Imagedrawer in case you"
  114.                             "would like to have Misc in an own drawer."))
  115.             )
  116.         )
  117.         (if (= #putadditional 1)
  118.             (
  119.                 (set #iconsdir
  120.                     (askdir
  121.                         (prompt (cat    "Choose directory where you would like to install the additional Icons."
  122.                                         "A drawer called `MiscIcons' will be created."))
  123.                         (help @askdir-help)
  124.                         (default @default-dest)
  125.                     )
  126.                 )
  127.                 (set #putadditional "will")
  128.             )
  129.             (
  130.                 (set #putadditional "won't")
  131.                 (set #iconsdir "any place")
  132.             )
  133.         )
  134.     )
  135. )
  136. )
  137.  
  138. ;********
  139. ;  MAIN
  140. ;********
  141.  
  142. ; *****************************
  143. ;  Check for correct OS (2.0+)
  144. ; *****************************
  145.  
  146. (if (< (/ (getversion) 65536) 37)
  147.     (abort
  148.         "Misc requires at least AmigaOS v2.0."
  149.     )
  150. )
  151.  
  152. ; *****************************
  153. ;  Choose where&what to install
  154. ; *****************************
  155.  
  156. (set @default-dest "SYS:Utilities")
  157.  
  158. (P_choosestuff)
  159.  
  160. (if (= @user-level 1)
  161.     (
  162.         (set @default-dest (tackon @default-dest "Misc"))
  163.         (set #docdir @default-dest)
  164.         (set #iconsdir @default-dest)
  165.     )
  166. )
  167.  
  168. (if (> @user-level 0)
  169. (until
  170.     (askbool
  171.         (prompt (cat    "These files will now be copied:\n\n"
  172.                         ("The Misc executable to: `%s'\nThe Misc documentation to: `%s'\n" @default-dest #docdir)
  173.                         ("The Textfield.gadget %s\n\nYou have chosen the %s icontype, " #copygadget #icontype)
  174.                         ("and the additional icons %s be copied to %s.\n\n" #putadditional #iconsdir)
  175.                         "Is this OK?"))
  176.         (help (cat  "If you click on \"Copy Files\", the files will be copied into the directories of your choice.\n"
  177.                     "And if you click on \"Choose again\", you can correct possible mistakes."))
  178.         (choices "Copy Files" "Choose again")
  179.     )
  180.     (P_choosestuff)
  181. )
  182. )
  183.  
  184. (copyfiles
  185.     (prompt "The executable")
  186.     (source "Misc")
  187.     (dest @default-dest)
  188. )
  189. (copyfiles
  190.     (prompt "The executable icon")
  191.     (source ("Icons/%s/Misc.info" #icontype))
  192.     (dest @default-dest)
  193. )
  194. (copyfiles
  195.     (prompt "The documentation")
  196.     (source "Misc.guide")
  197.     (dest #docdir)
  198. )
  199. (copyfiles
  200.     (prompt "The Documentation icon")
  201.     (source ("Icons/%s/Misc.guide.info" #icontype))
  202.     (dest @default-dest)
  203. )
  204. (if (= #copygadget "to: `sys:classes/gadgets'")
  205. (
  206.     (copylib
  207.         (prompt "Textfield.gadget")
  208.         (source "Textfield.gadget")
  209.         (dest "SYS:classes/gadgets")
  210.     )
  211. )
  212. )
  213. (if (= #putadditional "will")
  214.     (copyfiles
  215.         (prompt "Additional Icons")
  216.         (source "Icons/Additional")
  217.         (dest (tackon #iconsdir "MiscIcons"))
  218.         (all)
  219.     )
  220. )
  221. (select @user-level
  222.     (exit (cat  "Installation complete!\n"
  223.                     "Misc can be found in your `SYS:Utilities' - drawer.\n"
  224.                     "The documentation can be found in your `HELP:ENGLISH' - drawer.\n\n"
  225.                     "Have fun using Misc!")
  226.         (quiet)
  227.     )
  228.  
  229.     (exit (cat  "Installation complete!\n"
  230.                 ("The Misc installation can be found in your `%s' - drawer.\n\n" @default-dest)
  231.                 "Have fun using Misc!")
  232.         (quiet)
  233.     )
  234.  
  235.     (exit (cat  "Installation complete!\n"
  236.                 ("The executable can be found in your `%s' - drawer.\n" @default-dest)
  237.                 ("The documentation can be found in your `%s' - drawer.\n" #docdir)
  238.                 ("The additional icons can be found in your `%s' - drawer.\n\n" #iconsdir)
  239.                 "Have fun using Misc!")
  240.         (quiet)
  241.     )
  242. )
  243.