home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / wbgames / lazymines3.0 / installationscript < prev    next >
Text File  |  1977-12-31  |  10KB  |  322 lines

  1. ; $VER: installationscript 3.0 (25.5.95)
  2. ; Script to install LazyMines 3.0
  3.  
  4. ;=============================================================================
  5. ;English strings
  6.  
  7. (if (= @language "english")
  8. (
  9. (set default_lang 0)
  10. (set default_doc 0)
  11.  
  12. (set #bad-kick
  13.      "You need at least version 37 of AmigaOS to run LazyMines.")
  14.  
  15. (set #how-install
  16.      (cat "Do you want to install the whole program or just update the "
  17.           "language catalogs?"))
  18.  
  19. (set #how-install-help
  20.      (cat "Choose \"Install whole program\" if you are installing from "
  21.           "scratch or if you are updating an old version.\n"
  22.           "\nChoose \"Update languages\" if you want to install or remove "
  23.           "language catalogs."))
  24.  
  25. (set #how-install-1 "Install whole program")
  26. (set #how-install-2 "Update languages")
  27.  
  28. (set #where-install
  29.      "Choose location where you want to install LazyMines.")
  30.  
  31. (set #which-documentation
  32.      "Which documentation do you want to install with LazyMines?")
  33.  
  34. (set #which-documentation-help
  35.      "Check the language you want to install with LazyMines.")
  36.  
  37. (set #which-icons
  38.      "Which icons do you want to install with LazyMines?")
  39.  
  40. (set #which-icons-help
  41.      (cat "Choose \"MagicWB icons\" if you have MagicWB installed, "
  42.           "otherwise choose \"Standard icons\"."))
  43.  
  44. (set #which-icons-1 "MagicWB icons")
  45. (set #which-icons-2 "Standard icons")
  46.  
  47. (set #no-languages
  48.      (cat "You need at least version 38 of AmigaOS to have any use for the "
  49.           "language catalogs."))
  50.  
  51. (set #where-languages
  52.      "Where do you want to install the language catalogs?")
  53.  
  54. (set #where-languages-help
  55.      (cat "This lets you choose if you want the language catalogs to be "
  56.           "copied to the same location as the rest of the program, or if "
  57.           "you want to have them in the global Catalog dir."))
  58.  
  59. (set #which-languages
  60.      "Which language catalogs do you want to install with LazyMines?")
  61.  
  62. (set #which-languages-help
  63.      (cat "Check all languages you want to install with LazyMines.\n"
  64.           "\nIf a language already installed is not checked, "
  65.           "it will be removed."))
  66. ))
  67.  
  68.  
  69. ;=============================================================================
  70. ;Norwegian strings
  71.  
  72. (if (= @language "norsk")
  73. (
  74. (set default_lang 1)
  75. (set default_doc 1)
  76.  
  77. (set #bad-kick
  78.      "Du trenger minst versjon 37 av AmigaOS for å kjøre LazyMines.")
  79.  
  80. (set #how-install
  81.      (cat "Ønsker du å installere hele programmet eller kun oppdatere "
  82.           "språkkatalogene?"))
  83.  
  84. (set #how-install-help
  85.      (cat "Velg \"Installér hele programmet\" hvis du installerer fra"
  86.           "grunnen eller hvis du oppdaterer en eldre versjon.\n"
  87.           "\nVelg \"Oppdatér språk\" hvis du ønsker å installere eller"
  88.           "fjerne språkkataloger."))
  89.  
  90. (set #how-install-1 "Installér hele programmet")
  91. (set #how-install-2 "Oppdatér språk")
  92.  
  93. (set #where-install
  94.      "Velg hvor du ønsker å installere LazyMines.")
  95.  
  96. (set #which-documentation
  97.      "Hvilken dokumentasjon ønsker du å installere med LazyMines?")
  98.  
  99. (set #which-documentation-help
  100.      "Merk av språkene du ønsker å installere med LazyMines.")
  101.  
  102. (set #which-icons
  103.      "Hvilke ikoner ønsker du å installere med LazyMines?")
  104.  
  105. (set #which-icons-help
  106.      (cat "Velg \"MagicWB ikoner\" hvis du har MagicWB installert, "
  107.           "velg ellers \"Standard ikoner\"."))
  108.  
  109. (set #which-icons-1 "MagicWB ikoner")
  110. (set #which-icons-2 "Standard ikoner")
  111.  
  112. (set #no-languages
  113.      (cat "Du trenger minst versjon 38 av AmigaOS for å kunne benytte "
  114.           "språkkatalogene."))
  115.  
  116. (set #where-languages
  117.      "Hvor ønsker du å installere språkkatalogene?")
  118.  
  119. (set #where-languages-help
  120.      (cat "Dette lar deg velge om du ønsker å kopiere språkkatalogene "
  121.           "til den samme skuffen som resten av programmet, eller om du "
  122.           "ønsker å ha dem i den globale Catalog-skuffen."))
  123.  
  124. (set #which-languages
  125.      "Hvilke språkkataloger ønsker du å installere med LazyMines?")
  126.  
  127. (set #which-languages-help
  128.      (cat "Merk alle språk du ønsker å installere med LazyMines.\n"
  129.           "\nHvis allerede installerte språk ikke merkes, vil "
  130.           "disse fjernes."))
  131. ))
  132.  
  133.  
  134. ;=============================================================================
  135. ; Swedish strings
  136.  
  137. (if (= @language "svenska")
  138. (
  139. (set default_lang 4)
  140. (set default_doc 2)
  141.  
  142. (set #bad-kick
  143.      "Du behöver minst version 37 av AmigaOS för att kunna köra LazyMines.")
  144.  
  145. (set #how-install
  146.      (cat "Vill du installera hela programmet eller bara uppdatera "
  147.           "översättningsfilerna?"))
  148.  
  149. (set #how-install-help
  150.      (cat "Välj \"Installera allt\" om du inte har en tidigare "
  151.           "version installerad eller om du skall uppdatera en gammal "
  152.           "version.\n"
  153.           "\nVälj \"Uppdatera översättningar\" om du vill installera eller "
  154.           "ta bort översättningsfiler."))
  155.  
  156. (set #how-install-1 "Installera allt")
  157. (set #how-install-2 "Uppdatera översättningar")
  158.  
  159. (set #where-install
  160.      "Välj position där du vill installera LazyMines.")
  161.  
  162. (set #which-documentation
  163.      "Vilken dokumentation vill du installera med LazyMines?")
  164.  
  165. (set #which-documentation-help
  166.      "Markera den dokumentation du vill installera med LazyMines.")
  167.  
  168. (set #which-icons
  169.      "Vilka ikoner vill du installera med LazyMines?")
  170.  
  171. (set #which-icons-help
  172.      (cat "Välj \"MagicWB-ikoner\" om du har MagicWB installerat, "
  173.           "välj annars \"Standardikoner\"."))
  174.  
  175. (set #which-icons-1 "MagicWB-ikoner")
  176. (set #which-icons-2 "Standardikoner")
  177.  
  178. (set #no-languages
  179.      (cat "Du behöver minst version 38 av AmigaOS för att ha någon "
  180.           "användning av översättningsfilerna."))
  181.  
  182. (set #where-languages
  183.      "Var vill du installera översättningsfilerna?")
  184.  
  185. (set #where-languages-help
  186.      (cat "Detta låter dig välja om du vill att översättningsfilerna skall "
  187.           "kopieras till samma position som resten av programmet, eller om "
  188.           "du vill spara dem globalt."))
  189.  
  190. (set #which-languages
  191.      "Vilka översättningsfiler vill du installera?")
  192.  
  193. (set #which-languages-help
  194.      (cat "Markera alla översättningar som du vill installera.\n"
  195.           "\nOm ett språk som redan blivit installerat inte markeras kommer "
  196.           "det att raderas."))
  197. ))
  198.  
  199.  
  200. ;=============================================================================
  201. ;Procedures
  202.  
  203. (procedure install-program
  204.   (set @default-dest prog-dest)
  205.   (copylib (source (tackon sourcedir "LazyMines"))
  206.            (dest prog-dest)))
  207.  
  208. (procedure install-documentation
  209.   (set which-documentation (askchoice (prompt #which-documentation)
  210.                                       (help #which-documentation-help)
  211.                                       (choices "English"
  212.                                                "Norsk"
  213.                                                "Svenska")
  214.                                       (default default_doc)))
  215.   (set doc "English.guide")
  216.   (if (= which-documentation 0)
  217.       (install-doc))
  218.   (set doc "Norsk.guide")
  219.   (if (= which-documentation 1)
  220.       (install-doc))
  221.   (set doc "Svenska.guide")
  222.   (if (= which-documentation 2)
  223.       (install-doc)))
  224.  
  225. (procedure install-doc  
  226.   (copyfiles (source (tackon doc-srcdir doc))
  227.              (dest prog-dest)
  228.              (newname "LazyMines.guide")))
  229.  
  230. (procedure install-icons
  231.   (set which-icons (askchoice (prompt #which-icons)
  232.                               (help #which-icons-help)
  233.                               (choices #which-icons-1 #which-icons-2)))
  234.   (if (= which-icons 0)
  235.       ((set icon-srcdir (tackon icon-srcdir "misc"))
  236.        (set docicon-src (tackon icon-srcdir "LazyMines.guide.info"))))
  237.   (copyfiles (source icon-srcdir)
  238.              (dest prog-dest)
  239.              (choices "LazyMines.info"))
  240.   (copyfiles (source docicon-src)
  241.              (dest prog-dest)
  242.              (newname "LazyMines.guide.info"))
  243.   (tooltype (dest (tackon prog-dest "LazyMines"))
  244.             (noposition))
  245.   (tooltype (dest (tackon prog-dest "LazyMines.guide"))
  246.             (noposition)))
  247.  
  248. (procedure install-locales
  249.   (set where-languages (askchoice (prompt #where-languages)
  250.                                   (help #where-languages-help)
  251.                                   (choices locale-dest
  252.                                            locale-sysdest)))
  253.   (if (= where-languages 1)
  254.       (set locale-dest locale-sysdest))
  255.   (set which-languages (askoptions (prompt #which-languages)
  256.                                    (help #which-languages-help)
  257.                                    (choices "Norsk"
  258.                                             "Polski"
  259.                                             "Svenska")
  260.                                    (default default_lang)))
  261.   (set locale "norsk")
  262.   (if (IN which-languages 0)
  263.       (install-locale)
  264.       (remove-locale))
  265.   (set locale "polski")
  266.   (if (IN which-languages 1)
  267.       (install-locale)
  268.       (remove-locale))
  269.   (set locale "svenska")
  270.   (if (IN which-languages 2)
  271.       (install-locale)
  272.       (remove-locale)))
  273.  
  274. (procedure install-locale
  275.   (makedir locale-dest)
  276.   (makedir (tackon locale-dest locale))
  277.   (copylib (source (tackon (tackon locale-srcdir locale) "lazymines.catalog"))
  278.            (dest (tackon locale-dest locale))))
  279.  
  280. (procedure remove-locale
  281.   (delete (tackon (tackon locale-dest locale) "lazymines.catalog"))
  282.   (if (NOT (= locale-dest locale-sysdest))
  283.       ((delete (tackon locale-dest locale))
  284.        (delete locale-dest))))
  285.  
  286.  
  287. ;=============================================================================
  288. ; Main program
  289.  
  290. (if (< (/ (getversion) 65536) 37)
  291.     (abort #bad-kick))
  292.  
  293. (welcome)
  294.  
  295. (set sourcedir (tackon (pathonly @icon) "/"))
  296. (set doc-srcdir (tackon sourcedir "Docs"))
  297. (set icon-srcdir sourcedir)
  298. (set docicon-src (tackon doc-srcdir "English.guide.info"))
  299. (set locale-srcdir (tackon sourcedir "Catalogs"))
  300. (set locale-sysdest "LOCALE:Catalogs")
  301.  
  302. (set prog-dest (askdir (prompt #where-install)
  303.                        (help @askdir-help)
  304.                        (default @default-dest)))
  305.  
  306. (set how-install (askchoice (prompt #how-install)
  307.                             (help #how-install-help)
  308.                             (choices #how-install-1 #how-install-2)))
  309.  
  310. (if (= how-install 0)
  311.     ((install-program)
  312.      (install-documentation)
  313.      (install-icons)
  314.      (run (cat "convscorefile \"" prog-dest "\"")))
  315.     (set @default-dest ""))
  316.  
  317. (if (< (/ (getversion) 65536) 38)
  318.     (exit #no-languages))
  319.  
  320. (set locale-dest (tackon prog-dest "Catalogs"))
  321. (install-locales)
  322.