home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D1.DMS / in.adf / Install-Oberon_English < prev    next >
Encoding:
Text File  |  1994-08-05  |  15.8 KB  |  746 lines

  1. ; Oberon Installations Skript für Version 3.11
  2. ;
  3. ; © 1994 by Thomas Wagner [tom]
  4. ;
  5. ; $VER: Install_Oberon_3_11 1.0 (17.1.94)
  6. ; Permission granted to include to the Amiga Oberon Distribution.
  7. ;
  8. ; KEINE HAFTUNG
  9. ;
  10. ; Die Tabulatorlänge sollte auf 4 gesetzt werden, um diesen Text zu lesen/editieren
  11.  
  12.  
  13. (set verstring "3.20")
  14.  
  15. (set #start
  16.         (cat "© 1994 by Thomas Wagner [tom]\n"
  17.                  "*********************************\n\n"
  18.                  "This Script installs\n\nAmiga Oberon Compiler " verstring "\n\n"
  19.                  "or updates an older installation.\n"
  20.         )
  21. )
  22.  
  23. (set #copy-arp-lib "\nInstalling arp.library")
  24. (set #copy-gc-lib  "\nInstalling garbagecollector.library")
  25. (set #copy-os-lib  "\nInstalling oberonsupport.library")
  26.  
  27. (set #destination "In which drawer should Oberon be installed?\n")
  28.  
  29. ;(set #lower-version "Warning: A newer version seams to be already installed!")
  30. ;(set #same-version "Warning: This version seams to be alreayd installed!")
  31.  
  32. (set #insert-disk "\n\nPlease insert \"%s\" in any drive.")
  33.  
  34. (set #disk-1 ("Oberon%s_Disk1" verstring))
  35. (set #disk-2 ("Oberon%s_Disk2" verstring))
  36. (set #disk-3 ("Oberon%s_Disk3" verstring))
  37. (set #disk-4 ("Oberon%s_Disk4" verstring))
  38.  
  39. (set #select-files 
  40.         (cat "Please select which of the following files and drawers"
  41.              "should be copied to which destination."
  42.         )
  43. )
  44.  
  45. (set #select-dir "Where do you want the contents of the drawer \"%s\" to be copied to?")
  46.  
  47. (set #select-overwrite
  48.     (cat "Please select those of the following files and drawers that "
  49.          "should be copied. Existing files will be overwritten!"
  50.     )
  51. )
  52.  
  53. (set #select-texts
  54.     (cat "Please chose which textfiles you want to have installed and "
  55.          "to which drawer they should be copied"
  56.     )
  57. )
  58. (set #german-menu "\n\nDo you want German menus for OEd?")
  59.  
  60. (set #install-interfaces
  61.     (cat "\n\nDo you want to install the source of the Oberon Interface modules?\n\n"
  62.     )
  63. )
  64.  
  65. (set #install-locale
  66.     (cat "\n\nDo you want to install the catalog file\n to your LOCALE: drawer?\n\n"
  67.     )
  68. )
  69.  
  70. (set #want-demos "\n\nDo you want to install the Oberon-Demos?")
  71. (set #want-demos2 "\n\nDo you want to install the Oberon-Examples?")
  72. (set #want-support 
  73.     (cat "\n\nTo control Oberon with different editors (AmokEd, CED, TurboText), there exist "
  74.          "special scripts. Do you want them to be installed?"
  75.     )
  76. )
  77.  
  78. (set #startup "I will extend the User-Startup by the following lines:\n\n")
  79.  
  80. (set #ust-mod "Which lines should be added to the User-Startup?")
  81.  
  82. (set #good-bye
  83.     (cat "Have fun programming in Oberon!\nThe commands added to the User-Startup "
  84.          "have already been executed. You can just start to use Oberon..."
  85.     )
  86. )
  87.  
  88. (set #good-bye-without-obj
  89.     (cat "Have fun programming in Oberon!\nThe commands added to the User-Startup "
  90.          "have already been executed. \n\nHowever, no Interface modules have been "
  91.          "installed and no object- and symbolfiles have been created (as you "
  92.          "wanted). Please do this now..."
  93.     )
  94. )
  95.  
  96. (set #really-good-bye?
  97.     (cat "\n\nI want to inform you that you have not created symbol- and "
  98.          "objektfiles. If nothing works now, ..."
  99.     )
  100. )
  101.  
  102. (set #select-comp
  103.     (cat "Now the symbol- and objectfiles have to be created. "
  104.          "Please chose, which objectfiles you want me to create."
  105.     )
  106. )
  107.  
  108. (set #ask-info "Should I reinstall your old .info-Files?")
  109.  
  110. (set #compilation 
  111.     (cat "I'm compiling now with the parameters selected by you.\n\n"
  112.          "Please be patient. This part can take a while...\n\n"
  113.          "I'm currently creating *.obj%s-files."
  114.     )
  115. )
  116. (set #compilation-liblink
  117.     (cat "I'm compiling the modules used by LibLink now.\n\n"
  118.          "Please be a little patient..."
  119.     )
  120. )
  121.  
  122. (set #where-are-interfaces "Where are the interface modules?")
  123. (set #where-are-modules "Where are the modules?")
  124. (set #where-are-syms
  125.     (cat "Which drawer has both the \"sym\" and the \"obj\" sub-drawers or"
  126.          "in which drawer should these drawers be created, respectively?"
  127.     )
  128. )
  129.  
  130. (set #where-ist-list "Where is the list with the compilation order?")
  131.  
  132. (set #german 1)
  133. ;-----------------------------------------------------------
  134.  
  135. (user 2)
  136.  
  137. (message #start)
  138.  
  139. (user 0)
  140.  
  141. (if (exists "Oberon:" (noreq))
  142.     (
  143.         (set @default-dest "OBERON:")
  144.         (set oberonassign 1)
  145.     )
  146.     (
  147.         (set @default-dest (tackon @default-dest "Oberon"))
  148.         (set oberonassign 0)
  149.     )
  150. )
  151.  
  152. (welcome)
  153.  
  154. (set interfaces-dir "")
  155. (set modules-dir "")
  156. (set locale-dir "LOCALE:")
  157.  
  158. ;++++++++++++
  159. ;   Disk 1
  160. ;++++++++++++
  161.  
  162. (set default-dest
  163.     (askdir
  164.         (prompt #destination)
  165.         (help @askdir-help)
  166.         (default @default-dest)
  167.         (newpath)
  168.     )
  169. )
  170.  
  171. (set @default-dest default-dest)
  172.  
  173. (if (exists (tackon @default-dest "oberon.info"))
  174.     (copyfiles
  175.         (prompt "")
  176.         (source @default-dest)
  177.         (dest "T:icons")
  178.         (pattern "#?.info")
  179.     )
  180. )
  181.  
  182. (askdisk
  183.     (prompt (#insert-disk #disk-1))
  184.     (help @askdisk-help)
  185.     (dest #disk-1)
  186.     (newname "d1")
  187. )
  188.  
  189. (copylib 
  190.     (prompt #copy-arp-lib)
  191.     (help @copylib-help)
  192.     (source "d1:libs/arp.library")
  193.     (dest "LIBS:")
  194.     (confirm)
  195.     (optional nofail)
  196. )
  197.  
  198. (copylib 
  199.     (prompt #copy-os-lib)
  200.     (help @copylib-help)
  201.     (source "d1:libs/oberonsupport.library")
  202.     (dest "LIBS:")
  203.     (confirm)
  204. )
  205.  
  206. (copylib 
  207.     (prompt #copy-gc-lib)
  208.     (help @copylib-help)
  209.     (source "d1:libs/garbagecollector.library")
  210.     (dest "LIBS:")
  211.     (confirm)
  212. )
  213.  
  214. ;----------------------------------------
  215. ; get dir to copy to
  216.  
  217.  
  218. (copyfiles
  219.     (prompt "")
  220.     (help @copyfiles-help)
  221.     (source "d1:")
  222.     (infos)
  223.     (dest @default-dest)
  224.     (pattern "(Oberon|OLink|OErr|Path.info|Fehler-Meldungen|Compile_All)")
  225. )
  226.  
  227. (copyfiles
  228.     (prompt #select-texts)
  229.     (help @copyfiles-help)
  230.     (source "d1:")
  231.     (infos)
  232.     (dest (tackon @default-dest "Texte"))
  233.     (pattern "(LiesMich_Deutsch|ReadMe_English|ModulaToOberon|Oberon-Bericht_Deutsch|Oberon-Report_English|Oberon2.txt)")
  234.     (confirm)
  235. )
  236.  
  237. (copyfiles
  238.     (prompt #select-overwrite)
  239.     (help @copyfiles-help)
  240.     (source "d1:")
  241.     (infos)
  242.     (dest @default-dest)
  243.     (pattern "(Icons)")
  244.     (confirm)
  245. )
  246.  
  247. (if (NOT (exists (tackon @default-dest "Path")))
  248.     (textfile
  249.         (prompt "")
  250.         (help @textfile-help)
  251.         (dest (tackon @default-dest "Path"))
  252.         (append "OBERON:\nOBERON:LibLink\n")
  253.     )
  254. )
  255.  
  256.  
  257. (set want-locale
  258.     (askbool
  259.         (prompt #install-locale)
  260.         (help @askbool-help)
  261.         (default 1)
  262.     )
  263. )
  264.  
  265. (if want-locale
  266.     (copyfiles
  267.         (prompt "")
  268.         (source "d1:locale")
  269.         (infos)
  270.         (all)
  271.         (dest locale-dir)
  272.     )
  273. )
  274.  
  275. (makeassign "d1" (safe))
  276.  
  277. ;--------------------------------------------------------
  278. ; common parts
  279.  
  280. ;++++++++++++
  281. ;   Disk 2
  282. ;++++++++++++
  283.  
  284. (askdisk
  285.     (prompt (#insert-disk #disk-2))
  286.     (help @askdisk-help)
  287.     (dest #disk-2)
  288.     (newname "d2")
  289. )
  290.  
  291. (copyfiles
  292.     (prompt #select-files)
  293.     (help @copyfiles-help)
  294.     (source "d2:")
  295.     (infos)
  296.     (confirm)
  297.     (dest @default-dest)
  298.     (pattern "(OMake|ResidentManager|ResidentModules.info|ModToDef|GCStat)")
  299. )
  300.  
  301. (copyfiles
  302.     (prompt #select-files)
  303.     (help @copyfiles-help)
  304.     (source "d2:")
  305.     (choices "GarbagePrefs")
  306.     (infos)
  307.     (confirm)
  308.     (dest "sys:Prefs")
  309. )
  310.  
  311. (if (NOT (exists (tackon @default-dest "ResidentModules")))
  312.     (textfile
  313.         (prompt "")
  314.         (help @textfile-help)
  315.         (dest (tackon @default-dest "ResidentModules"))
  316.         (append "all\n")
  317.     )
  318. )
  319.  
  320. (copyfiles
  321.     (prompt "")
  322.     (help @copyfiles-help)
  323.     (source "d2:")
  324.     (choices "LibLink")
  325.     (infos)
  326.     (dest @default-dest)
  327. )
  328.  
  329. (set modules-dir
  330.     (askdir
  331.         (prompt (#select-dir "Module"))
  332.         (help @askdir-help)
  333.         (default (tackon @default-dest "Module"))
  334.         (newpath)
  335.     )
  336. )
  337. (copyfiles
  338.     (prompt "")
  339.     (help @copyfiles-help)
  340.     (source "d2:Module")
  341.     (all)
  342.     (infos)
  343.     (dest modules-dir)
  344. )
  345.  
  346. (if (askbool
  347.         (prompt #want-demos)
  348.         (help @askbool-help)
  349.         (default 1)
  350.     )
  351.     (copyfiles
  352.         (prompt "")
  353.         (source "d2:Demos")
  354.         (all)
  355.         (infos)
  356.         (dest
  357.             (askdir
  358.                 (prompt (#select-dir "Demos"))
  359.                 (help @askdir-help)
  360.                 (default (tackon @default-dest "Demos"))
  361.                 (newpath)
  362.             )
  363.         )
  364.     )
  365. )
  366.  
  367. (if (askbool
  368.         (prompt #want-support)
  369.         (help @askbool-help)
  370.         (default 1)
  371.     )
  372.     (copyfiles
  373.         (prompt "")
  374.         (source "d2:ObSup_Scripts")
  375.         (all)
  376.         (infos)
  377.         (dest
  378.             (askdir
  379.                 (prompt (#select-dir "ObSup_Scripts"))
  380.                 (help @askdir-help)
  381.                 (default (tackon @default-dest "ObSup_Scripts"))
  382.                 (newpath)
  383.             )
  384.         )
  385.     )
  386. )
  387.  
  388. (makeassign "d2" (safe))
  389.  
  390. ;++++++++++++
  391. ;   Disk 3
  392. ;++++++++++++
  393.  
  394. (set want-interfaces
  395.     (askbool
  396.         (prompt #install-interfaces)
  397.         (help @askbool-help)
  398.         (default 1)
  399.     )
  400. )
  401.  
  402. (if want-interfaces
  403.     (set interfaces-dir
  404.         (askdir
  405.             (prompt (#select-dir "Interfaces"))
  406.             (help @askdir-help)
  407.             (default (tackon @default-dest "Interfaces"))
  408.             (newpath)
  409.         )
  410.     )
  411. )
  412.  
  413. (if want-interfaces
  414.     (
  415.         (askdisk
  416.             (prompt (#insert-disk #disk-3))
  417.             (help @askdisk-help)
  418.             (dest #disk-3)
  419.             (newname "d3")
  420.         )
  421.         (copyfiles
  422.             (prompt "")
  423.             (source "d3:Interfaces")
  424.             (infos)
  425.             (all)
  426.             (dest interfaces-dir)
  427.         )
  428.     )
  429. )
  430.  
  431.  
  432. (makeassign "d3" (safe))
  433.  
  434.  
  435. ;++++++++++++
  436. ;   Disk 4
  437. ;++++++++++++
  438.  
  439.  
  440. (askdisk
  441.     (prompt (#insert-disk #disk-4))
  442.     (help @askdisk-help)
  443.     (dest #disk-4)
  444.     (newname "d4")
  445. )
  446.  
  447. (copyfiles
  448.     (prompt #select-texts)
  449.     (help @copyfiles-help)
  450.     (source "d4:")
  451.     (infos)
  452.     (dest @default-dest)
  453.     (pattern "(OEd|Rexx|OEd#?.txt)")
  454.     (confirm)
  455. )
  456.  
  457. (if want-interfaces
  458.     (copyfiles
  459.         (prompt "")
  460.         (source "d4:Interfaces")
  461.         (all)
  462.         (dest interfaces-dir)
  463.     )
  464. )
  465.  
  466. (if (askbool
  467.         (prompt #german-menu)
  468.         (help @askbool-help)
  469.         (default #german)
  470.     )
  471.     (copyfiles
  472.         (prompt "")
  473.         (source "d4:OEd_Menu.txt.d")
  474.         (newname "OEd_Menu.txt")
  475.         (infos)
  476.         (dest @default-dest)
  477.     )
  478. )
  479.  
  480. (if (askbool
  481.         (prompt #want-demos2)
  482.         (help @askbool-help)
  483.         (default 1)
  484.     )
  485.     (copyfiles
  486.         (prompt "")
  487.         (source "d4:Beispiele")
  488.         (all)
  489.         (infos)
  490.         (dest
  491.             (askdir
  492.                 (prompt (#select-dir "Beispiele"))
  493.                 (help @askdir-help)
  494.                 (default (tackon @default-dest "Beispiele"))
  495.                 (newpath)
  496.             )
  497.         )
  498.     )
  499. )
  500.  
  501. (makeassign "d4" (safe))
  502.  
  503. ;-----------------------------------
  504.  
  505. (if (exists "T:icons/oberon.info")
  506.     (if (askbool
  507.             (prompt #ask-info)
  508.             (help @askbool-help)
  509.         )
  510.         (copyfiles
  511.             (prompt "")
  512.             (source "t:icons")
  513.             (dest @default-dest)
  514.             (all)
  515.         )
  516.     )
  517. )
  518.  
  519. (run "delete t:icons all" (safe))
  520.  
  521. (set ust
  522.     (askoptions
  523.         (prompt #ust-mod)
  524.         (help @askoptions-help)
  525.         (choices ("assign OBERON: %s" (expandpath @default-dest))
  526.                  "resident OBERON:Oberon"
  527.                  "resident OBERON:OLink"
  528.                  "resident OBERON:OEd"
  529.                  "resident OBERON:OEd_NOGC"
  530.                  "path OBERON: add"
  531.                  "OBERON:residentmanager"
  532.         )
  533.         (default 33)
  534.     )
  535. )
  536.  
  537. (set ust-string "")
  538.  
  539. (debug @default-dest)
  540.  
  541. (if (IN ust 0)
  542.     (
  543.         (set ust-string (cat ust-string ("assign OBERON: %s\n" (expandpath @default-dest))))
  544.         (makeassign "OBERON" @default-dest)
  545.     )
  546. )
  547.  
  548. (if (IN ust 1)
  549.     (
  550.         (set ust-string (cat ust-string "resident OBERON:Oberon\n"))
  551.         (run "resident OBERON:Oberon")
  552.     )
  553. )
  554.  
  555. (if (IN ust 2)
  556.     (
  557.         (set ust-string (cat ust-string "resident OBERON:OLink\n"))
  558.         (run "resident OBERON:OLink")
  559.     )
  560. )
  561.  
  562. (if (IN ust 3)
  563.     (
  564.         (set ust-string (cat ust-string "resident OBERON:OEd\n"))
  565.         (run "resident OBERON:OEd")
  566.     )
  567. )
  568.  
  569. (if (IN ust 4)
  570.     (
  571.         (set ust-string (cat ust-string "path OBERON: add\n"))
  572.         (run "path OBERON: add")
  573.     )
  574. )
  575.  
  576. (if (IN ust 5)
  577.     (
  578.         (set ust-string (cat ust-string "OBERON:residentmanager\n"))
  579.         (run "OBERON:residentmanager")
  580.     )
  581. )
  582.  
  583. (if (> ust 0)
  584.     (startup "Amiga Oberon"
  585.         (prompt (cat #startup ust-string))
  586.         (help @startup-help)
  587.         (command ust-string)
  588.     )
  589. )
  590.  
  591. ;--------------------------------------------------------
  592. ; compile modules and interfaces
  593.  
  594. (debug modules-dir)
  595.  
  596. (makeassign "om" modules-dir (safe))
  597.  
  598. (set obfull (tackon @default-dest "Oberon"))
  599.  
  600. (working #compilation-liblink)
  601. (textfile
  602.     (prompt "")
  603.     (help @textfile-help)
  604.     (dest "T:OBINST")
  605.     (append (cat "cd " (tackon @default-dest "LibLink/Obj") "\n"))
  606.     (append (cat obfull " -m SET LibLink   OM:OberonLib\n"))
  607.     (append (cat obfull " -dm SET LibLink  OM:OberonLib\n"))
  608.     (append (cat obfull " -ma SET LibLink  OM:OberonLib\n"))
  609.     (append (cat obfull " -dma SET LibLink OM:OberonLib\n"))
  610.     (append "DELETE LibOberonLib.obj*\n")
  611.     (append "RENAME OberonLib.obj LibOberonLib.obj\n")
  612.     (append "RENAME OberonLib.objs LibOberonLib.objs\n")
  613.     (append "RENAME OberonLib.obja LibOberonLib.obja\n")
  614.     (append "RENAME OberonLib.objsa LibOberonLib.objsa\n")
  615. )
  616. (execute "T:OBINST")
  617. (run "delete T:OBINST" (safe))
  618.  
  619. (if (NOT want-interfaces)
  620.     (
  621.         (makeassign "om" (safe))
  622.         (exit #good-bye-without-obj)
  623.     )
  624. )
  625.  
  626. (set comp
  627.     (askoptions
  628.         (prompt #select-comp)
  629.         (help @askoptions-help)
  630.         (choices " <    > (*.obj)"
  631.                  " <-md > (*.objs)"
  632.                  " <-a  > (*.obja)"
  633.                  " <-mda> (*.objsa)"
  634.         )
  635.         (default 15)
  636.     )
  637. )
  638.  
  639. (if (= comp 0)
  640.     (exit (cat #good-bye #really-good-bye?))
  641. )
  642.  
  643. (if (= interfaces-dir "")
  644.     (set interfaces-dir
  645.         (askdir
  646.             (prompt #where-are-interfaces)
  647.             (help @askdir-help)
  648.             (default (tackon @default-dest "Interfaces"))
  649.         )
  650.     )
  651. )
  652.  
  653. (set sym-dir
  654.     (askdir
  655.         (prompt #where-are-syms)
  656.         (help @askdir-help)
  657.         (default @default-dest)
  658.     )
  659. )
  660.  
  661. (set list
  662.     (askfile
  663.         (prompt #where-is-list)
  664.         (help @askdir-help)
  665.         (default (tackon @default-dest "Compile_All"))
  666.     )
  667. )
  668.  
  669. (if (NOT (exists (tackon sym-dir "sym")))
  670.     (makedir (tackon sym-dir "sym") (infos))
  671. )
  672.  
  673. (if (NOT (exists (tackon sym-dir "obj")))
  674.     (makedir (tackon sym-dir "obj") (infos))
  675. )
  676.  
  677. (makeassign "oa" interfaces-dir (safe))
  678.  
  679. (set intro (cat "cd " sym-dir "\nstack 30000\n"))
  680.  
  681. (if (IN comp 0)
  682.     (
  683.         (working (#compilation ""))
  684.         (textfile
  685.             (prompt "")
  686.             (help @textfile-help)
  687.             (dest "T:OBINST")
  688.             (append intro)
  689.             (append (cat obfull " >CON: <" list "\n"))
  690.         )
  691.         (execute "T:OBINST")
  692.         (run "delete T:OBINST")
  693.     )
  694. )
  695.  
  696. (if (IN comp 1)
  697.     (
  698.         (working (#compilation "s"))
  699.         (textfile
  700.             (prompt "")
  701.             (help @textfile-help)
  702.             (dest "T:OBINST")
  703.             (append intro)
  704.             (append (cat obfull " -md >CON: <" list "\n"))
  705.         )
  706.         (execute "T:OBINST")
  707.         (run "delete T:OBINST")
  708.     )
  709. )
  710.  
  711. (if (IN comp 2)
  712.     (
  713.         (working (#compilation "a"))
  714.         (textfile
  715.             (prompt "")
  716.             (help @textfile-help)
  717.             (dest "T:OBINST")
  718.             (append intro)
  719.             (append (cat obfull " -a >CON: <" list "\n"))
  720.         )
  721.         (execute "T:OBINST")
  722.         (run "delete T:OBINST")
  723.     )
  724. )
  725.  
  726. (if (IN comp 3)
  727.     (
  728.         (working (#compilation "sa"))
  729.         (textfile
  730.             (prompt "")
  731.             (help @textfile-help)
  732.             (dest "T:OBINST")
  733.             (append intro)
  734.             (append (cat obfull " -mda >CON: <" list "\n"))
  735.         )
  736.         (execute "T:OBINST")
  737.         (run "delete T:OBINST")
  738.     )
  739. )
  740.  
  741. (makeassign "om" (safe))
  742. (makeassign "oa" (safe))
  743.  
  744. (exit #good-bye)
  745.  
  746.