home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / dev / mui-2.1.lha / MUI-2.1 / MUI-Install < prev    next >
Encoding:
Text File  |  1994-07-03  |  10.6 KB  |  497 lines

  1. ;***** MagicUserInterface Installation Script
  2.  
  3. (transcript "Installing Magic User Interface...")
  4. (set @default-dest "SYS:")
  5.  
  6. ;***** Introduction
  7. (complete 0)
  8.  
  9. (message
  10.     "The installation procedure has changed significantly for version 2.1 of "
  11.     "MagicUserInterface. Instead of spreading the MUI related files all "
  12.     "over your system, one single MUI directory will be created at some place "
  13.     "of your choice. This directory will hold all necessary programs and "
  14.     "libraries for a complete MUI installation. Depending on the available "
  15.     "space on your harddisk, you may decide to install additional "
  16.     "demonstration programs, documentation material and images."
  17. )
  18.  
  19. ;***** Old File Deletion
  20. (complete 5)
  21.  
  22. (if (<> (exists "sys:classes/mui") 0)
  23. (
  24.     (if (askbool (help @askbool-help) (prompt "Some old MUI stuff is in your libs: drawer. Do you want to delete it now?"))
  25.     (
  26.         (if (<> (exists "sys:libs/muimaster.library") 0)
  27.         (
  28.             (delete
  29.                 ("sys:libs/muimaster.library")
  30.                 (prompt "Deleting old muimaster.library...")
  31.                 (help @deletefile-help)
  32.             )
  33.         )
  34.         )
  35.  
  36.         (foreach "sys:Classes/MUI" "#?.mui"
  37.             (delete
  38.                 (tackon "sys:Classes/MUI" @each-name)
  39.                 (help @deletefile-help)
  40.             )
  41.         )
  42.  
  43.         (if (<> (exists "sys:Classes/Images") 0)
  44.         (
  45.             (foreach "sys:Classes/Images" "mui#?.image"
  46.                 (delete
  47.                     (tackon "sys:Classes/Images" @each-name)
  48.                     (help @deletefile-help)
  49.                 )
  50.             )
  51.         )
  52.         )
  53.  
  54.         (delete
  55.             ("sys:Classes/MUI")
  56.             (help @deletefile-help)
  57.         )
  58.     )
  59.     )
  60. )
  61. )
  62.  
  63. (if (<> (exists "sys:prefs/mui") 0)
  64. (
  65.     (if (askbool (help @askbool-help) (prompt "The old preferences program is obsolete. Do you want to delete it now?"))
  66.     (
  67.         (delete
  68.             ("sys:Prefs/MUI")
  69.             (help @deletefile-help)
  70.         )
  71.         (delete
  72.             ("sys:Prefs/MUI.info")
  73.             (help @deletefile-help)
  74.         )
  75.     )
  76.     )
  77. )
  78. )
  79.  
  80. (if (<> (exists "sys:prefs/MUI-Images") 0)
  81. (
  82.     (if (askbool (help @askbool-help) (prompt "The images in sys:prefs/MUI-Images have moved. Do you want to delete it now? CAUTION: If you have added some extra images here, be sure to copy them somewhere else before proceeding!"))
  83.     (
  84.         (run "delete sys:Prefs/MUI-images#? all >nil:")
  85.     )
  86.     )
  87.  
  88.     (if (askbool (help @askbool-help) (prompt "Due to the new directory structure, your old preferences settings are no longer valid and must be deleted. This will not affect window positions and application private settings. Please don't worry, instead take a look at the prefs program's preset menu when reconfiguring MUI. Do you want to delete the old settings now?"))
  89.     (
  90.         (run "delete envarc:mui/#?.prefs >nil:")
  91.         (run "delete envarc:mui/MUIPREFS.cfg >nil:")
  92.     )
  93.     )
  94. )
  95. )
  96.  
  97. (if (<> (exists "locale:catalogs/Deutsch/MUI.catalog" (noreq)) 0)
  98. (
  99.     (if (askbool (help @askbool-help) (prompt "The old catalog file is obsolete. Do you want to delete it now?"))
  100.     (
  101.         (delete
  102.             ("locale:catalogs/Deutsch/MUI.catalog")
  103.             (help @deletefile-help)
  104.         )
  105.     )
  106.     )
  107. )
  108. )
  109.  
  110.  
  111.  
  112. ;***** Destination Directory Selection & Creation
  113. (complete 10)
  114.  
  115. (set destination
  116.     (askdir
  117.         (prompt "Please select a place for \"MagicUserInterface\". A drawer called \"MUI\" will be created here. The minimum space required is about 500 kB, a complete installation takes 2.5 MB.")
  118.         (help @askdir-help)
  119.         (default @default-dest)
  120.     )
  121. )
  122.  
  123. (set destination (tackon destination "MUI"))
  124.  
  125. (if (= (exists destination) 2)
  126. (message
  127.     "The selected directory does already exist. By selecting \"Proceed\", "
  128.     "you indicate that you want to update the MUI installation with the "
  129.     "most recent version. Several MUI specific files will be overwritten!"
  130. )
  131. )
  132.  
  133. (makedir destination
  134.     (help @makedir-help)
  135.     (infos)
  136. )
  137. (run (cat "copy " "/MUI.info \"" destination ".info\""))
  138.  
  139. ;***** ReadMe Files
  140. (complete 15)
  141.  
  142. (copyfiles
  143.     (prompt "Installing ReadMe files...")
  144.     (source "")
  145.     (pattern "(LiesMich|ReadMe)")
  146.     (dest destination)
  147.     (infos)
  148.     (help @copyfiles-help)
  149. )
  150.  
  151. ;***** Prefs Program
  152. (complete 20)
  153.  
  154. (copylib
  155.     (prompt "Installing Preferences Program...")
  156.     (source "MUI")
  157.     (dest destination)
  158.     (infos)
  159.     (help @copylib-help)
  160. )
  161.  
  162. ;***** Registration Program
  163. ;(complete 25)
  164. ;
  165. ;(copylib
  166. ;    (prompt "Installing Registration Program...")
  167. ;    (source "Docs/Registration")
  168. ;    (dest destination)
  169. ;    (infos)
  170. ;    (help @copylib-help)
  171. ;)
  172.  
  173. ;***** Master Library
  174. (complete 30)
  175.  
  176. (copylib
  177.     (prompt "Installing muimaster.library...")
  178.     (source "Libs/muimaster.library")
  179.     (dest (tackon destination "Libs"))
  180.     (help @copylib-help)
  181. )
  182. (run (cat "copy " "Libs.info \"" destination "\""))
  183.  
  184. ;***** External Classes
  185. (complete 35)
  186.  
  187. (foreach "Libs/MUI" "#?.(mui|mcc|mcp)"
  188.     (copylib
  189.         (prompt "Installing external classes...")
  190.         (source (tackon "Libs/MUI" @each-name))
  191.         (dest (tackon destination "Libs/MUI"))
  192.         (help @copylib-help)
  193.     )
  194. )
  195.  
  196.  
  197. ;***** Docs Drawer
  198. (complete 40)
  199.  
  200. (copyfiles
  201.     (prompt "Creating Docs Drawer...")
  202.     (source "Docs")
  203.     (dest (tackon destination "Docs"))
  204.     (choices "Registration" "Changes" "ImageDesign" "Preview")
  205.     (infos)
  206.     (help @copyfiles-help)
  207. )
  208. (run (cat "copy " "Docs.info \"" destination "\""))
  209.  
  210.  
  211. ;***** Icons Drawer
  212. (complete 45)
  213.  
  214. (copyfiles
  215.     (prompt "Creating Icons Drawer...")
  216.     (source "Icons")
  217.     (dest (tackon destination "Icons"))
  218.     (all)
  219.     (infos)
  220.     (help @copyfiles-help)
  221. )
  222. (run (cat "copy " "Icons.info \"" destination "\""))
  223.  
  224.  
  225. ;***** Choose Additional Stuff
  226. (complete 50)
  227.  
  228. (set choice
  229.     (askoptions
  230.         (prompt "Please choose which of the following parts to install. They are not absolutely required, but if you have enough space left, you shoud install them anyway.")
  231.         (choices "Additional Images" "English Documentation" "German Documentation" "Language Catalogs" "Example ARexx Scripts" "Demonstration Programs" "Developer Material")
  232.         (help @askoptions-help)
  233.     )
  234. )
  235.  
  236. (if (<> 0 (BITAND choice 2))
  237. (
  238.     (set echoice
  239.         (askoptions
  240.             (prompt "There are two formats available for the english documentation.")
  241.             (choices "AmigaGuide Format (required for online help)" "TeX DVI Format (for printed manuals)")
  242.             (help @askoptions-help)
  243.         )
  244.     )
  245. )
  246. )
  247.  
  248. (if (<> 0 (BITAND choice 4))
  249. (
  250.     (set gchoice
  251.         (askoptions
  252.             (prompt "There are two formats available for the german documentation.")
  253.             (choices "AmigaGuide Format (required for online help)" "TeX DVI Format (for printed manuals)")
  254.             (help @askoptions-help)
  255.         )
  256.     )
  257. )
  258. )
  259.  
  260.  
  261. ;***** Images
  262. (complete 55)
  263.  
  264. (if (<> 0 (BITAND choice 1))
  265. (
  266.     (copyfiles
  267.         (prompt "Installing additional ILBM images...")
  268.         (source "Images")
  269.         (dest (tackon destination "Images"))
  270.         (infos)
  271.         (all)
  272.         (help @copyfiles-help)
  273.     )
  274.     (run (cat "copy " "Images.info \"" destination "\""))
  275.     (foreach "Libs/Images" "#?"
  276.         (copylib
  277.             (prompt "Installing additional BOOPSI images...")
  278.             (source (tackon "Libs/Images" @each-name))
  279.             (dest (tackon destination "Libs/Images"))
  280.             (help @copylib-help)
  281.         )
  282.     )
  283. )
  284. )
  285.  
  286.  
  287. ;***** English Docs
  288. (complete 60)
  289.  
  290. (if (<> 0 (BITAND choice 2))
  291. (
  292.     (run (cat "copy " "Docs/English.info \"" (tackon destination "Docs") "\""))
  293.  
  294.     (if (<> 0 (BITAND echoice 1))
  295.     (
  296.         (copyfiles
  297.             (prompt "Installing english AmigaGuide manual...")
  298.             (source "Docs/English/MUI.guide")
  299.             (dest (tackon destination "Docs/English"))
  300.             (infos)
  301.             (help @copyfiles-help)
  302.         )
  303.     )
  304.     )
  305.  
  306.     (if (<> 0 (BITAND echoice 2))
  307.     (
  308.         (if (<> (exists "Docs/English/MUI.dvi") 0)
  309.         (
  310.             (copyfiles
  311.                 (prompt "Installing english DVI manual...")
  312.                 (source "Docs/English/MUI.dvi")
  313.                 (dest (tackon destination "Docs/English"))
  314.                 (infos)
  315.                 (help @copyfiles-help)
  316.             )
  317.         )
  318.         (
  319.             (message "Due to space limitations, the english DVI manual is not present on the disk distribution.")
  320.         )
  321.         )
  322.     )
  323.     )
  324.  
  325. ;    (if (<> 0 (BITAND echoice 4))
  326. ;    (
  327. ;        (copyfiles
  328. ;            (prompt "Installing english ASCII manual...")
  329. ;            (source "Docs/English/MUI.doc")
  330. ;            (dest (tackon destination "Docs/English"))
  331. ;            (infos)
  332. ;            (help @copyfiles-help)
  333. ;        )
  334. ;    )
  335. ;    )
  336. )
  337. )
  338.  
  339. ;***** German Docs
  340. (complete 65)
  341.  
  342. (if (<> 0 (BITAND choice 4))
  343. (
  344.     (run (cat "copy " "Docs/Deutsch.info \"" (tackon destination "Docs") "\""))
  345.  
  346.     (if (<> 0 (BITAND gchoice 1))
  347.     (
  348.         (copyfiles
  349.             (prompt "Installing german AmigaGuide manual...")
  350.             (source "Docs/Deutsch/MUI.guide")
  351.             (dest (tackon destination "Docs/Deutsch"))
  352.             (infos)
  353.             (help @copyfiles-help)
  354.         )
  355.     )
  356.     )
  357.  
  358.     (if (<> 0 (BITAND gchoice 2))
  359.     (
  360.         (if (<> (exists "Docs/Deutsch/MUI.dvi") 0)
  361.         (
  362.             (copyfiles
  363.                 (prompt "Installing german DVI manual...")
  364.                 (source "Docs/Deutsch/MUI.dvi")
  365.                 (dest (tackon destination "Docs/Deutsch"))
  366.                 (infos)
  367.                 (help @copyfiles-help)
  368.             )
  369.         )
  370.         (
  371.             (message "Due to space limitations, the german DVI manual is not present on the disk distribution.")
  372.         )
  373.         )
  374.     )
  375.     )
  376.  
  377. ;    (if (<> 0 (BITAND gchoice 4))
  378. ;    (
  379. ;        (copyfiles
  380. ;            (prompt "Installing german ASCII manual...")
  381. ;            (source "Docs/Deutsch/MUI.doc")
  382. ;            (dest (tackon destination "Docs/Deutsch"))
  383. ;            (infos)
  384. ;            (help @copyfiles-help)
  385. ;        )
  386. ;    )
  387. ;    )
  388. )
  389. )
  390.  
  391. ;***** Catalogs
  392. (complete 70)
  393.  
  394. (if (<> 0 (BITAND choice 8))
  395. (
  396.     (copyfiles
  397.         (prompt "Installing catalogs...")
  398.         (source "Locale")
  399.         (dest (tackon destination "Locale"))
  400.         (all)
  401.         (infos)
  402.         (help @copyfiles-help)
  403.     )
  404.     (run (cat "copy " "Locale.info \"" destination "\""))
  405. )
  406. )
  407.  
  408. ;***** Rexx Scripts
  409. (complete 75)
  410.  
  411. (if (<> 0 (BITAND choice 16))
  412. (
  413.     (copyfiles
  414.         (prompt "Installing example ARexx scripts...")
  415.         (source "Rexx")
  416.         (dest (tackon destination "Rexx"))
  417.         (infos)
  418.         (all)
  419.         (help @copyfiles-help)
  420.     )
  421.     (run (cat "copy " "Rexx.info \"" destination "\""))
  422. )
  423. )
  424.  
  425. ;***** Demo Programs
  426. (complete 80)
  427.  
  428. (if (<> 0 (BITAND choice 32))
  429. (
  430.     (copyfiles
  431.         (prompt "Installing demonstration programs...")
  432.         (source "Demos")
  433.         (dest (tackon destination "Demos"))
  434.         (infos)
  435.         (all)
  436.         (help @copyfiles-help)
  437.     )
  438.     (run (cat "copy " "Demos.info \"" destination "\""))
  439. )
  440. )
  441.  
  442. ;***** Developer Stuff
  443. (complete 85)
  444.  
  445. (if (<> 0 (BITAND choice 64))
  446. (
  447.     (if (<> (exists "Developer") 0)
  448.     (
  449.         (copyfiles
  450.             (prompt "Installing developer material...")
  451.             (source "Developer")
  452.             (dest (tackon destination "Developer"))
  453.             (infos)
  454.             (all)
  455.             (help @copyfiles-help)
  456.         )
  457.     (run (cat "copy " "Developer.info \"" destination "\""))
  458.     )
  459.     (
  460.         (message "The developer files are not present and cannot be installed. You have to get the 'muiXXdev.lha' archive and unpack it first.")
  461.     )
  462.     )
  463. )
  464. )
  465.  
  466.  
  467. ;***** Startup-Sequence
  468. (complete 95)
  469.  
  470. (startup "MUI"
  471.     (prompt "Some required commands will be added to your \"s:user-startup\" file.")
  472.     (help @startup-help)
  473.     (command "assign MUI: \"" destination "\"\n")
  474.     (command "if exists MUI:Libs\n")
  475.     (command "   assign add LIBS: MUI:Libs\n")
  476.     (command "endif\n")
  477.     (command "version >nil: exec.library 38\n")
  478.     (command "if not warn\n")
  479.     (command "   if exists MUI:Locale\n")
  480.     (command "      assign add LOCALE: MUI:Locale\n")
  481.     (command "   endif\n")
  482.     (command "endif\n")
  483.     (command "version >nil: exec.library 39\n")
  484.     (command "   if exists MUI:Docs\n")
  485.     (command "      if exists HELP:dummy\n")
  486.     (command "      endif\n")
  487.     (command "      assign add HELP: MUI:Docs\n")
  488.     (command "   endif\n")
  489.     (command "endif")
  490. )
  491.  
  492.  
  493. ;***** Finished
  494. (complete 100)
  495.  
  496. (exit "Please reboot your computer before trying to start any MUI programs.")
  497.