home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1998 #5 / AmigaPlus_CD-ROM_Nr.5-98.iso / pd / daten / address / install-address < prev    next >
Text File  |  1998-03-19  |  10KB  |  392 lines

  1. ; Install script for Address
  2. ; This script is Copyrighted © 1997 - 1998 by Kristoffer Larsson
  3.  
  4. (set #wrong-kickstart
  5.     (cat "You must upgrade to Kickstart 2.04 to be able to use this program!")
  6. )
  7.  
  8. (set #ask-assign
  9.     (cat "In order to use Address, the logical device name\n"
  10.          "\"Address:\" must be assigned to the drawer where\n"
  11.          "you have chosen to install Address. Either the\n"
  12.          "installation script can add this assign to your\n"
  13.          "\"S:User-Startup\" file or you must add the assign\n"
  14.          "manually.\n\n"
  15.          "Would you like the installation script to\n"
  16.          "automatically add the necessary assign to your\n"
  17.          "\"S:User-Startup\" file?")
  18. )
  19.  
  20. (set #ask-assign-help
  21.     (cat "In order to use Address the logical device name \"Address:\" "
  22.          "must be assigned to the drawer where you have chosen to "
  23.          "install the files in this package, i.e., the complete path "
  24.          "to the drawer \"Address\" which has been created on your "
  25.          "harddisk/floppy disk.\n\n"
  26.          "The installation script can add this assign to your \"S:User-Startup\" "
  27.          "file automatically. If you don't wish the script to edit your file "
  28.          "you must manually add the assign to your \"S:User-Startup\"; otherwise "
  29.          "Address won't work properly.\n\n")
  30. )
  31.  
  32. (set #installing-program
  33.     (cat "Installing Address into the drawer you have chosen ...")
  34. )
  35.  
  36. (set #installing-example
  37.     (cat "Installing an example database ...")
  38. )
  39.  
  40. (set #installing-documentation
  41.     (cat "Installing the documentation ...")
  42. )
  43.  
  44. (set #ask-icons
  45.     (cat "Which set of icons would you like to install for the files in "
  46.          "this package?")
  47. )
  48.  
  49. (set #ask-icons-help
  50.     (cat "In today's Amiga world a great number of different sets of icons "
  51.          "exist, such as NewIcons or MagicWB icons. With great help "
  52.          "from some icon designers I have compiled four different sets "
  53.          "of icons for the Address package. The icons in question belong "
  54.          "to either of these sets:\n\n"
  55.          "NewIcons\n"
  56.          "MagicWB icons\n"
  57.          "FreshIcons\n"
  58.          "Standard Amiga icons\n\n"
  59.          "The last phrase is the term I use for describing the style of the standard Amiga "
  60.          "icons that were made by Commodore and that were installed when you "
  61.          "purchased your Amiga.")
  62.  
  63. )
  64.  
  65. (set #installing-newicons
  66.     (cat "Installing the NewIcons especially made for Address ...")
  67. )
  68.  
  69. (set #installing-magicwbicons
  70.     (cat "Installing the MagicWB icons especially made for Address ...")
  71. )
  72.  
  73. (set #installing-freshicons
  74.     (cat "Installing the FreshIcons especially made for Address ...")
  75. )
  76.  
  77. (set #installing-standardicons
  78.     (cat "Installing the Standard Amiga icons especially made for Address ...")
  79. )
  80.  
  81. (set #newicons
  82.     (cat "NewIcons")
  83. )
  84.  
  85. (set #magicwb
  86.     (cat "MagicWB icons")
  87. )
  88.  
  89. (set #freshicons
  90.     (cat "FreshIcons")
  91. )
  92.  
  93. (set #standard
  94.     (cat "Standard Amiga icons")
  95. )
  96.  
  97. (set #ask-language-help
  98.     (cat "If your system is localized you might experience a not entirely "
  99.          "correct sorting of the names in the Main Window of Address. "
  100.          "The reason for this is that some of the \"LOCALE:Languages/#?.language\" files "
  101.          "that Commodore once manufactured are incorrect in certain respects or even missing.\n\n"
  102.          "The faulty (or non-existent) files are:\n"
  103.          "\"svenska.language\"\n"
  104.          "\"norsk.language\"\n"
  105.          "\"íslenska.language\"\n"
  106.          "\"deutsch.language\"\n\n"
  107.          "This installation script can replace these faulty files with "
  108.          "correct ones by deleting, for example, \"LOCALE:Languages/svenska.language\" "
  109.          "from your harddisk/floppy disk and installing a correct \"svenska.language\" "
  110.          "in its place.")
  111. )
  112.  
  113. (set #ask-language
  114.     (cat "Is your system localized and is either of\n"
  115.          "\"svenska.language\", \"norsk.language\" or\n"
  116.          "\"deutsch.language\" installed in your\n"
  117.          "\"LOCALE:Languages/\"?\n"
  118.          "Do you speak íslenska and would like a correct\n"
  119.          "\"íslenska.language\" installed in your system?\n\n"
  120.          "If your answer is \"yes\" to either or both of\n"
  121.          "the questions above, would you like the\n"
  122.          "installation script to replace these (probably)\n"
  123.          "faulty (or non-existent) files with correct ones?")
  124. )
  125.  
  126. (set #choose-language
  127.     (cat "Choose the file or files you wish to replace.")
  128. )
  129.  
  130. (set #svenska
  131.     (cat "svenska.language")
  132. )
  133.  
  134. (set #norsk
  135.     (cat "norsk.language")
  136. )
  137.  
  138. (set #íslenska
  139.     (cat "íslenska.language")
  140. )
  141.  
  142. (set #deutsch
  143.     (cat "deutsch.language")
  144. )
  145.  
  146. (set installing-svenska
  147.     (cat "Installing \"svenska.language\" into \"LOCALE:Languages/\" ...")
  148. )
  149.  
  150. (set installing-norsk
  151.     (cat "Installing \"norsk.language\" into \"LOCALE:Languages/\" ...")
  152. )
  153.  
  154. (set installing-íslenska
  155.     (cat "Installing \"íslenska.language\" into \"LOCALE:Languages/\" ...")
  156. )
  157.  
  158. (set installing-deutsch
  159.     (cat "Installing \"deutsch.language\" into \"LOCALE:Languages/\" ...")
  160. )
  161.  
  162. (set #ask-drawer
  163.     (cat "Select a drawer in which to install all the files "
  164.          "that are part of the Address distribution. "
  165.          "This installation script will create a drawer called \"Address\" "
  166.          "in the drawer you choose here and install "
  167.          "the Address files into this drawer.")
  168. )
  169.  
  170. (set #ask-drawer-help
  171.     (cat "By selecting a particular drawer in the requester "
  172.          "you tell the installation script where it should "
  173.          "create a drawer called \"Address\".\n"
  174.          "To this drawer, i.e., \"Address\", the script will copy "
  175.          "all the files necessary to run Address.")
  176. )
  177.  
  178. (set #welcome
  179.     (cat "\n\nWelcome to Address 1.0\n\n"
  180.      "All the files in this distribution are\n"
  181.      "Copyrighted © 1997 - 1998 by Kristoffer Larsson\n"
  182.      "All rights reserved")
  183. )
  184.  
  185. (if (< (/ (getversion) 65536) 37)
  186.     (
  187.         (abort #wrong-kickstart)
  188.     )
  189. )
  190.  
  191. (complete 0)
  192.  
  193. (welcome "\n\nWelcome to the Address installation!\n")
  194.  
  195. (message #welcome)
  196.  
  197. (complete 20)
  198.  
  199. (set @default-dest "SYS:")
  200.  
  201. (set destdir
  202.     (askdir
  203.            (prompt #ask-drawer)
  204.            (help #ask-drawer-help)
  205.            (default @default-dest)
  206.     )
  207. )
  208.  
  209. (set programdir (tackon destdir "Address"))
  210. (set @default-dest programdir)
  211. (set datadir (tackon programdir "Data"))
  212. (set docdir (tackon programdir "Documentation"))
  213.  
  214. (makedir programdir)
  215. (makedir datadir)
  216. (makedir docdir)
  217.  
  218. (copyfiles (prompt #installing-program)
  219.     (source "Bin/Address")
  220.     (dest programdir)
  221. )
  222.  
  223. (copyfiles (prompt #installing-example)
  224.     (source "Data/people.dat")
  225.     (dest datadir)
  226. )
  227.  
  228. (copyfiles (prompt #installing-documentation)
  229.     (source "Documentation/Address.guide")
  230.     (dest docdir)
  231. )
  232.  
  233. (complete 40)
  234.  
  235. (set iconchoice
  236.     (askoptions
  237.         (prompt #ask-icons)
  238.         (choices #newicons #magicwb #freshicons #standard)
  239.         (default 1)
  240.         (help #ask-icons-help)))
  241.  
  242. (if (<> 0 (BITAND iconchoice 1))
  243.     (
  244.         (copyfiles (prompt #installing-newicons)
  245.             (source "Icons/NewIcons/Address_Drawer.info")
  246.             (newname "Address.info")
  247.             (dest destdir))
  248.         (copyfiles (prompt #installing-newicons)
  249.             (source "Icons/NewIcons/Address.info")
  250.             (dest programdir))
  251.         (copyfiles (prompt #installing-newicons)
  252.             (source "Icons/NewIcons/Address.guide.info")
  253.             (dest docdir))
  254.         (copyfiles (prompt #installing-newicons)
  255.             (source "Icons/NewIcons/Documentation.info")
  256.             (dest programdir))
  257.     )
  258. )
  259.  
  260. (if (<> 0 (BITAND iconchoice 2))
  261.     (
  262.         (copyfiles (prompt #installing-magicwbicons)
  263.             (source "Icons/MagicWB/Address_Drawer.info")
  264.             (newname "Address.info")
  265.             (dest destdir))
  266.         (copyfiles (prompt #installing-magicwbicons)
  267.             (source "Icons/MagicWB/Address.info")
  268.             (dest programdir))
  269.         (copyfiles (prompt #installing-magicwbicons)
  270.             (source "Icons/MagicWB/Address.guide.info")
  271.             (dest docdir))
  272.         (copyfiles (prompt #installing-magicwbicons)
  273.             (source "Icons/MagicWB/Documentation.info")
  274.             (dest programdir))
  275.     )
  276. )
  277.  
  278. (if (<> 0 (BITAND iconchoice 4))
  279.     (
  280.         (copyfiles (prompt #installing-freshicons)
  281.             (source "Icons/FreshIcons/Address_Drawer.info")
  282.             (newname "Address.info")
  283.             (dest destdir))
  284.         (copyfiles (prompt #installing-freshicons)
  285.             (source "Icons/FreshIcons/Address.info")
  286.             (dest programdir))
  287.         (copyfiles (prompt #installing-freshicons)
  288.             (source "Icons/Standard/Address.guide.info")
  289.             (dest docdir))
  290.         (copyfiles (prompt #installing-freshicons)
  291.             (source "Icons/FreshIcons/Documentation.info")
  292.             (dest programdir))
  293.     )
  294. )
  295.  
  296. (if (<> 0 (BITAND iconchoice 8))
  297.     (
  298.         (copyfiles (prompt #installing-standardicons)
  299.             (source "Icons/Standard/Address_Drawer.info")
  300.             (newname "Address.info")
  301.             (dest destdir))
  302.         (copyfiles (prompt #installing-standardicons)
  303.             (source "Icons/Standard/Address.info")
  304.             (dest programdir))
  305.         (copyfiles (prompt #installing-standardicons)
  306.             (source "Icons/Standard/Address.guide.info")
  307.             (dest docdir))
  308.         (copyfiles (prompt #installing-standardicons)
  309.             (source "Icons/Standard/Documentation.info")
  310.             (dest programdir))
  311.     )
  312. )
  313.  
  314. (complete 60)
  315.  
  316. (if
  317.     (askbool
  318.         (prompt #ask-language)
  319.         (help #ask-language-help)
  320.         (choices "Yes" "No"))
  321.     (
  322.         (set languagechoice
  323.             (askoptions
  324.                 (prompt #choose-language)
  325.                 (choices #svenska #norsk #íslenska #deutsch)
  326.                 (default 1)
  327.                 (help #ask-language-help)
  328.             )
  329.         )
  330.  
  331.         (if (<> 0 (BITAND languagechoice 1))
  332.                (copyfiles (prompt #installing-svenska)
  333.                 (source "Languages/svenska.language")
  334.                 (dest "LOCALE:Languages/")
  335.             )
  336.         )
  337.  
  338.         (if (<> 0 (BITAND languagechoice 2))
  339.                (copyfiles (prompt #installing-norsk)
  340.                 (source "Languages/norsk.language")
  341.                 (dest "LOCALE:Languages/")
  342.             )
  343.         )
  344.  
  345.         (if (<> 0 (BITAND languagechoice 4))
  346.                (copyfiles (prompt #installing-íslenska)
  347.                 (source "Languages/íslenska.language")
  348.                 (dest "LOCALE:Languages/")
  349.             )
  350.         )
  351.  
  352.         (if (<> 0 (BITAND languagechoice 8))
  353.                (copyfiles (prompt #installing-deutsch)
  354.                 (source "Languages/deutsch.language")
  355.                 (dest "LOCALE:Languages/")
  356.             )
  357.         )
  358.     )
  359. )
  360.  
  361. (complete 80)
  362.  
  363. (set #add-to-startup
  364.     (cat "assign Address: \"" (programdir) "\"\n"
  365.     )
  366. )
  367.  
  368. (if
  369.     (askbool
  370.         (prompt #ask-assign)
  371.         (help #ask-assign-help)
  372.         (choices "Yes" "No")
  373.     )
  374.  
  375.     (startup "Address"
  376.         (prompt "The following line will be added to your "
  377.             "\"S:User-Startup\" file:\n\n"
  378.             #add-to-startup)
  379.         (help #ask-assign-help)
  380.         (command #add-to-startup)
  381.     )
  382. )
  383.  
  384. (if (exists programdir)
  385.         (makeassign "Address"
  386.         (programdir)
  387.         (safe)
  388.     )
  389. )
  390.  
  391. (complete 100)
  392.