home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / m / magicuserinterfacev3.5.dms / magicuserinterfacev3.5.adf / Install-MUI < prev    next >
Text File  |  1996-08-10  |  27KB  |  981 lines

  1. ; $VER: Install-MUI 3.5 (13.07.96)
  2.  
  3. (set current_version "3.5")
  4. (set current_libver  16)
  5. (set lng @language)
  6. (set #tmpdir "t:mui.inst")
  7.  
  8. (complete 0)
  9.  
  10.  
  11.  
  12. ;=============================================================================
  13. ; Locale strings
  14.  
  15. (set #intro_0 (cat "\n\Magic User Interface " current_version "\n========================\n© 1992-96, Stefan Stuntz"))
  16.  
  17.  
  18. ;=============================================================================
  19. ; german
  20.  
  21. (if (= lng "deutsch")
  22. (
  23.  
  24. (set #intro_1      "Willkommen zum MUI Installationsprogramm. Hiermit können Sie MUI neu auf Ihrem System installieren oder eine bereits vorhandene, ältere Version von MUI ersetzen.")
  25. (set #intro_2      "Neue MUI Versionen sind immer abwärtskompatibel, alle MUI-Programme funktionieren weiter und profitieren automatisch von Verbesserungen im MUI-System.")
  26.  
  27. (set #obso_1       "\nWARNUNG\n=======\n\nDie auf Ihrer Festplatte installierte Datei\n\n")
  28. (set #obso_2       "\n\nist überflüssig und kann die Funktionsfähigkeit von MUI beeinträchtigen. Soll diese Datei nun gelöscht werden (dringend empfohlen)?")
  29. (set #obso_yes     "Ja, löschen!")
  30. (set #obso_no      "Nein, nicht löschen!")
  31. (set #obso_nodel1  "\nDie Funktionsfähigkeit von MUI kann durch das Vorhandensein der nicht gelöschten aber überflüssigen Datei\n\n")
  32. (set #obso_nodel2  "\n\nbeeinträchtigt werden. Falls MUI nach der Installation nicht funktioniert, löschen Sie die Datei bitte von Hand.")
  33. (set #obso_help    "\nAlle zu MUI gehörenden Dateien werden innerhalb eines einzigen Verzeichnises namens 'MUI' installiert. Wenn sich MUI-Dateien in Ihrem System außerhalb dieses Verzeichnises befinden (etwa weil diese von früheren Installationen übrig geblieben sind), kann das die Funktionsfähigkeit von MUI beeinträchtigen. \n\nEs wird deshalb dringend empfohlen, solche Dateien wie vom Installationsprogramm vorgeschlagen zu löschen.")
  34.  
  35. (set #oldmui_1     "ist auf Ihrem System bereits im Verzeichnis\n\n")
  36. (set #oldmui_2_1   "\n\nvorhanden. Sie können diese Installation updaten (empfohlen) oder ein neues Verzeichnis auswählen.")
  37. (set #oldmui_2_2   "\n\nvorhanden. Dieses Paket ist bereits aktueller als die Dateien die Sie gerade installieren möchen. Sie können die Installation nun abbrechen (empfohlen) oder das Verzeichnis wechseln.")
  38. (set #oldmui_yes_1 "Update")
  39. (set #oldmui_yes_2 "Abbrechen")
  40. (set #oldmui_no    "Verzeichnis wechseln")
  41.  
  42. (set #destdir      "Bitte wählen Sie einen Platz für MUI. Ein Verzeichnis namens 'MUI' wird dort automatisch erzeugt. Der minimale Platzbedarf beträgt 500 kB, eine Komplett-Installation benötigt etwa 2.5 MB.")
  43. (set #destexists_1 "\nIm gewählten Zielverzeichnis\n\n")
  44. (set #destexists_2 "\n\nexistiert bereits eine MUI-Schublade. Wenn Sie fortfahren, wird die dort befindliche MUI-Installation aktualisiert.")
  45.  
  46. (set #guideask     "\nBitte wählen Sie die Sprache(n) für die AmigaGuide Dokumentation aus. Diese wird unter anderem für die Online-Hilfe im Voreinsteller und Screen Manager benötigt.")
  47. (set #dviask       "\nBitte wählen Sie die Sprache(n) für die DVI Dokumentation aus. DVI Dokumentationen werden hauptsächlich zum Ausdrucken benötigt.")
  48. (set #imgask       "\nWählen Sie die zusätzlichen Image-Pakete aus, die Sie installieren möchten.")
  49.  
  50. (set #nainfo1      "Mit")
  51. (set #nainfo2      "(n/a)")
  52. (set #nainfo3      "markierte Elemente sind aus Platzmangel im aktuellen Installations-Archiv nicht verfügbar.")
  53.  
  54. (set #copying      "\nKopiere ")
  55. (set #copydoc2     "Dokumentation")
  56. (set #copydoc3     "ist im aktuellen Installations-Archiv nicht verfügbar, sie wurden aus Platzmangel weggelassen. MUI benötigt diese Dateien nicht zur korrekten Funktion.")
  57.  
  58. (set #finished_0   "MUI wurde erfolgreich installiert im Verzeichnis")
  59. (set #finished_1   "Bitte starten Sie nun Ihren Rechner neu, um MUI ins System einzubinden.")
  60.  
  61. (set #demosdrawer  "\nMUI-Beispielprogramme demonstrieren einige der Möglichkeiten, mit denen man Benutzeroberflächen gestalten kann. Eine Installation ist für die korrekte Funktion von MUI jedoch nicht erforderlich. Wollen Sie die MUI-Beispielprogramme (ca. 250 kB) jetzt installieren?")
  62.  
  63. (set #yes          "Ja")
  64. (set #no           "Nein")
  65.  
  66. (set #extracting   "Entpacke Dateien aus komprimierter Distribution...")
  67.  
  68. )
  69.  
  70.  
  71. ;=============================================================================
  72. ; english
  73.  
  74. (
  75.  
  76. (set #intro_1      "Welcome to the MUI installation program. Use this tool to install MUI on your system or to update a previously installed MUI release.")
  77. (set #intro_2      "All new versions of MUI are backwards compatible, all MUI programs will continue to work and automatically benefit from new features.")
  78.  
  79. (set #obso_1       "\nWARNING\n=======\n\nThe file\n\n")
  80. (set #obso_2       "\n\non your harddisk is unneccessary and may cause MUI to malfunction. Shall this file be deleted (recommended)?")
  81. (set #obso_yes     "Yes, delete")
  82. (set #obso_no      "No, don't delete")
  83. (set #obso_nodel1  "\nThe presence of the file\n\n")
  84. (set #obso_nodel2  "\n\nmay cause MUI to malfunction after the installation. If you encounter problems, please delete the file.")
  85. (set #obso_help    "\nAll MUI files belong to a single directory called 'MUI'. If there are any MUI files outside this directory (e.g. because they were left over from a previous installation), MUI might not work as expected.\n\nIt is strongly recommended to delete those files, like suggested by the installation program.")
  86.  
  87. (set #oldmui_1     "is already installed in the drawer\n\n")
  88. (set #oldmui_2_1   "\n\nYou can update this installation (recommended) or select a new drawer.")
  89. (set #oldmui_2_2   "\n\nThis package is more recent than the files you're about to install. You can abort this installation (recommended) or select a new drawer.")
  90. (set #oldmui_yes_1 "Update")
  91. (set #oldmui_yes_2 "Abort")
  92. (set #oldmui_no    "Change drawer")
  93.  
  94. (set #destdir      "Please select a place for the MUI package. A drawer called 'MUI' will be created here. The minimum space required is about 500 kB, a complete installation takes 2.5 MB.")
  95. (set #destexists_1 "\nThe directory\n\n")
  96. (set #destexists_2 "\n\nalready contains a MUI drawer. If you continue, the MUI installation in this drawer is updated.")
  97.  
  98. (set #guideask     "Select the language(s) of AmigaGuide documentations you wish to install. You must choose at least one language if you want to use online help with the MUI preferences programs.")
  99. (set #dviask       "Select the language(s) of DVI documentations you wish to install. DVI docs are mainly useful for printing.")
  100. (set #imgask       "Select the image set(s) you wish to install.")
  101.  
  102. (set #nainfo1      "Items marked as")
  103. (set #nainfo2      "(n/a)")
  104. (set #nainfo3      "are not available in the current distribution archive due to space considerations.")
  105.  
  106. (set #copying      "\nCopying ")
  107. (set #copydoc2     "documenation")
  108. (set #copydoc3     "is not present in the current installation archive. It has probably been left out due to space considerations. However, MUI will run fine without those files.")
  109.  
  110. (set #finished_0   "MUI was successfully installed in the drawer")
  111. (set #finished_1   "Please reboot your machine before starting any MUI applications.")
  112.  
  113. (set #demosdrawer  "\nMUI example programs demonstrate some of the posssibilities that MUI offers for creation of user interfaces. They are not required for a working MUI installation. Do you want to install the example programs (about 250 kB) now?")
  114.  
  115. (set #yes          "Yes")
  116. (set #no           "No" )
  117.  
  118. (set #extracting   "Extracting files from compressed distribution...")
  119.  
  120. ))
  121.  
  122.  
  123.  
  124. ;=============================================================================
  125. ; procedure COPYDOC
  126. ;
  127. ; cd_language - language
  128. ; cd_name     - "MUI.guide" or "MUI.dvi"
  129. ; cd_srcdir    - Docs dir
  130.  
  131. (procedure COPYDOC
  132. (
  133.     (set cdsrc (tackon (tackon cd_srcdir cd_language) cd_name))
  134.     (set cddst (tackon (tackon destination "Docs") cd_language))
  135.  
  136.     (if (<> (exists cdsrc (noreq)) 0)
  137.     (
  138.         (run (cat "copy " (tackon cd_srcdir cd_language) ".info " "\"" cddst ".info" "\"" ))
  139.  
  140.         (copyfiles
  141.             (prompt #copying cd_language " " cd_name " " #copydoc2 "...")
  142.             (source cdsrc)
  143.             (dest cddst)
  144.             (infos)
  145.             (help @copyfiles-help)
  146.             (confirm "expert")
  147.         )
  148.     )
  149.     (
  150.         (message cd_name " (" cd_language ") " #copydoc3)
  151.     ))
  152. ))
  153.  
  154.  
  155.  
  156. ;=============================================================================
  157. ; procedure COPYIMAGEDIR
  158. ;
  159. ; ci_dir - image dir name
  160.  
  161. (procedure COPYIMAGEDIR
  162. (
  163.     (set cdsrc ci_dir)
  164.     (set cddst (tackon (tackon destination "Images") (fileonly ci_dir)))
  165.  
  166.     (if (exists cdsrc (noreq))
  167.     (
  168.         (copyfiles
  169.             (prompt #copying ci_dir "...")
  170.             (source cdsrc)
  171.             (dest cddst)
  172.             (all)
  173.             (help @copyfiles-help)
  174.             (confirm "expert")
  175.         )
  176.     )
  177.     (
  178.         (message ci_dir " " #copydoc3)
  179.     )
  180.     )
  181. )
  182. )
  183.  
  184.  
  185.  
  186. ;=============================================================================
  187. ; procedure CHECKOBSO
  188. ;
  189. ; co_name - name of obsolete file/dir
  190.  
  191. (procedure CHECKOBSO
  192. (
  193.     (if (exists co_name (noreq))
  194.     (
  195.         (if (askbool (prompt #obso_1 co_name #obso_2) (choices #obso_yes #obso_no) (default 1) (help #obso_help))
  196.         (
  197.             (run (cat "delete all force quiet " co_name))
  198.         )
  199.         (
  200.             (message (cat #obso_nodel1 co_name #obso_nodel2))
  201.         )
  202.         )
  203.     )
  204.     )
  205. )
  206. )
  207.  
  208.  
  209.  
  210. ;=============================================================================
  211. ; procedure COPYDRAWER
  212. ;
  213. ; cd_name - name of drawer
  214. ; cd_ask - prompt
  215. ; cd_opts - additional options
  216.  
  217. (procedure COPYDRAWER
  218. (
  219.     (set #sdir (P_PREPARE cd_name))
  220.  
  221.     (if (exists (tackon #sdir cd_name) (noreq))
  222.     (
  223.         (set doit 1)
  224.  
  225.         (if (> (strlen cd_ask) 0)
  226.         (
  227.             (if (askbool (prompt cd_ask) (choices #yes #no) (default 1) (help @askbool-help))
  228.             (
  229.                 (set doit 1)
  230.             )
  231.             (
  232.                 (set doit 0)
  233.             )
  234.             )
  235.         )
  236.         )
  237.  
  238.         (if (= doit 1)
  239.         (
  240.             (P_COPYFILE 0 (cat (tackon #sdir cd_name) ".info") destination)
  241.             ;(run (cat "copy " cd_name ".info \"" destination "\"" ))
  242.  
  243.             (copyfiles
  244.                 (prompt #copying cd_name " drawer...")
  245.                 (source (tackon #sdir cd_name))
  246.                 (dest (tackon destination cd_name))
  247.                 (all)
  248.                 (infos)
  249.                 (help @copyfiles-help)
  250.                 (confirm "expert")
  251.                 (optional cd_opts)
  252.             )
  253.         )
  254.         )
  255.     )
  256.     )
  257.  
  258.     (P_CLEANTMP)
  259. )
  260. )
  261.  
  262.  
  263.  
  264. (procedure P_COPYDIR #lib #sourcedir #destdir
  265. (
  266.     (transcript #lib " " #sourcedir " " #destdir " " #wix)
  267.  
  268.     (if (exists #sourcedir)
  269.     (
  270.         (foreach #sourcedir "#?"
  271.         (
  272.             (if (< @each-type 0)
  273.                 (P_COPYFILE #lib (tackon #sourcedir @each-name) #destdir)
  274.             )
  275.         )
  276.         )
  277.     )
  278.     )
  279. )
  280. )
  281.  
  282.  
  283. (procedure P_COPYFILE #lib #srcname #dstdir
  284. (
  285.     (if #lib
  286.     (
  287.         (copylib
  288.             (prompt #copying #srcname "...")
  289.             (help @copylib-help)
  290.             (source #srcname)
  291.             (dest #dstdir)
  292.             (optional "force" "askuser")
  293.             (confirm "expert")
  294.             (infos)
  295.         )
  296.     )
  297.     (
  298.         ;(transcript "copy '" #srcname "'")
  299.  
  300.         (copyfiles
  301.             (prompt #copying #srcname "...")
  302.             (help @copyfiles-help)
  303.             (source #srcname)
  304.             (dest #dstdir)
  305.             (optional "force" "askuser")
  306.             (confirm "expert")
  307.             (infos)
  308.         )
  309.     )
  310.     )
  311. )
  312. )
  313.  
  314.  
  315. (procedure P_PREPARE #drw
  316. (
  317.     (if (exists (#drw))
  318.     (
  319.         (cat "")
  320.     )
  321.     (
  322.         (if (= #drw "MUI")
  323.         (
  324.             ; prepare root dir
  325.             (P_EXTRACT "MUI.Key MUI MUI.info PSI PSI.info \" \" \" .info\"")
  326.             (cat #tmpdir)
  327.         )
  328.         (
  329.             (P_EXTRACT (cat #drw "/* " #drw ".info"))
  330.             (cat #tmpdir)
  331.         )
  332.         )
  333.     )
  334.     )
  335. )
  336. )
  337.  
  338.  
  339. (procedure P_EXTRACT #pats
  340. (
  341.     (working #extracting)
  342.     (run (cat "t:unlzx -m x muipack.lzx " #pats " " #tmpdir "/"))
  343. )
  344. )
  345.  
  346.  
  347. (procedure P_CLEANTMP
  348. (
  349.     (if (exists #tmpdir)
  350.     (
  351.         (run (cat "delete \"" (tackon #tmpdir "#?") "\" all quiet"))
  352.     )
  353.     )
  354. )
  355. )
  356.  
  357.  
  358.  
  359. ;=============================================================================
  360. ; Say hello
  361.  
  362. ;(set @default-dest "Work:")
  363. (message #intro_0 "\n\n" #intro_1 "\n\n" #intro_2)
  364.  
  365. (if (exists "muipack.lzx")
  366. (
  367.     (run "copy unlzx t:")
  368.     (if (= (exists #tmpdir) 0) ( (makedir #tmpdir (help @makedir-help)) ))
  369. )
  370. )
  371.  
  372.  
  373.  
  374. ;=============================================================================
  375. ; Obsolete File Check
  376.  
  377. (complete 5)
  378.  
  379. (set co_name "sys:libs/muiwinborder.class"     ) (CHECKOBSO)
  380. (set co_name "sys:libs/muiscreen.library"      ) (CHECKOBSO)
  381. (set co_name "sys:libs/muirexx.library"        ) (CHECKOBSO)
  382. (set co_name "sys:libs/muipropg.class"         ) (CHECKOBSO)
  383. (set co_name "sys:libs/muimaster.library"      ) (CHECKOBSO)
  384. (set co_name "sys:libs/muilowlevel.library"    ) (CHECKOBSO)
  385. (set co_name "sys:libs/muilocale.library"      ) (CHECKOBSO)
  386. (set co_name "sys:libs/muihelp.library"        ) (CHECKOBSO)
  387. (set co_name "sys:libs/muigfx.library"         ) (CHECKOBSO)
  388. (set co_name "sys:libs/muiconfig.library"      ) (CHECKOBSO)
  389. (set co_name "sys:libs/muiwinscroller.class"   ) (CHECKOBSO)
  390. (set co_name "sys:libs/muipop.library"         ) (CHECKOBSO)
  391. (set co_name "sys:libs/muispecial.library"     ) (CHECKOBSO)
  392. (set co_name "sys:libs/mui"                    ) (CHECKOBSO)
  393.  
  394. (set co_name "sys:classes/muiwinborder.class"  ) (CHECKOBSO)
  395. (set co_name "sys:classes/muiscreen.library"   ) (CHECKOBSO)
  396. (set co_name "sys:classes/muirexx.library"     ) (CHECKOBSO)
  397. (set co_name "sys:classes/muipropg.class"      ) (CHECKOBSO)
  398. (set co_name "sys:classes/muimaster.library"   ) (CHECKOBSO)
  399. (set co_name "sys:classes/muilowlevel.library" ) (CHECKOBSO)
  400. (set co_name "sys:classes/muilocale.library"   ) (CHECKOBSO)
  401. (set co_name "sys:classes/muihelp.library"     ) (CHECKOBSO)
  402. (set co_name "sys:classes/muigfx.library"      ) (CHECKOBSO)
  403. (set co_name "sys:classes/muiconfig.library"   ) (CHECKOBSO)
  404. (set co_name "sys:classes/muiwinscroller.class") (CHECKOBSO)
  405. (set co_name "sys:classes/muipop.library"      ) (CHECKOBSO)
  406. (set co_name "sys:classes/muispecial.library"  ) (CHECKOBSO)
  407. (set co_name "sys:classes/mui"                 ) (CHECKOBSO)
  408.  
  409. (set co_name "sys:prefs/MUI"                   ) (CHECKOBSO)
  410. (set co_name "sys:prefs/MUI.info"              ) (CHECKOBSO)
  411. (set co_name "sys:prefs/PSI"                   ) (CHECKOBSO)
  412. (set co_name "sys:prefs/PSI.info"              ) (CHECKOBSO)
  413.  
  414.  
  415.  
  416. ;=============================================================================
  417. ; Select destination directory
  418.  
  419. (complete 10)
  420.  
  421. (set seldir 1)
  422.  
  423. (if (<> (exists "mui:" (noreq)) 0)
  424. (
  425.     (set @default-dest (expandpath "mui:/"))
  426.  
  427.     (set vernum 0)
  428.     (if (<> (exists "mui:prefs" (noreq)) 0) (set vernum (getversion "mui:prefs"))
  429.     (if (<> (exists "mui:psi"   (noreq)) 0) (set vernum (getversion "mui:psi"  ))
  430.     ))
  431.  
  432.     (set ver (/ vernum 65536))
  433.  
  434.     (if (= ver  0) (set verstr ""   )
  435.     (if (< ver  6) (set verstr "1.x")
  436.     (if (= ver  6) (set verstr "1.4")
  437.     (if (= ver  7) (set verstr "2.0")
  438.     (if (= ver  8) (set verstr "2.1")
  439.     (if (= ver  9) (set verstr "2.2")
  440.     (if (= ver 10) (set verstr "2.3")
  441.     (if (= ver 11) (set verstr "3.0")
  442.     (if (= ver 12) (set verstr "3.1")
  443.     (if (= ver 13) (set verstr "3.2")
  444.     (if (= ver 14) (set verstr "3.3")
  445.     (if (= ver 15) (set verstr "3.4")
  446.     (if (= ver 16) (set verstr "3.5")
  447.     (if (= ver 17) (set verstr "3.6")
  448.     (if (= ver 18) (set verstr "3.7")
  449.     (if (= ver 19) (set verstr "3.8")
  450.     (if (= ver 20) (set verstr "3.9")
  451.     (if (> ver 20) (set verstr ""   )
  452.     ))))))))))))))))))
  453.  
  454.     (if (= (strlen verstr) 3)
  455.         (set verstr (cat verstr " (library versions " ver ".x)"))
  456.         (set verstr "(unknown version)")
  457.     )
  458.  
  459.     (if (> ver current_libver)
  460.     (
  461.         (if (askbool (prompt "\nMUI " verstr " " #oldmui_1 @default-dest #oldmui_2_2) (choices #oldmui_yes_2 #oldmui_no) (help @askbool-help))
  462.         (
  463.             (exit (quiet))
  464.         )
  465.         )
  466.     )
  467.     (
  468.         (if (askbool (prompt "\nMUI " verstr " " #oldmui_1 @default-dest #oldmui_2_1) (choices #oldmui_yes_1 #oldmui_no) (help @askbool-help))
  469.         (
  470.             (set seldir 0)
  471.         )
  472.         )
  473.     )
  474.     )
  475. )
  476. )
  477.  
  478. (if (<> seldir 0)
  479. (
  480.     (set @default-dest
  481.         (askdir
  482.             (prompt #destdir)
  483.             (help @askdir-help)
  484.             (default @default-dest)
  485.         )
  486.     )
  487.  
  488.     (set @default-dest (expandpath @default-dest))
  489. )
  490. )
  491.  
  492. (set destination (tackon @default-dest "MUI"))
  493.  
  494. (if (<> seldir 0)
  495. (
  496.     (if (<> (exists destination) 0)
  497.     (
  498.         (message (cat #destexists_1 @default-dest #destexists_2))
  499.     )
  500.     )
  501. )
  502. )
  503.  
  504.  
  505.  
  506. ;=============================================================================
  507. ; Lets go, create destination directory, copy main files and libs
  508.  
  509. (complete 15)
  510.  
  511. ; create destination directory
  512. (if (= (exists destination) 0) ( (makedir destination (help @makedir-help)) ))
  513.  
  514. ;mui drawer icon
  515. ;(if (not (exists (cat destination ".info")))
  516. ;(
  517.     (if (exists "/MUI-IBrowse.info") (run (cat "copy /MUI-IBrowse.info \"" destination ".info\""))
  518.     (if (exists "/MUI.info"        ) (run (cat "copy /MUI.info         \"" destination ".info\""))
  519.     ))
  520.  
  521.     (tooltype (dest destination) (noposition))
  522. ;)
  523. ;)
  524.  
  525. (complete 20)
  526.  
  527.  
  528. (copyfiles
  529.     (prompt (cat #copying "readme files ..."))
  530.     (source "")
  531.     (pattern "(ReadMe|LiesMich| )")
  532.     (dest destination)
  533.     (infos)
  534.     (help @copyfiles-help)
  535.     (confirm "expert")
  536. )
  537.  
  538. (complete 21)
  539.  
  540. (set #sdir (P_PREPARE "MUI"))
  541.  
  542. (run (cat "copy ram:t/mui.inst/MUI.Key to S:"))
  543. (P_COPYFILE 1 (tackon #sdir "MUI") destination)
  544. (P_COPYFILE 1 (tackon #sdir "PSI") destination)
  545. (P_COPYFILE 1 (tackon #sdir " ") destination)
  546.  
  547. (P_CLEANTMP)
  548.  
  549. (complete 22)
  550.  
  551.  
  552.  
  553. ;=============================================================================
  554. ; Libs
  555.  
  556. (set #sdir (P_PREPARE "Libs"))
  557.  
  558. (P_COPYFILE 0 (tackon #sdir "Libs.info") destination)
  559. (P_COPYDIR  1 (tackon #sdir "Libs"    ) (tackon destination "Libs"    ))
  560. (P_COPYDIR  1 (tackon #sdir "Libs/MUI") (tackon destination "Libs/MUI"))
  561.  
  562. ;(run (cat "copy " (tackon #sdir "Libs.info") " \"" destination "\""))
  563. ;(set cv_dir (tackon #sdir "Libs"    )) (set cv_pat "#?.(library|class|lzx)") (COPYVER)
  564. ;(set cv_dir (tackon #sdir "Libs/MUI")) (set cv_pat "#?"                    ) (COPYVER)
  565.  
  566. (P_CLEANTMP)
  567.  
  568. (complete 30)
  569.  
  570.  
  571. ;=============================================================================
  572. ; Locale
  573.  
  574. (set #sdir (P_PREPARE "Locale"))
  575.  
  576. (P_COPYFILE 0 (tackon #sdir "Locale.info") destination)
  577. (if (= (exists (tackon destination "Locale"         )) 0) ( (makedir (tackon destination "Locale"         ) (help @makedir-help)) ))
  578. (if (= (exists (tackon destination "Locale/Catalogs")) 0) ( (makedir (tackon destination "Locale/Catalogs") (help @makedir-help)) ))
  579. (P_COPYDIR  1 (tackon #sdir "Locale/Catalogs/Deutsch") (tackon destination "Locale/Catalogs/Deutsch"))
  580.  
  581. ;(run (cat "copy " (tackon #sdir "Locale.info") " \"" destination "\"" ))
  582. ;(if (= (exists (tackon destination "Locale"         )) 0) ( (makedir (tackon destination "Locale"         ) (help @makedir-help)) ))
  583. ;(if (= (exists (tackon destination "Locale/Catalogs")) 0) ( (makedir (tackon destination "Locale/Catalogs") (help @makedir-help)) ))
  584. ;(set cv_dir (tackon #sdir "Locale/Catalogs/Deutsch")) (set cv_pat "#?.catalog") (COPYVER)
  585.  
  586. (P_CLEANTMP)
  587.  
  588. (complete 32)
  589.  
  590.  
  591. ;=============================================================================
  592. ; Images
  593.  
  594. (complete 34)
  595.  
  596. (set #sdir (P_PREPARE "Images"))
  597.  
  598. (set #idir (tackon #sdir "Images"))
  599. (if (<> (exists #idir (noreq)) 0)
  600. (
  601.     (set img_xen    "Martin 'MagicWB' Huttenloher") (if (= (exists (tackon #idir "XEN"   )) 0) (set img_xen    (cat img_xen    " " #nainfo2)))
  602.     (set img_goonie "Andreas 'Goonie' Schildbach" ) (if (= (exists (tackon #idir "Goonie")) 0) (set img_goonie (cat img_goonie " " #nainfo2)))
  603.     (set img_kt     "Christian 'Kochtopf' Scholz" ) (if (= (exists (tackon #idir "KT"    )) 0) (set img_kt     (cat img_kt     " " #nainfo2)))
  604.     (set img_kmel   "Klaus 'kmel' Melchior"       ) (if (= (exists (tackon #idir "kmel"  )) 0) (set img_kmel   (cat img_kmel   " " #nainfo2)))
  605.     (set img_wd     "Walter Dörwald"              ) (if (= (exists (tackon #idir "WD"    )) 0) (set img_wd     (cat img_wd     " " #nainfo2)))
  606.  
  607.     (set choice
  608.         (askoptions
  609.             (prompt #imgask " " #nainfo1 " " #nainfo2 " " #nainfo3)
  610.             (choices img_xen img_goonie img_kt img_wd img_kmel)
  611.             (help @askoptions-help)
  612.         )
  613.     )
  614.  
  615.     (complete 35)
  616.  
  617.     (makedir (tackon destination "Images"))
  618.     (P_COPYFILE 0 (tackon #sdir "Images.info") destination)
  619.  
  620.     (complete 39) (if (BITAND choice  1) ( (set ci_dir (tackon #idir "XEN"   )) (COPYIMAGEDIR) ))
  621.     (complete 41) (if (BITAND choice  2) ( (set ci_dir (tackon #idir "Goonie")) (COPYIMAGEDIR) ))
  622.     (complete 43) (if (BITAND choice  4) ( (set ci_dir (tackon #idir "KT"    )) (COPYIMAGEDIR) ))
  623.     (complete 45) (if (BITAND choice  8) ( (set ci_dir (tackon #idir "WD"    )) (COPYIMAGEDIR) ))
  624.     (complete 47) (if (BITAND choice 16) ( (set ci_dir (tackon #idir "kmel"  )) (COPYIMAGEDIR) ))
  625.     (complete 49)                          (set ci_dir (tackon #idir "Misc"  )) (COPYIMAGEDIR)
  626. )
  627. )
  628.  
  629. (P_CLEANTMP)
  630.  
  631.  
  632.  
  633. ;=============================================================================
  634. ; Docs Drawer
  635.  
  636. (complete 50)
  637.  
  638. (set #sdir (P_PREPARE "Docs"))
  639.  
  640. (set #ddir (tackon #sdir "Docs"))
  641. (if (exists #ddir)
  642. (
  643.     (P_COPYFILE 0 (tackon #sdir "Docs.info") destination)
  644.  
  645.     (if (exists (tackon destination "Docs/Preview"     )) (delete (tackon destination "Docs/Preview"     ) (infos)))
  646.     (if (exists (tackon destination "Docs/Deutsch"     )) (delete (tackon destination "Docs/Deutsch"     ) (all)  ))
  647.     (if (exists (tackon destination "Docs/English"     )) (delete (tackon destination "Docs/English"     ) (all)  ))
  648.     (if (exists (tackon destination "Docs/Deutsch.info")) (delete (tackon destination "Docs/Deutsch.info")        ))
  649.     (if (exists (tackon destination "Docs/English.info")) (delete (tackon destination "Docs/English.info")        ))
  650.  
  651.     (copyfiles
  652.         (prompt "Creating Docs Drawer...")
  653.         (source #ddir)
  654.         (dest (tackon destination "Docs"))
  655.         (pattern "~(#?.lzx|English#?|Deutsch#?)")
  656.         (infos)
  657.         (help @copyfiles-help)
  658.         (confirm "expert")
  659.     )
  660.  
  661.     ; !!!
  662.     (if (exists "Docs/misc.lzx")
  663.     (
  664.         (run (cat "t:unlzx -m e Docs/misc.lzx \"" (tackon destination "Docs") "/\""))
  665.     )
  666.     )
  667.  
  668.     (if (exists (tackon #ddir "English/MUI.guide"))
  669.     ((set guide_english "English") (if (= lng "english") ((set defchoice 1))) )
  670.     ((set guide_english (cat "English " #nainfo2))))
  671.  
  672.     (if (exists (tackon #ddir "Deutsch/MUI.guide"))
  673.     ((set guide_german "Deutsch") (if (= lng "deutsch") ((set defchoice 2))) )
  674.     ((set guide_german (cat "Deutsch " #nainfo2))))
  675.  
  676.     (if (exists (tackon #ddir "Français/MUI.guide"))
  677.     ((set guide_french "Français") (if (= lng "français") ((set defchoice 4))) )
  678.     ((set guide_french (cat "Français " #nainfo2))))
  679.  
  680.     (set choice
  681.         (askoptions
  682.             (prompt #guideask " " #nainfo1 " " #nainfo2 " " #nainfo3)
  683.             (choices guide_english guide_german guide_french)
  684.             (default defchoice)
  685.             (help @askoptions-help)
  686.         )
  687.     )
  688.  
  689.     (set cd_name "MUI.guide")
  690.     (complete 53) (if (BITAND choice 1) ( (set cd_language "English" ) (set cd_srcdir #ddir) (COPYDOC) ))
  691.     (complete 56) (if (BITAND choice 2) ( (set cd_language "Deutsch" ) (set cd_srcdir #ddir) (COPYDOC) ))
  692.     (complete 59) (if (BITAND choice 4) ( (set cd_language "Français") (set cd_srcdir #ddir) (COPYDOC) ))
  693.  
  694.     (complete 60)
  695.  
  696.     (delete unarced)
  697. )
  698. )
  699.  
  700. (P_CLEANTMP)
  701.  
  702.  
  703.  
  704. ;=============================================================================
  705. ; Other drawers
  706.  
  707. (complete 65) (set cd_name "Demos"   ) (set cd_ask #demosdrawer) (set cd_opts ""      ) (COPYDRAWER)
  708. (complete 70) (set cd_name "Icons"   ) (set cd_ask ""          ) (set cd_opts ""      ) (COPYDRAWER)
  709. (complete 75) (set cd_name "Presets" ) (set cd_ask ""          ) (set cd_opts ""      ) (COPYDRAWER)
  710. (complete 80) (set cd_name "Rexx"    ) (set cd_ask ""          ) (set cd_opts ""      ) (COPYDRAWER)
  711. (complete 85) (set cd_name "Goodies" ) (set cd_ask ""          ) (set cd_opts ""      ) (COPYDRAWER)
  712. (complete 90) (set cd_name "Patterns") (set cd_ask ""          ) (set cd_opts "nofail") (COPYDRAWER)
  713.  
  714.  
  715. (if (exists (tackon destination "Install")) (delete (tackon destination "Install") (all)))
  716.  
  717.  
  718. ;=============================================================================
  719. ; Startup Sequence
  720.  
  721. (complete 93)
  722.  
  723. (startup "MUI"
  724.     (prompt "Some commands will be added to your \"s:user-startup\" file.")
  725.     (help @startup-help)
  726.     (command "if exists \"" destination "\"\n")
  727.     (command "   assign MUI: \"" destination "\"\n")
  728.     (command "   if exists MUI:Libs\n")
  729.     (command "      assign add LIBS: MUI:Libs\n")
  730.     (command "   endif\n")
  731.     (command "   if exists MUI:Locale\n")
  732.     (command "      assign add LOCALE: MUI:Locale\n")
  733.     (command "   endif\n")
  734.     (command "   version >nil: exec.library 39\n")
  735.     (command "   if not warn\n")
  736.     (command "      if exists MUI:Docs\n")
  737.     (command "         if exists HELP:dummy ; do not remove\n")
  738.     (command "         endif                ; this entry!\n")
  739.     (command "         assign add HELP: MUI:Docs\n")
  740.     (command "      endif\n")
  741.     (command "   endif\n")
  742.     (command "endif")
  743. )
  744.  
  745.  
  746.  
  747. ;=============================================================================
  748. ; Finish
  749.  
  750. (complete 95)
  751.  
  752. (run (cat "assign mui: " "\"" destination "\""))
  753.  
  754. (complete 100)
  755.  
  756. (exit #intro_0 "\n\n" #finished_0 "\n\n" destination "\n\n" #finished_1 (quiet))
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828. ;(procedure P_COPY #lib #filename
  829. ;(
  830. ;    (if (exists #filename)
  831. ;    (
  832. ;        (set #srcname #filename)
  833. ;    )
  834. ;   (
  835. ;        (if (exists (tackon #tmpdir #filename) (noreq))
  836. ;        (
  837. ;            (set #srcname (tackon #tmpdir #filename))
  838. ;        )
  839. ;        (
  840. ;            (working "Extracting " #filename " from compressed distribution...")
  841. ;            (set #srcname (tackon "t:" (fileonly #filename)))
  842. ;            (run (cat "t:unlzx -m e muipack.lzx \"" #filename "\" \"" #filename ".info\" t:"))
  843. ;        )
  844. ;        )
  845. ;    )
  846. ;    )
  847. ;
  848. ;    (transcript "###" #srcname)
  849. ;
  850. ;    (if #lib
  851. ;    (
  852. ;        (copylib
  853. ;            (prompt "\nCopying " #filename "...")
  854. ;            (help @copylib-help)
  855. ;            (source #srcname)
  856. ;            (dest (tackon destination (pathonly #filename)))
  857. ;            (optional "force" "askuser")
  858. ;            (confirm "expert")
  859. ;            (infos)
  860. ;        )
  861. ;    )
  862. ;    (
  863. ;        (copyfiles
  864. ;            (prompt "\nCopying " #filename "...")
  865. ;            (help @copyfiles-help)
  866. ;            (source #srcname)
  867. ;            (dest (tackon destination (pathonly #filename)))
  868. ;            (confirm "expert")
  869. ;            (infos)
  870. ;        )
  871. ;    )
  872. ;    )
  873. ;)
  874. ;)
  875.  
  876.  
  877. ;=============================================================================
  878. ; COPYVER
  879. ;
  880. ; cv_dir - directory
  881. ; cv_pat - pattern
  882.  
  883. ;(procedure COPYVER
  884. ;(
  885. ;    (transcript "1: " cv_dir)
  886. ;
  887. ;    (if (exists cv_dir)
  888. ;    (
  889. ;        (transcript "2: " cv_dir " " cv_pat)
  890. ;
  891. ;        (foreach cv_dir cv_pat
  892. ;        (
  893. ;            (set src (tackon cv_dir @each-name))
  894. ;
  895. ;            (transcript "3: " src)
  896. ;
  897. ;            (if (patmatch "#?.lzx" @each-name)
  898. ;            (
  899. ;                (set unarced (tackon "t:" (substr @each-name 0 (- (strlen @each-name) 4))))
  900. ;                (run (cat "t:unlzx -m e \"" src "\" t:"))
  901. ;                (if (= (exists unarced (noreq)) 0) (exit "unarc error"))
  902. ;                (set src unarced)
  903. ;            )
  904. ;            )
  905. ;
  906. ;            (copylib
  907. ;                (prompt "\nCopying " @each-name "...")
  908. ;                (help @copylib-help)
  909. ;                (source src)
  910. ;                (dest (tackon destination cv_dir))
  911. ;                (optional "force" "askuser")
  912. ;                (confirm "expert")
  913. ;            )
  914. ;
  915. ;            (if (patmatch "#?.lzx" @each-name)
  916. ;            (
  917. ;                (delete unarced)
  918. ;            )
  919. ;            )
  920. ;        )
  921. ;        )
  922. ;    )
  923. ;    )
  924. ;)
  925. ;)
  926.  
  927.  
  928.  
  929. ;(set @envlng (getenv "Language"))
  930. ;
  931. ;(if (= @envlng "deutsch")
  932. ;(
  933. ;    (set @lng 1)
  934. ;)
  935. ;(
  936. ;    (set @lng 0)
  937. ;)
  938. ;)
  939. ;(set @lng
  940. ;    (askchoice
  941. ;        (prompt "Please select the desired language for the installation procedure.\n\nBitte wählen Sie die gewünschte Sprache für die Installationsprozedur.")
  942. ;        (choices "english" "deutsch")
  943. ;        (default @lng)
  944. ;        (help @askoptions-help)
  945. ;    )
  946. ;)
  947.  
  948.  
  949. ;(set cpu (database "cpu"))
  950. ;(set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  951. ;(set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  952. ;(if (< (/ (getversion "exec.library" (resident)) 65536) 37)
  953. ;    (abort "This program requires OS 2.04 or better.")
  954. ;)
  955. ;(welcome #welcome)
  956.  
  957.  
  958. ;(copylib
  959. ;    (prompt "\nCopying preferences program MUI...")
  960. ;    (source "MUI")
  961. ;    (dest destination)
  962. ;    (infos)
  963. ;    (help @copylib-help)
  964. ;    (confirm "expert")
  965. ;)
  966.  
  967. ;(copylib
  968. ;    (prompt "\nCopying screen inspector PSI...")
  969. ;    (source "PSI")
  970. ;    (dest destination)
  971. ;    (infos)
  972. ;    (help @copylib-help)
  973. ;    (confirm "expert")
  974. ;)
  975.  
  976.  
  977. ;(P_COPY 1 "MUI")
  978. ;(P_COPY 1 "PSI")
  979.  
  980.  
  981.