home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 10 / Fresh_Fish_10_2352.bin / new / util / wb / extrainfo / extrainfo.install < prev    next >
Text File  |  1995-05-21  |  10KB  |  414 lines

  1. ; *************************************************************************
  2. ; ********************  EXTRAINFO INSTALLATION SCRIPT  ********************
  3. ; *************************************************************************
  4. ;
  5. ; $VER: ExtraInfo.install 1.0 (9.5.95)
  6. ;
  7. ; Copyright ©1995 Nick Christie
  8. ;
  9. ; *************************************************************************
  10. ;
  11. ; Find out about program version, etc
  12.  
  13. ; get version of EI in distribution
  14. (set vernum-ei (getversion "ExtraInfo"))
  15. (set ver-ei    (/ vernum-ei 65536))
  16. (set rev-ei    (- vernum-ei (* ver-ei 65536) ) )
  17.  
  18. (set @default-dest "")
  19. (set defeidir "SYS:WBStartup")
  20. (set catsdir "Locale:Catalogs")
  21. (set libsdir "Libs:")
  22.  
  23. ; if novice user-level, bump up to average
  24. (if (= 0 @user-level)
  25.     (
  26.     (set @user-level 1)
  27.     (user 1)
  28.     )
  29. )
  30.  
  31. (set old-user-level @user-level)
  32.  
  33. ; ************************************************************************
  34. ; English strings
  35. ; ************************************************************************
  36.  
  37. (set default_lang 2)
  38.  
  39. (set #yes-msg "Yes")
  40.  
  41. (set #no-msg "No")
  42.  
  43. (set #bad-kick-msg "ExtraInfo requires AmigaOS 2.04 or better!")
  44.  
  45. (set #hello-msg
  46.     (cat
  47.         ("Welcome to ExtraInfo V%ld.%ld\n\n" ver-ei rev-ei)
  48.         "This script will install ExtraInfo and "
  49.         "related files on your Amiga.\n\n"
  50.         "You will need to answer a few questions such as "
  51.         "where you would like the program installed.\n\n"
  52.         "If you do not wish to install ExtraInfo at this time, "
  53.         "select the 'Abort Install' button now. "
  54.     )
  55. )
  56.  
  57. (set #ei-askdir-msg "Please select the directory to install ExtraInfo in.")
  58.  
  59. (set #keepicon-msg "\nDo you wish to keep your existing ExtraInfo icon?")
  60.  
  61. (set #keepicon-help
  62.     (cat
  63.         "If you select 'Yes', your existing ExtraInfo icon will not "
  64.         "be overwritten. If you select 'No', a new icon for ExtraInfo "
  65.         "will be installed."
  66.     )
  67. )
  68.  
  69. (set #bgui-askdir-msg
  70.     (cat
  71.         "Select the directory to install bgui.library in. "
  72.         "(Will *not* overwrite any existing newer version.)"
  73.     )
  74. )
  75.  
  76. (set #eiai-ask-msg "\nDo you wish to install the standard AppIcon?")
  77.  
  78. (set #eiai-ask-help
  79.     (cat
  80.         "If you select 'Yes' the standard AppIcon will be installed "
  81.         "in a directory of your choice. Select 'No' if you do not wish "
  82.         "to use the AppIcon facility, or if you will be providing your "
  83.         "own AppIcon image."
  84.     )
  85. )
  86.  
  87. (set #eiai-askdir-msg "Please select the directory to install the AppIcon in.")
  88.  
  89. (set #eiguide "ExtraInfo.guide")
  90.  
  91. (set #eiguide-ask-msg
  92.     (cat
  93.         "\nInstall ExtraInfo documentation?\n\n"
  94.         "(This is an AmigaGuide file, and you will be asked "
  95.         "for the directory in which to install it.)\n\n"
  96.         "I recommend installing this, and reading it too, "
  97.         "so that you know how to utilitise ExtraInfo to "
  98.         "its fullest. "
  99.     )
  100. )
  101.  
  102. (set #eiguide-askdir-msg
  103.     "Please select the directory to install ExtraInfo.guide in."
  104. )
  105.  
  106. (set #guide-help
  107.     (cat
  108.         "AmigaGuide is the Amiga's standard hypertext format.\n\n"
  109.         "If you have AmigaOS 3.0 or better, you can use MultiView "
  110.         "to read this documentation, otherwise you must use the AmigaGuide "
  111.         "program, which is available on AmiNet and Fred Fish disk #870.\n\n"
  112.         "Both of these viewer programs have a 'search path', a set "
  113.         "of directories they search for AmigaGuide documents. "
  114.         "You should place this guide somewhere in that path."
  115.     )
  116. )
  117.  
  118. (set #locale-msg
  119.     (cat
  120.         "\ExtraInfo is localized, which means you may use "
  121.         "the program in several different languages. "
  122.         "Please choose your preferred languages.\n"
  123.     )
  124. )
  125.  
  126. (set #locale-help
  127.     (cat
  128.         "These are the languages supported by ExtraInfo.\n\n"
  129.         "Simply specify the languages you prefer and the "
  130.         "required catalog files will be copied to the "
  131.         "Locale:Catalogs directory."
  132.     )
  133. )
  134.  
  135. ; ************************************************************************
  136. ; xxxx strings - template for other languages
  137. ; ************************************************************************
  138.  
  139. (if (= @language "xxxx")
  140.     (
  141.     (set default_lang ?)
  142.  
  143.     (set #yes-msg "Yes")
  144.  
  145.     (set #no-msg "No")
  146.  
  147.     (set #bad-kick-msg "ExtraInfo requires AmigaOS 2.04 or better!")
  148.  
  149.     (set #hello-msg
  150.         (cat
  151.             ("Welcome to ExtraInfo V%ld.%ld\n\n" ver-ei rev-ei)
  152.             "This script will install ExtraInfo and "
  153.             "related files on your Amiga.\n\n"
  154.             "You will need to answer a few questions such as "
  155.             "where you would like the program installed.\n\n"
  156.             "If you do not wish to install ExtraInfo at this time, "
  157.             "select the 'Abort Install' button now. "
  158.         )
  159.     )
  160.  
  161.     (set #ei-askdir-msg "Please select the directory to install ExtraInfo in.")
  162.  
  163.     (set #keepicon-msg "\nDo you wish to keep your existing ExtraInfo icon?")
  164.  
  165.     (set #keepicon-help
  166.         (cat
  167.             "If you select 'Yes', your existing ExtraInfo icon will not "
  168.             "be overwritten. If you select 'No', a new icon for ExtraInfo "
  169.             "will be installed."
  170.         )
  171.     )
  172.  
  173.     (set #eiai-ask-msg "\nDo you wish to install the standard AppIcon?")
  174.  
  175.     (set #eiai-ask-help
  176.         (cat
  177.             "If you select 'Yes' the standard AppIcon will be installed "
  178.             "in a directory of your choice. Select 'No' if you do not wish "
  179.             "to use the AppIcon facility, or if you will be providing your "
  180.             "own AppIcon image."
  181.         )
  182.     )
  183.  
  184.     (set #eiai-askdir-msg
  185.         "Please select the directory to install the AppIcon in."
  186.     )
  187.  
  188.     (set #eiguide "ExtraInfo.guide")
  189.  
  190.     (set #eiguide-ask-msg
  191.         (cat
  192.             "\nInstall ExtraInfo documentation?\n\n"
  193.             "(This is an AmigaGuide file, and you will be asked "
  194.             "for the directory in which to install it.)\n\n"
  195.             "I recommend installing this, and reading it too, "
  196.             "so that you know how to utilitise ExtraInfo to "
  197.             "its fullest. "
  198.         )
  199.     )
  200.  
  201.     (set #eiguide-askdir-msg
  202.             "Please select the directory to install ExtraInfo.guide in."
  203.     )
  204.  
  205.     (set #guide-help
  206.         (cat
  207.             "AmigaGuide is the Amiga's standard hypertext format.\n\n"
  208.             "If you have AmigaOS 3.0 or better, you can use MultiView "
  209.             "to read this documentation, otherwise you must use the AmigaGuide "
  210.             "program, which is available on AmiNet and Fred Fish disk #870.\n\n"
  211.             "Both of these viewer programs have a 'search path', a set "
  212.             "of directories they search for AmigaGuide documents. "
  213.             "You should place this guide somewhere in that path."
  214.         )
  215.     )
  216.  
  217.     (set #locale-msg
  218.         (cat
  219.             "\ExtraInfo is localized, which means you may use "
  220.             "the program in several different languages. "
  221.             "Please choose your preferred languages.\n"
  222.         )
  223.     )
  224.  
  225.     (set #locale-help
  226.         (cat
  227.             "These are the languages supported by ExtraInfo.\n\n"
  228.             "Simply specify the languages you prefer and the "
  229.             "required catalog files will be copied to the "
  230.             "Locale:Catalogs directory."
  231.         )
  232.     )
  233.  
  234.     ) ; endif xxxx language
  235. )
  236.  
  237. ; ************************************************************************
  238. ; Begin actual installation
  239. ; ************************************************************************
  240.  
  241. ; Check for KickV37 or better
  242.  
  243. (if (< (/ (getversion) 65536) 37)
  244.     (
  245.     (abort #bad-kick-msg)
  246.     )
  247. )
  248.  
  249. ; ------------------------------------------------------------------------
  250. ; Show welcome msg
  251.  
  252. (user 2)
  253. (message #hello-msg)
  254. (user old-user-level)
  255.  
  256. ; ------------------------------------------------------------------------
  257. ; Ask the user where we should install ExtraInfo.
  258.  
  259. (set eidir
  260.     (askdir
  261.         (prompt #ei-askdir-msg)
  262.         (help @askdir-help)
  263.         (default defeidir)
  264.     )
  265. )
  266.  
  267. ; ------------------------------------------------------------------------
  268. ; If there is an icon for ExtraInfo there already, ask the user if we
  269. ; should keep it. If yes then copy just the program, else copy both
  270. ; the program and icon.
  271.  
  272. (if (exists (tackon eidir "ExtraInfo.info"))
  273.     ; then
  274.     (if (askbool
  275.             (prompt #keepicon-msg)
  276.             (choices #yes-msg #no-msg)
  277.             (help #keepicon-help)
  278.             (default 1)
  279.         )
  280.         ; then
  281.         (copyfiles (source "ExtraInfo") (dest eidir) )
  282.         ; else
  283.         (copyfiles (source "ExtraInfo") (dest eidir) (infos) )
  284.     )
  285.     ; else no info there
  286.     (copyfiles (source "ExtraInfo") (dest eidir) (infos) )
  287. )
  288.  
  289. (set @default-dest eidir)
  290.  
  291. ; ------------------------------------------------------------------------
  292. ; Install BGUI library. If expert, ask for directory.
  293.  
  294. (if (= 2 @user-level)
  295.     (set libsdir
  296.         (askdir
  297.             (prompt #bgui-askdir-msg)
  298.             (help @askdir-help)
  299.             (default libsdir)
  300.         )
  301.     )
  302. )
  303.  
  304. (copylib (source "Libs/bgui.library") (dest libsdir)
  305. )
  306.  
  307. ; ---------------------------