home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 13 / amigaformatcd13.iso / -seriously_amiga- / shareware / misc / ro / ro_v125.lha / RO / Install / RO-Install < prev    next >
Text File  |  1997-02-14  |  7KB  |  391 lines

  1. ; $VER: RO-Install 1.25 (1.2.97)
  2. ; Original RO Installer script by Juergen Schubert
  3. ; 100% Rewritten by Oliver Rummeyer
  4.  
  5. ;========================================================
  6. ; Set Strings
  7.  
  8. (set #nokick
  9. (cat "You must be using Kickstart 2.04 to use RO. Aborting!"
  10. ))
  11.  
  12. (set #nomui
  13. (cat "You need version 3.6 of MUI or better. Aborting!"
  14. ))
  15.  
  16. (set #startmsg
  17. (cat "\n\RO installation script.\n"
  18.      "This script installs RO on your Amiga.\n\n"
  19.      "Read the Documentation files for\n"
  20.      "more information on the distribution.\n"
  21.      "RO © 1994-1997 Oliver Rummeyer\n"
  22.      "All rights reserved."
  23. ))
  24.  
  25. (set #icons "Which type of icons would you like to install")
  26. (set #magicwbicons "MagicWB-Style Icons; 8 colors")
  27. (set #classicicons "Classic-WB-Style Icons; 4 colors")
  28. (set #noicons "No Icons")
  29.  
  30. (set #install "\n\nInstalling RO to\n\n")
  31. (set #drawer
  32. (cat "In which disk or drawer should RO be installed?\n"
  33.      "(A drawer \"RO\" will be created there)"
  34. ))
  35.  
  36. (set #update
  37. (cat "A drawer \"RO\" already exists in the specified disk "
  38.      "or drawer. Your prefs settings are NOT changed if you "
  39.      "continue the installation procedure. Check the documentation "
  40.      "as some additional configuration keywords might be "
  41.      "introduced by this update.\n\n"
  42.      "Should I continue the installation procedure?"
  43. ))
  44.  
  45. (set #lang "Which languages should be installed?")
  46. (set #own
  47. (cat    "\n\nIf you want to create own versions of\n"
  48.     "the catalogs please have a look at the\n"
  49.     "distributions Locale directory. You will\n"
  50.     "find the .ct and .cd files there."
  51. ))
  52.  
  53. (set #install-docs "Would you like to install RO's documentation?")
  54. (set #doc "Which documentation formats would you like to install?")
  55. (set #doclang "Which language do you prefer for the documentation?")
  56.  
  57. (set #install-rexx "Would you like to install the arexx examples?")
  58. (set #drawer-rexx "In which disk or drawer should the arexx examples be installed?")
  59.  
  60. (set #exitmsg
  61. (cat "Please support the shareware concept!\n\n"
  62.      "If you like RO, please send $20.- or DM 30.- to\n\n"
  63.      "Oliver Rummeyer\n"
  64.      "Hochbergstraße 49/1\n"
  65.      "D-88213 Ravensburg\n"
  66.      "Germany/Europe"
  67. ))
  68. ;========================================================
  69.  
  70. (if (< (/ (getversion) 65536) 37)
  71. (
  72.     (abort #nokick)
  73. ))
  74.  
  75. (if (<> (exists "mui:" (noreq)) 0)
  76. (
  77.     (if (>= (run "c:version muimaster.library VERSION 17") 5)
  78.     (
  79.         (abort #nomui)
  80.     ))
  81. )
  82. (
  83.     (abort #nomui)
  84. ))
  85.  
  86. ;=========================================================
  87.  
  88. (message #startmsg)
  89.  
  90. (complete 0)
  91.  
  92. ;=========================================================
  93.  
  94. (set IconType
  95.     (askchoice
  96.         (prompt #icons)
  97.         (help @askchoice-help)
  98.         (choices
  99.             #magicwbicons
  100.             #classicicons
  101.             #noicons
  102.         )
  103.         (default 0)
  104.     )
  105. )
  106.  
  107. (complete 15)
  108.  
  109. ;=========================================================
  110.  
  111. (set TargetDir
  112.     (askdir
  113.         (prompt #drawer)
  114.         (default "SYS:Tools")
  115.         (help @askdir-help)
  116.     )
  117. )
  118.  
  119. (set DestDir (tackon TargetDir "RO"))
  120. (set @default-dest DestDir)
  121.  
  122. (if (= (exists DestDir) 2)
  123.    (message #update)
  124. )
  125.  
  126. (complete 30)
  127.  
  128. ;=========================================================
  129.  
  130. (makedir DestDir
  131.     (prompt #install DestDir)
  132. )
  133.  
  134. (if (= IconType 0)
  135. (
  136.        (copyfiles
  137.            (source "")
  138.         (choices "/Icons/8col/RO.info" "/Icons/8col/ROPrefs.info" "/Icons/8col/RO.guide.info" "/Icons/8col/RegForm.info")
  139.            (dest DestDir)
  140.     )
  141.     (copyfiles
  142.         (source "/Icons/8col/Drawer.info")
  143.         (dest TargetDir)
  144.         (newname "RO.info")
  145.     )
  146. ))
  147.  
  148. (if (= IconType 1)
  149. (
  150.        (copyfiles
  151.            (source "")
  152.         (choices "/Icons/4col/RO.info" "/Icons/4col/ROPrefs.info" "/Icons/4col/RO.guide.info" "/Icons/4col/RegForm.info")
  153.            (dest DestDir)
  154.     )
  155.     (copyfiles
  156.         (source "/Icons/4col/Drawer.info")
  157.         (dest TargetDir)
  158.         (newname "RO.info")
  159.     )
  160. ))
  161.  
  162. (copyfiles
  163.     (help @copyfiles-help)
  164.     (source "/Binary/RO,binary")
  165.     (dest DestDir)
  166.     (newname "RO")
  167. )
  168.  
  169. (copyfiles
  170.     (help @copyfiles-help)
  171.     (source "/Binary/ROPrefs,binary")
  172.     (dest DestDir)
  173.     (newname "ROPrefs")
  174. )
  175.  
  176. (if (= (exists "ENV:RO") 0)
  177.     (makedir "ENV:RO")
  178. )
  179. (if (= (exists "ENVARC:RO") 0)
  180.     (makedir "ENVARC:RO")
  181. )
  182.  
  183. (if (= (exists "ENV:RO/RO.prefs") 0)
  184.     (copyfiles
  185.         (help @copyfiles-help)
  186.         (source "/Config/RO.prefs,default")
  187.         (dest "ENV:RO/")
  188.         (newname "RO.prefs")
  189.     )
  190. )
  191.  
  192. (if (= (exists "ENVARC:RO/RO.prefs") 0)
  193.     (copyfiles
  194.         (help @copyfiles-help)
  195.         (source "/Config/RO.prefs,default")
  196.         (dest "ENVARC:RO/")
  197.         (newname "RO.prefs")
  198.     )
  199. )
  200.  
  201. (complete 45)
  202.  
  203. ;========================================================
  204. ; Install Locale
  205.  
  206. (if (AND (NOT (= (getassign "Locale") "")) (exists "libs:locale.library"))
  207. (
  208.  
  209.     (set Lang
  210.         (askoptions
  211.             (prompt #lang)
  212.             (help @askoptions-help)
  213.             (choices "Deutsch" "Français" "Svenska" )
  214.             (default 0)
  215.         )
  216.     )
  217.  
  218.     (if (IN Lang 0)
  219.         (copyfiles
  220.             (source "")
  221.             (choices "/Locale/Catalogs/Deutsch/ro.catalog")
  222.             (dest "LOCALE:Catalogs/Deutsch")
  223.         )
  224.     )
  225.  
  226.     (if (IN Lang 1)
  227.         (copyfiles
  228.             (source "")
  229.             (choices "/Locale/Catalogs/Français/ro.catalog")
  230.             (dest "LOCALE:Catalogs/Français")
  231.         )
  232.     )
  233.  
  234.     (if (IN Lang 2)
  235.         (copyfiles
  236.             (source "")
  237.             (choices "/Locale/Catalogs/Svenska/ro.catalog")
  238.             (dest "LOCALE:Catalogs/Svenska")
  239.         )
  240.     )
  241.  
  242.     (message #own)
  243. ))
  244.  
  245. (complete 60)
  246.  
  247. ;========================================================
  248. ; Install ARexx Scripts
  249.  
  250. (if (askbool (help @askbool-help) (prompt #install-rexx))
  251. (
  252.     (set RexxDir
  253.     (askdir
  254.         (prompt #drawer-rexx)
  255.         (default "REXX:")
  256.         (help @askdir-help)
  257.     ))
  258.  
  259.        (copyfiles
  260.            (source "")
  261.         (choices
  262.             "/ARexx/Action.RO"
  263.             "/ARexx/AddArc.RO"
  264.             "/ARexx/ArcHandler.RO"
  265.             "/ARexx/Deiconify.RO"
  266.             "/ARexx/Iconify.RO"
  267.             "/ARexx/LoadDir.RO"
  268.             "/ARexx/LoadOther.RO"
  269.             "/ARexx/PlayModule.RO"
  270.             "/ARexx/ShowHtml.RO"
  271.         )
  272.            (dest RexxDir)
  273.     )
  274.  
  275. ))
  276.  
  277. (complete 75)
  278.  
  279. ;=========================================================
  280. ; Install Documentation
  281.  
  282. (if (askbool (help @askbool-help) (prompt #install-docs))
  283. (
  284.  
  285.     (set doctype
  286.         (askoptions
  287.             (prompt #doc)
  288.             (help @askoptions-help)
  289.             (choices
  290.                 "AmigaGuide ® V39"
  291.             )
  292.             (default 1)
  293.         )
  294.     )
  295.  
  296.     (if (<> doctype 0)
  297.     (
  298.  
  299.         (set doclang
  300.             (askchoice
  301.                 (prompt #doclang)
  302.                 (help @askchoice-help)
  303.                 (choices
  304.                     "English"
  305.                     "Deutsch"
  306.                     "Français"
  307.                     "Svenska"
  308.                 )
  309.                 (default 0)
  310.             )
  311.         )
  312.     ))
  313.  
  314.     (if (= doctype 1)
  315.     (
  316.  
  317.         (if (= doclang 0)
  318.         (
  319.             (copyfiles
  320.                 (source "/Docs/RO.guide,english")
  321.                 (dest DestDir)
  322.                 (newname "RO.guide")
  323.             )
  324.             (copyfiles
  325.                 (source "/Docs/RegForm,english")
  326.                 (dest DestDir)
  327.                 (newname "RegForm")
  328.             )
  329.         ))
  330.  
  331.         (if (= doclang 1)
  332.         (
  333.             (copyfiles
  334.                 (source "/Docs/RO.guide,deutsch")
  335.                 (dest DestDir)
  336.                 (newname "RO.guide")
  337.             )
  338.             (copyfiles
  339.                 (source "/Docs/RegForm,deutsch")
  340.                 (dest DestDir)
  341.                 (newname "RegForm")
  342.             )
  343.         ))
  344.  
  345.         (if (= doclang 2)
  346.         (
  347.             (copyfiles
  348.                 (source "/Docs/RO.guide,francais")
  349.                 (dest DestDir)
  350.                 (newname "RO.guide")
  351.             )
  352.             (copyfiles
  353.                 (source "/Docs/RegForm,francais")
  354.                 (dest DestDir)
  355.                 (newname "RegForm")
  356.             )
  357.         ))
  358.  
  359.         (if (= doclang 3)
  360.         (
  361.             (copyfiles
  362.                 (source "/Docs/RO.guide,svenska")
  363.                 (dest DestDir)
  364.                 (newname "RO.guide")
  365.             )
  366.             (copyfiles
  367.                 (source "/Docs/RegForm,svenska")
  368.                 (dest DestDir)
  369.                 (newname "RegForm")
  370.             )
  371.         ))
  372.  
  373.     ))
  374.  
  375.     (if (= doctype 0)
  376.     (
  377.         (delete    (tackon DestDir "RO.guide.info"))
  378.         (delete    (tackon DestDir "RegForm.info"))
  379.     ))
  380.  
  381. )
  382. (
  383.     (delete    (tackon DestDir "RO.guide.info"))
  384.     (delete    (tackon DestDir "RegForm.info"))
  385. ))
  386.  
  387. (complete 100)
  388.  
  389. ;==========================================================
  390. (exit #exitmsg)
  391.