home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / d / directory_opus / directoryopusv5.5a.dms / directoryopusv5.5a.adf / InstallOpus < prev    next >
Text File  |  1996-08-27  |  35KB  |  1,393 lines

  1. ; Script to install Directory Opus version 5.5
  2. ;
  3. ; Directory Opus Install Version $VER: Install-Opus 5.5  (27.08.96)
  4. ; COPYRIGHT ©1996 GP SOFTWARE, AUSTRALIA
  5. ; note uses Opus<Alt-Shift>5
  6. ; now installs new catalogs if they are on the disk.
  7.  
  8.  
  9. (onerror
  10.     (makeassign "DOPUSDEST" (safe))    
  11. )
  12.  
  13. (complete 0)
  14.  
  15. ;
  16. ;check user has Dos 2
  17. ;
  18.  
  19. (set #DOSTYPE (/ (getversion) 65536))
  20. (if
  21.     (NOT (>= #DOSTYPE 37))
  22.     (abort "Directory Opus 5 requires AmigaDOS 2.04 or higher."
  23.         " If you have an earlier version of AmigaDOS you must purchase an upgrade before using Opus 5.")
  24. )
  25.  
  26.  
  27. (set @default-dest "work:")
  28.  
  29. (set #Dopus_prog "DOpus5:DirectoryOpus")
  30. (set #Loadwb "C:LoadWb")
  31. (set #Loadwb_old "C:LoadWb_old")
  32. (set #Has_loadwb_old 0)
  33. (set #Has_loaddb 0)
  34. (set #Inst_choice 0)
  35. (set #Changed 0)
  36. (set #Inst_core 0)
  37.  
  38. (set #DName1 "Opus55_Install")
  39. (set #DName2 "Opus55_Extras")
  40. (set #Disk1_Name (cat #DName1 ":"))
  41. (set #Disk2_Name (cat #DName2 ":"))
  42. (set #TLArchive    "MWB_DOpus8c.lha")
  43. (set #CatalogFiles "CatFiles.lha")
  44. (set #Is_update 0)
  45.  
  46. (set #DOpus_Dest (getassign "DOpus5" "a"))
  47. (set #O_DOpus_Dest (getassign "DOpus5" "a"))
  48. (set #Go "Proceed")
  49. (set #Skip "Skip this part")
  50.  
  51.  
  52.  
  53. ;
  54. ; Procedure signal
  55. ; inc ase Opus is re-installed. The notification on the modules
  56. ; directory can cause problems so signal Opus to turn off notifications
  57.  
  58. (procedure signal_opus
  59.  
  60.     (set #Want_disk 1)
  61.     (get_disk)
  62.     (set #Sigs (tackon #Disk1_Name "dopusmsg"))
  63.     (if (exists #Sigs (noreq))
  64.         (run (cat #Sigs " DOPUS.1 \"command set notify off\""))
  65.     )
  66. )
  67.  
  68.  
  69. ;
  70. ; Procedure get_lhex 
  71. ;
  72.  
  73.  
  74. (procedure get_lhex
  75.  
  76.     (if ( = (exists "ram:lhex" (noreq)) 0)
  77.         (
  78.         (set #Want_disk 1)
  79.         (get_disk)
  80.         (working #Title_msg
  81.             "Reading the Install disk for Directory Opus files.")
  82.         (copyfiles (source (tackon #Disk1_Name "lhex")) (dest "ram:"))
  83.         )
  84.     )
  85. )
  86.  
  87. ;
  88. ; Procedure get_disk 
  89. ; get the correct disk for a program
  90. ;
  91.  
  92. (procedure get_disk
  93.  
  94.     (if (= #Want_disk 1)
  95.         (set #DiskName #DName1)
  96.         (set #DiskName #DName2)
  97.     )
  98.     (askdisk
  99.         (prompt #Title_msg
  100.             "\nPlease insert the disk labeled \""#DiskName"\".")
  101.         (help "Insert this disk in a floppy drive to continue the installation.")
  102.         (assigns)
  103.         (dest #DiskName)
  104.     )
  105.     (set #Current_disk #Want_disk)
  106. )
  107.  
  108. ;
  109. ; Procedure install_arexx  ;
  110. ; From Leo Davidson collection.
  111. ;
  112.  
  113. (procedure install_arexx
  114.  
  115.     (set #Title_msg "Installation of ARexx Archive.\n\n")
  116.     (get_lhex)
  117.     (if     (askbool (prompt #Title_msg
  118.                 "We have also included an archive of ARexx scripts and other add-ons for Opus "
  119.                 "by various users. Most of the scripts will require some further "
  120.                 "installation after this script has been run.\n\n"
  121.                 "Do you wish to install the ARexx Archives?\n")
  122.             (help "Yes do it! It is great!")
  123.         )
  124.         (
  125.         (set #Changed 1)
  126.         (set #Want_disk 2)
  127.         (get_disk)
  128.         (if    (> (+ (database "total-mem")) 1000000)
  129.             (
  130.             (working #Title_msg
  131.                 "Copying Files.")
  132.             (copyfiles (source (tackon #Disk2_Name "ARexx.lha")) (dest "ram:"))
  133.             (set #SRC "ram:")
  134.             )
  135.             (set #SRC #Disk2_Name)
  136.         )
  137.         (working #Title_msg
  138.             "Dearchiving and installing the ARexx scripts.\n\n"
  139.             "More patience..\n"
  140.             "Won't take too long.")
  141.             
  142.         (run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"ARexx.lha"))
  143.         (delete "ram:ARexx.lha" (safe))
  144.         (run "c:protect DOPUSDEST:ARexx/#? +s")
  145.  
  146.         (message #Title_msg
  147.             "The ARexx scripts are now installed. Please read "
  148.             "the top of the scripts for further information on "
  149.             "what they do and how to use them.\n\n"
  150.             "The scripts are in \"DOpus5:Arexx\", some add-on modules are in "
  151.             "\"DOpus5:Storage/Modules\", and some of the add-ons have AmigaGuides "
  152.             "which are in \"DOpus5:Help\". There are also some new icons in "
  153.             "\"DOpus5:Icons\".\n"
  154.             "\nTo activate modules you must move them to \"DOpus5:Modules\" and "
  155.             "re-start Opus."
  156.         )
  157.         )
  158.     )
  159. )
  160.  
  161. ;
  162. ; Procedure install_mwbextras ;
  163. ; MWB_DOpus_8_Install 1.0 (11.8.96)
  164. ; Install originally written by Leo Davidson.
  165. ;
  166.  
  167. (procedure install_mwbextras
  168.  
  169.     (set #Title_msg "MWB_DOpus v8.0 Installation.\n\n")
  170.     (get_lhex)
  171.     ;- Introductory message 
  172.  
  173.     (if    (askbool (prompt #Title_msg
  174.                 "Developed by Trevor Morris and Leo Davidson\n\n"
  175.                 "MagicWorkbench toolbar icons and backdrops "
  176.                 "for Directory Opus 5.5 (and other programs).\n\n"
  177.                 "These provide a very nice set of images for"
  178.                 " toolbars and icons whether or not you use MagicWorkbench."
  179.                 "\n\nDo you wish to install these on your system?")
  180.             (help "Yes do it! It is great!")
  181.         )
  182.         (
  183.         (set #Changed 1)
  184.         (set #Want_disk 2)
  185.         (get_disk)
  186.         (if    (> (+ (database "total-mem")) 1000000)
  187.             (
  188.             (working #Title_msg
  189.                 "Copying Files.")
  190.             (copyfiles (source (tackon #Disk2_Name #TLArchive)) (dest "ram:"))
  191.             (set #SRC "ram:")
  192.             )
  193.             (set #SRC #Disk2_Name)
  194.         )
  195.         (working #Title_msg
  196.             "Dearchiving the MWB Archive.\n\n"
  197.             "Ever thought of taking up Chess?....\n\n"
  198.             "Ahh, wouldn't a \"Power\" Amiga be great!")
  199.         (run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "(tackon #SRC #TLArchive)))
  200.         (delete (tackon "ram:" #TLArchive) (safe))
  201.  
  202.         (run "cd ram:MWB8")
  203.  
  204.     ;- Set where to do the install to
  205.  
  206.         (set #Target "DOPUSDEST:")
  207.  
  208.     
  209.     ;- Back-up the old Images drawer (if exists) and copy new images
  210.  
  211.         (if (= (exists "DOPUSDEST:Images" (noreq)) 2) 
  212.             (
  213.             (set #Tmp_msg "\n\nYour old \"Images\" drawer can be backup before the new images are installed.")
  214.             (set images_exist 1)
  215.             )
  216.             (
  217.             (set #Tmp_msg " ")
  218.             (set images_exist 0)
  219.             )
  220.         )
  221.  
  222.         (if     (askbool (prompt #Title_msg
  223.                     "The new toolbar images will be copied"
  224.                     " to your \"Dopus5:Images\" drawer."
  225.                     #Tmp_msg)
  226.                 (choices #Go #Skip)
  227.                 (default 1)
  228.                 (help "This part installs all the toolbar images.")
  229.             )
  230.             ( ; yes 
  231.             (if images_exist
  232.                 (
  233.                 (set #Bkup 1)
  234.                 (set #New_name (cat "Images" #Bkup))
  235.                 (while     (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
  236.                     (
  237.                     (set #Bkup (+ #Bkup 1))
  238.                     (set #New_name (cat "Images" #Bkup))
  239.                     )
  240.                 )
  241.                 (if     (askbool (prompt #Title_msg
  242.                         "Do you wish to backup your current"
  243.                         " \"Images\" directory or overwrite it"
  244.                         " with the new images?\n\n"
  245.                         "Your old directory would be backed up as "#New_name".")
  246.                     (choices "Yes - Backup" "No - Overwrite")
  247.                     (default 1)
  248.                     (help "If in doubt select Yes.")
  249.                     )
  250.                     (; backup Images
  251.                     (rename (tackon #Target "Images") (tackon #Target #New_name))
  252.                     )
  253.                 )
  254.                 )
  255.             )
  256.  
  257.             (copyfiles
  258.                 (source "ram:MWB8/Images")
  259.                 (dest (tackon #Target "Images"))
  260.                 (all)
  261.                 (optional force)
  262.                 )
  263.             )
  264.         )
  265.  
  266.     ;- Copy the Colours guide
  267.     
  268.         (if    (askbool (prompt #Title_msg
  269.                     "We have provided some simple shortcuts which"
  270.                     " allow you to quickly set MagicWorkbench colours.\n\n"
  271.                     "Do you wish to install this \"Colours\" directory?")
  272.                 (default 1)
  273.                 (help "This part installs a MWB Colors directory.")
  274.             )
  275.             (copyfiles
  276.                 (source "ram:MWB8/Colors")
  277.                 (dest (tackon #Target "Colors"))
  278.                 (all)
  279.                 (infos)
  280.                 (optional force)
  281.             )
  282.         )
  283.             
  284.     ;- Copy the new icons (for programs, files, etc)
  285.     
  286.         (if    (askbool (prompt #Title_msg
  287.                     "The old DOpus5 file icons will be replaced by "
  288.                     "MagicWorkbench versions.\n\n"
  289.                     "Note: In case you have set some tooltypes in it, "
  290.                     "the main DirectoryOpus icon will be left alone. You "
  291.                     "should replace it manually as described in the help "
  292.                     "guide which is installed later.")
  293.                 (choices #Go #Skip)
  294.                 (default 1)
  295.                 (help "This part installs all the program and file icons.")
  296.             )
  297.             (copyfiles 
  298.                 (source "ram:MWB8/DOpus_Icons")
  299.                 (dest #Target)
  300.                 (all)
  301.                 (optional force)
  302.             )
  303.         )
  304.     
  305.     ;- Copy the Help guide
  306.     
  307.         (if    (askbool (prompt #Title_msg
  308.                     "An AmigaGuide about MWB_DOpus 8, including hints & tips "
  309.                     "will be copied to \"DOpus5:Help\".")
  310.                 (choices #Go #Skip)
  311.                 (default 1)
  312.                 (help "This part installs the help guide.")
  313.             )
  314.             (copyfiles
  315.                 (source "ram:MWB8/Help/MWB_DOpus8_Help.guide")
  316.                 (dest (tackon #Target "Help"))
  317.                 (infos)
  318.                 (optional force)
  319.             )
  320.         )
  321.     
  322.     ;- Copy the fonts 
  323.     
  324.         (if    (askbool (prompt #Title_msg
  325.                     "Some extra fonts will be copied to \"Fonts:\".\n"
  326.                     "They are not essential to use MWB_DOpus.\n\n"
  327.                     "These fonts are:\n"
  328.                     "\"P0T-NOoDLE\",\n"
  329.                     "\"P0T-Prop\",\n"
  330.                     "\"PolarSmall\", and,\n"
  331.                     "\"PolarSmall-Prop\".")
  332.                 (choices #Go #Skip)
  333.                 (default 1)
  334.                 (help "This part installs some extra fonts.")
  335.             )
  336.             (copyfiles
  337.                 (source "ram:MWB8/Fonts")
  338.                 (dest "Fonts:")
  339.                 (all)
  340.                 (optional force)
  341.             )
  342.         )
  343.     
  344.     ;- Copy the backdrops (ask where first) 
  345.     
  346.         (if    (askbool (prompt #Title_msg
  347.                     "Do you wish to install the backdrop pictures?\n")
  348.                 (default 1)
  349.                 (help "This part installs some backdrop pictures.")
  350.             )
  351.             (copyfiles
  352.                 (source "ram:MWB8/Backdrops")
  353.                 (dest (askdir (prompt "Select where to install the backdrops.")
  354.                      (help @askdir-help)
  355.                      (default "Sys:Prefs/Presets")
  356.                     )    
  357.                 )
  358.                 (all)
  359.                 (optional force)
  360.             )
  361.         )
  362.     
  363.     ;- Copy the Index files (ask where first) 
  364.     
  365.         (if    (askbool (prompt #Title_msg
  366.                     "Do you wish to install the index picture?\n\n"
  367.                     "This make it easy to find particular icons"
  368.                     " in the collection.\n\n"
  369.                     "The picture will be installed in \"Dopus5:Help\"")
  370.                 (default 1)
  371.                 (help "This part installs the index picture. Do it!")
  372.             )
  373.             (copyfiles
  374.                 (source "ram:MWB8/Index")
  375.                 (dest (tackon #Target "Help"))
  376.                 (infos)
  377.                 (all)
  378.                 (optional force)
  379.             )
  380.         )
  381.     
  382.     ;- Copy the Disk icons (ask where first)
  383.     
  384.         (if    (askbool (prompt #Title_msg
  385.                 "Do you wish to install some disk icons?\n"
  386.                 " You can use these to replace your existing"
  387.                 " disk icons with if you wish.\n\n"
  388.                 "You'll have to do the replacements yourself using "
  389.                 "IconEdit (comes with Workbench) or MUIReIcon "
  390.                 "(on Aminet).")
  391.             (default 1)
  392.             (help "This part installs some disk icons.\n"
  393.                 "Your existing icons will not be replaced.")
  394.             )
  395.             (copyfiles
  396.                 (source "ram:MWB8/Disk_Icons")
  397.                 (dest (askdir (prompt "Select where to install the disk "
  398.                          "icons:")
  399.                      (help @askdir-help)
  400.                      (default "sys:prefs/presets")
  401.                     )    
  402.                 )
  403.                 (all)
  404.                 (optional force)
  405.             )
  406.         )
  407.  
  408.  
  409.         (message #Title_msg
  410.             "Installation done!\n\n"
  411.             "Be sure to read the help guide in"
  412.             " \"DOpus5:Help\" for more info. This will also"
  413.             " explain how to set up MagicWorkbench colours etc.")
  414.  
  415.     ; tidy up
  416.  
  417.         (working #Title_msg
  418.             "Tidying up after MWB_DOpus v8.0 Installation")
  419.         (run "cd ram:")
  420.         (run "delete ram:MWB8#? all")
  421.         )
  422.     )
  423. )
  424.  
  425.  
  426. ;
  427. ; Procedure install_support  ;
  428. ; add the extra non-program bits
  429. ;
  430.  
  431. (procedure install_support
  432.  
  433.     (set #Title_msg "Directory Opus 5.5 Support Files.\n\n")
  434.     (get_lhex)
  435.         
  436.     (if    (<> #Inst_choice 0)
  437.         (if     (askbool (prompt #Title_msg
  438.                     "Do you wish to install the following support drawers and associated files for DOpus 5.5:-\n"
  439.                     "\nButtons, Environment, Groups\nIcons, Images, Settings\n Storage and WBStartup.\n\n"
  440.                     "These directories contain configuration details,\n"
  441.                     "and associated files required for the correct operation"
  442.                     " of Opus 5.5.")
  443.                 (help "Yes do it!")
  444.                 (default 1)
  445.             )
  446.             (set #Doit 1)
  447.             (set #Doit 0)
  448.         )
  449.         (; else tell 'em what we are doing.
  450.         (message #Title_msg
  451.             "This section installs the following support drawers and associated files for DOpus 5.5:-\n"
  452.             "\nButtons, Environment, Groups\nIcons, Images, Settings\n Storage, System and WBStartup.\n\n"
  453.             "These directories contain configuration details,\n"
  454.             "and associated files for the correct operation"
  455.             " of Opus 5.5.")
  456.         )
  457.     )
  458.  
  459.     (if    (OR (= #Inst_choice 0) (= #Doit 1))
  460.         (
  461.         (set #Changed 1)
  462.         (set #Want_disk 1)
  463.         (get_disk)
  464.  
  465.         (if    (> (+ (database "total-mem")) 1000000)
  466.             (
  467.             (working #Title_msg
  468.                 "Installing Support Files.")
  469.             (copyfiles (source (tackon #Disk1_Name "SupportA.lha")) (dest "ram:"))
  470.             (copyfiles (source (tackon #Disk1_Name "SupportB.lha")) (dest "ram:"))
  471.             (set #SRC "ram:")
  472.             )
  473.             (set #SRC #Disk1_Name)
  474.         )
  475.         (working #Title_msg
  476.             "Dearchiving and installing the main support components.\n\n"
  477.              "This won't take too long....")
  478.         (run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"SupportA.lha "))
  479.         (delete "ram:SupportA.lha" (safe))
  480.         (run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "#SRC"SupportB.lha "))
  481.         (delete "ram:SupportB.lha" (safe))
  482.  
  483.         (complete 70)
  484.         
  485.         (if #Is_update ;if update then give choice
  486.              (if    (askbool (prompt #Title_msg
  487.                     "Do you wish to overwrite your old configurations"
  488.                     " for Buttons, Toolbar, Menus, Environments and"
  489.                     " Settings with the new default set?\n\n"
  490.                     "You may choose the parts to install later but you may"
  491.                     " have to re-setup your configurations if you install"
  492.                     " these new parts. Alternatively you could dearchive"
  493.                     " the file SupportB.lha on the install disks later and"
  494.                     " install specific parts manually.")
  495.                     (help "This allows you to select certain parts of your"
  496.                         " old Opus directory to be updated or left unchanged. If unsure select YES.")
  497.                 )
  498.                 (
  499.                 (copyfiles 
  500.                     (prompt #Title_msg
  501.                         "Select which Buttons/Menus etc to install.")
  502.                     (source "ram:SupportB/Buttons")
  503.                     (dest (tackon #DOpus_Dest "Buttons"))
  504.                     (all)
  505.                     (confirm)
  506.                     (help "Select the files you wish to copy. If in doubt select all!")
  507.                 )
  508.                 (copyfiles 
  509.                     (prompt #Title_msg
  510.                     "Select which Environment files to install.")
  511.                     (source "ram:SupportB/Environment")
  512.                     (dest (tackon #DOpus_Dest "Environment"))
  513.                     (all)
  514.                     (confirm)
  515.                     (help "Select the files you wish to copy. If in doubt select all!")
  516.                 )
  517.                 (copyfiles 
  518.                     (prompt #Title_msg
  519.                     "Select which Settings files to install.")
  520.                     (source "ram:SupportB/Settings")
  521.                     (dest (tackon #DOpus_Dest "Settings"))
  522.                     (all)
  523.                     (confirm)
  524.                     (help "Select the files you wish to copy. If in doubt select all!")
  525.                 )
  526.                 )
  527.             )
  528.             (copyfiles ; if not update just copy to dest
  529.                 (source "ram:SupportB")
  530.                 (dest #DOpus_Dest)
  531.                 (all)
  532.             )    
  533.         )
  534.  
  535.         (run "delete ram:SupportB#? all") 
  536.         (complete 90)
  537.  
  538.         )
  539.     )
  540.  
  541. )
  542.  
  543. ;
  544. ; Procedure get_dir ;
  545. ; get place to install Opus
  546. ;
  547.  
  548. (procedure get_dir
  549.  
  550.     (if #DOpus_Dest ; if we have a valid destination?
  551.         (if    (askbool (prompt #Title_msg
  552.                     "Opus 5 has already been installed on this system\n"
  553.                     "in the drawer named \"" #DOpus_Dest"\"."
  554.                     "\n\nDo you want this version installed in that drawer?")
  555.                 (help "The installer has determined that you may already have a "
  556.                     "copy of Opus 5 installed on your system. If this is wrong or "
  557.                     "you want the update installed elsewhere, select NO as an "
  558.                     "answer. Otherwise, select YES.")
  559.                 (default 1)
  560.             )
  561.             (set #Is_update 1) ; if user wants in same place
  562.             (set #DOpus_Dest    ; if user wants in different place
  563.                 (tackon    (askdir
  564.                     (prompt "Directory Opus 5 will be installed in its own"
  565.                         " directory on your hard disk.\n"
  566.                         "Where should the Opus 5 directory be created?")
  567.                     (help @askdir-help)
  568.                     (default @default-dest)
  569.                     )
  570.                     "Opus5"
  571.                 )
  572.             )
  573.         )
  574.         (set #DOpus_Dest ; else if not an update, get a location for program
  575.             (tackon
  576.                 (askdir
  577.                     (prompt "Directory Opus 5 will be installed in its own"
  578.                         " directory on your hard disk.\n"
  579.                         "Where should the Opus 5 directory be created?")
  580.                     (help @askdir-help)
  581.                     (default @default-dest)
  582.                 )
  583.                 "Opus5"
  584.             )
  585.         )
  586.     )
  587.     
  588.     
  589.     ; make DOpus drawer & icon if not there
  590.     
  591.     (if     (NOT #Is_update)
  592.             (makedir #DOpus_Dest (infos))
  593.     )
  594.     
  595.     ; at this point we have a valid destination, so we tell installer where
  596.     ; the application will end up so the exit page will be correct -- also,
  597.     ; the installation log file (if any) will be copied to the destination
  598.         
  599.     (set @default-dest #DOpus_Dest)
  600.     (makeassign "DOPUSDEST" #DOpus_Dest (safe))
  601. )
  602.  
  603. ;
  604. ; Procedure backup_old  
  605. ; if an update to same place then backup bits
  606. ; Also handle Catalogs
  607. ; Non-English installations should modify this section
  608. ;
  609.  
  610. (procedure backup_old
  611.     
  612.     ; must have had an old 'Dopus5:' installed to get here so warn.
  613.  
  614.     (message #Title_msg
  615.         "********** WARNING *************\n\n"
  616.         "If you are currently running a previous version of"
  617.         " Directory Opus 5, your system may become unstable if"
  618.         " you use any Opus functions while installing this new"
  619.         " version.\n\n"
  620.         "We recommend that you either quit Opus 5 before"
  621.         " installing this new version, or REBOOT your computer"
  622.         " immediately after the installation is complete.")
  623.  
  624.     (if #Is_update 
  625.         (
  626.         (if    (askbool (prompt #Title_msg
  627.                     "You already have Directory Opus installed on your hard disk.\n\n"
  628.                     "Do you wish to BACKUP the user configurable files?.\n\n"
  629.                     "These include Buttons, Environment, FileTypes, Icons,"
  630.                     " Images, Settings, Storage, and System drawers.")
  631.                 (help "For safety you, select yes.")
  632.                 (default 1)
  633.             )
  634.             (
  635.             (set #Bkup 1)
  636.             (set #New_name (cat "OLD" #Bkup))
  637.             (while     (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
  638.                 (
  639.                 (set #Bkup (+ #Bkup 1))
  640.                 (set #New_name (cat "OLD" #Bkup))
  641.                 )
  642.             )
  643.             
  644.             (set #Whichfiles 
  645.                 (askoptions
  646.                     (prompt "Backing up old files to \""#New_name"\"\n"
  647.                         "Please select the Drawers to be saved:-")
  648.                     
  649.                     (choices
  650.                         "Buttons"    ;0
  651.                         "Environment"    ;1
  652.                         "FileTypes"    ;2
  653.                         "Icons"        ;3
  654.                         "Images"    ;4
  655.                         "Storage"    ;5
  656.                         "Settings"    ;6
  657.                     )
  658.                     (help "This allows you to select only certain parts of your"
  659.                         " old Opus drirectory to be saved. If unsure select all.")
  660.                     (default 127)
  661.                 )
  662.             )
  663.  
  664.             (working "Backing up old files to new directory \""#New_name"\"")
  665.             (set #New_name (tackon "DOPUSDEST:" #New_name))
  666.             (makedir #New_name)
  667.  
  668.             (if (AND (= (exists "DOPUSDEST:Buttons" (noreq)) 2) (IN #Whichfiles 0))
  669.                 (copyfiles 
  670.                 (source "DOPUSDEST:Buttons")
  671.                 (dest (tackon #New_name "Buttons"))
  672.                 (all)
  673.                 (optional force)
  674.                 )
  675.             )
  676.             (if (AND (= (exists "DOPUSDEST:Environment" (noreq)) 2) (IN #Whichfiles 1))
  677.                 (copyfiles
  678.                 (source "DOPUSDEST:Environment")
  679.                 (dest (tackon #New_name "Environment"))
  680.                 (all)
  681.                 (optional force)
  682.                 )
  683.             )
  684.             (if (AND (= (exists "DOPUSDEST:FileTypes" (noreq)) 2) (IN #Whichfiles 2))
  685.                 (copyfiles
  686.                 (source "DOPUSDEST:FileTypes")
  687.                 (dest (tackon #New_name "FileTypes"))
  688.                 (all)
  689.                 (optional force)
  690.                 )
  691.             )
  692.             (if (AND (= (exists "DOPUSDEST:Icons" (noreq)) 2) (IN #Whichfiles 3))
  693.                 (copyfiles
  694.                 (source "DOPUSDEST:Icons")
  695.                 (dest (tackon #New_name "Icons"))
  696.                 (all)
  697.                 (optional force)
  698.                 )
  699.             )
  700.             (if (AND (= (exists "DOPUSDEST:Images" (noreq)) 2)  (IN #Whichfiles 4))
  701.                 (copyfiles
  702.                 (source "DOPUSDEST:Images")
  703.                 (dest (tackon #New_name "Images"))
  704.                 (all)
  705.                 (optional force)
  706.                 )
  707.             )
  708.             (if (AND (= (exists "DOPUSDEST:Storage" (noreq)) 2)  (IN #Whichfiles 5))
  709.                 (copyfiles
  710.                 (source "DOPUSDEST:Storage")
  711.                 (dest (tackon #New_name "Storage"))
  712.                 (all)
  713.                 (optional force)
  714.                 )
  715.             )
  716.             (if (AND (= (exists "DOPUSDEST:Settings" (noreq)) 2)  (IN #Whichfiles 6))
  717.                 (copyfiles
  718.                 (source "DOPUSDEST:Settings")
  719.                 (dest (tackon #New_name "Settings"))
  720.                 (all)
  721.                 (optional force)
  722.                 )
  723.             )
  724.             )
  725.         )
  726.         ; and for non-english versions?
  727.     
  728.         (if    (= (exists "DOPUSDEST:Catalogs" (noreq)) 2)
  729.             (
  730.             (set #Bkup 1)
  731.             (set #New_name (cat "Catalogs" #Bkup))
  732.             (while     (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
  733.                 (
  734.                 (set #Bkup (+ #Bkup 1))
  735.                 (set #New_name (cat "Catalogs" #Bkup))
  736.                 )
  737.             )
  738.  
  739.             (if    (askbool (prompt #Title_msg
  740.                         "A \"Catalogs\" directory has been detected!"
  741.                         " Opus 5.5 needs new language files if used with a non-English"
  742.                         " Locale. This installation MAY contain new catalogs."
  743.                         " Others will available on AmiNet or from local distributors"
  744.                         " as available.\n\n"
  745.                         "Your current \"Catalogs\" directory can be saved as "
  746.                         "\""#New_name"\" in preparation for the new Opus 5.5.\n\n"
  747.                         "Do you wish to save the OLD catalogs?")
  748.                     (default 1)
  749.                     (help "If in doubt then select Yes.")
  750.                 )
  751.                 (
  752.                 (rename "DOPUSDEST:Catalogs" (tackon "DOPUSDEST:" #New_name))
  753.                 (makedir "DOPUSDEST:Catalogs")
  754.                 )
  755.             )
  756.             )
  757.         )
  758.         )
  759.     )
  760. )
  761.     
  762. ;
  763. ; Procedure install_core
  764. ; install the program files and new bits
  765. ; MUST HAVE A VALID DOPUSDEST ;
  766.  
  767. (procedure install_core
  768.  
  769.     (set #Title_msg "Directory Opus 5.5 Core Installation.\n\n")
  770.     (get_lhex)
  771.  
  772.     (if #O_DOpus_Dest (backup_old)) ; Is re-install so give save option
  773.     
  774.     (if    (<> #Inst_choice 0)
  775.         (if    (askbool (prompt #Title_msg 
  776.                     "Do you wish to install\n"
  777.                     " the main Opus 5.5 program files?")
  778.                 (help "Yes do it!")
  779.             )
  780.             (set #Doit 1)
  781.             (set #Doit 0)
  782.         )
  783.     )
  784.  
  785.     (if    (OR (= #Inst_choice 0) (= #Doit 1))
  786.         (
  787.         (set #Changed 1)
  788.         (set #Inst_core 1)
  789.         (set #Want_disk 1)
  790.         (get_disk)
  791.         (if    (> (+ (database "total-mem")) 1000000)
  792.             (
  793.             (working #Title_msg 
  794.                 "Copying Files.")
  795.             (copyfiles (source (tackon #Disk1_Name "Core.lha")) (dest "ram:"))
  796.             (set #SRC "ram:")
  797.             )
  798.             (set #SRC #Disk1_Name)
  799.         )
  800.         (working #Title_msg
  801.              "Dearchiving and installing the main program components.\n\n"
  802.              "This will take a minute or so....")
  803.         (run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"Core.lha "))
  804.         (delete "ram:Core.lha" (safe))
  805.         
  806.     ;
  807.     ; install non-english catalogs
  808.     ;
  809.         (if    (exists (tackon #Disk1_Name #CatalogFiles) (noreq))
  810.             (run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#Disk1_Name #CatalogFiles))
  811.         )
  812.  
  813.         (complete 50)
  814.     
  815.     ;
  816.     ; tidyup
  817.     ;
  818.     ; make sure update module is re-initialised
  819.  
  820.         (run "c:delete DOPUSDEST:system/update-history FORCE")
  821.  
  822.         (run "c:protect DOPUSDEST:c/DopusRT5 +p")
  823.         (run "c:protect DOPUSDEST:ARexx/#? +s")
  824.     
  825.     
  826.     ;Install the other bits
  827.         
  828.         (copyfiles 
  829.             (source "Opus55_Install:InstallOpus")
  830.             (dest #DOpus_Dest)
  831.             (infos)
  832.             (files)
  833.         )
  834.     
  835.         (copyfiles 
  836.             (source "Opus55_Install:ReadMe.55")
  837.             (dest #DOpus_Dest)
  838.             (infos)
  839.             (files)
  840.         )
  841.  
  842.     ; just in case use has installed LoadDB in C:, update it
  843.  
  844.         (if (exists "C:LoadDB" (noreq))
  845.             (copyfiles 
  846.                 (source (tackon #DOpus_Dest "C/LoadDB"))
  847.                 (dest "C:")
  848.                 (files)
  849.             )
  850.         )
  851.         )
  852.     )
  853. )
  854.  
  855.  
  856.  
  857. ;
  858. ; Procedure do_startup  ;
  859. ; modify S:User-Startup
  860. ; set the script for user startup
  861.  
  862.  
  863. (procedure do_startup
  864.     
  865.     (if    (= #Inst_core 1)
  866.         (startup "DirectoryOpus 5"
  867.             (prompt    #Title_msg
  868.                 "The following instructions will be added to your "
  869.                 "\"S:User-Startup\" so that your system will be properly "
  870.                 "configured to use Opus.\n\n"
  871.                 "ASSIGN DOpus5: \"" #DOpus_Dest "\"\n"
  872.                 "PATH DOpus5:c Add \n")
  873.             (help "This will add commands to your S:user-startup file to "
  874.                 "allow the correct operation of Directory Opus")
  875.             (command "ASSIGN DOpus5: \"" #DOpus_Dest "\"\n")
  876.             (command "PATH DOpus5:c Add \n")
  877.         )
  878.     )
  879. )
  880.     
  881. ;
  882. ; Procedure find_startup ;
  883. ; check what they have installed
  884. ;
  885.  
  886. (procedure find_startup
  887.  
  888.     ;check if they have our load_wb installed
  889.  
  890.     (if (exists #Dopus_prog (noreq))
  891.         (
  892.         (set #Vernum (getversion #Dopus_prog))
  893.         (set #Dop_ver (/ #Vernum 65536))
  894.         (set #Dop_rev (- #Vernum (* #Dop_ver 65536) ) )
  895.         )
  896.     )
  897.     
  898.     (set #Has_loaddb 0)
  899.     (if (exists #Loadwb (noreq))
  900.         ( ; yes
  901.         (set #Vernum (getversion #Loadwb))
  902.         (set #Wb_ver (/ #Vernum 65536))
  903.         (set #Wb_rev (- #Vernum (* #Wb_ver 65536) ) )
  904.         (if (>= #Wb_ver 42) ; should be ours
  905.             (set #Has_loaddb 1) ; yes
  906.             (set #Has_loaddb 0) ; no
  907.         )
  908.         )
  909.     )
  910.     
  911.     (if (exists #Loadwb_old (noreq))
  912.         ( ; yes
  913.         (set #Has_loadwb_old 1)
  914.         (set #Vernum (getversion #Loadwb_old))
  915.         (set #Op_ver (/ #Vernum 65536))
  916.         (set #Op_rev (- #Vernum (* #Op_ver 65536) ) )
  917.         )
  918.         (set #Has_loadwb_old 0) ;no
  919.     )
  920. )
  921.  
  922.  
  923. ;
  924. ; Procedure remove_wb  ;
  925. ;
  926.  
  927. (procedure remove_wb
  928.  
  929.     ; does user have loadwb_old or loaddb already installed 
  930.  
  931.     (if (= #Has_loadwb_old 1) ; if loadwb_old exhists
  932.         (copyfiles
  933.             (source "C:LoadWB_old")
  934.             (dest "C:")
  935.             (newname "LoadWB")
  936.         )
  937.     )
  938. )
  939.  
  940. ;
  941. ; Procedure startup_options ;
  942. ;
  943.  
  944. (procedure startup_options
  945.  
  946.     (set #Title_msg "Directory Opus 5 Startup Options.\n\n")
  947.     (if #DOpus_Dest
  948.         (
  949.         (find_startup)
  950.     
  951.         (if    ( = #Inst_choice 1)
  952.             (if     (askbool (prompt #Title_msg
  953.                         "Do you wish to change the\n"
  954.                         " startup options for Opus 5.5?")
  955.                     (help "If in doubt, then select \"Yes\"")
  956.                 )
  957.                 (set #Doit 1)
  958.                 (set #Doit 0)
  959.             )
  960.         )
  961.  
  962.         (if    (OR (<> #Inst_choice 1) (= #Doit 1))
  963.             (
  964.             (set #Curr_choice 0)
  965.                 
  966.             ;Get the users startup choices
  967.             (set #Mode (askchoice
  968.                 (prompt #Title_msg
  969.                     "Opus 5 can be started automatically when you"
  970.                     " boot your computer. What do you wish to do?")
  971.                 (help    @askchoice-help    )
  972.                 (choices "Install Opus 5 as Workbench Replacement!" ;0
  973.                          "Start Opus 5 on boot"            ;1
  974.                          "Start Opus 5 Iconified"        ;2
  975.                          "Do not start Directory Opus on boot"  ;3
  976.                          "No Change")                ;4
  977.                 (default #Curr_choice)
  978.                 )
  979.             )
  980.     
  981.             (if (<> #Mode 4) (set #Changed 1))
  982.  
  983.             ; use as wb replacement
  984.             (if (= #Mode 0)
  985.                 (
  986.                 ; does user have loadwb_old or loaddb already installed 
  987.                 (if (= #Has_loadwb_old 0) ; if loadwb_old not exhist
  988.                     (if (= #Has_loaddb 0) ; then is  loadwb actually loaddb
  989.                         (if (exists #Loadwb (noreq)) ; no. Good then does loadwb exhist?
  990.                             (rename "c:LoadWB" "c:LoadWB_old") ; then rename it
  991.                         )
  992.                     )
  993.                 )
  994.     
  995.                 ; then copy our loaddb as loadWB 
  996.                 (copyfiles
  997.                     (source (tackon #DOpus_Dest "c/LoadDB"))
  998.                     (dest "C:")
  999.                     (newname "LoadWB")
  1000.                 )
  1001.                 ) ;else remove the loadDB
  1002.                 (if (AND (<> #Mode 4) (= #Has_loaddb 1)) (remove_wb))
  1003.  
  1004.             )
  1005.         
  1006.             
  1007.  
  1008.                 
  1009.             ; start on boot normal
  1010.             (if (= #Mode 1)
  1011.                 (
  1012.                 (copyfiles
  1013.                     (source (tackon #DOpus_Dest "wbstartup/Opus5_Startup"))
  1014.                     (dest "SYS:WBStartup")
  1015.                     (infos)
  1016.                 )
  1017.         
  1018.                 (tooltype
  1019.                     (dest "SYS:WBStartup/Opus5_Startup")
  1020.                     (settooltype "CX_POPUP" "YES")
  1021.                 )
  1022.                 )
  1023.             )
  1024.         
  1025.         
  1026.             ; start on iconified normal
  1027.             (if (= #Mode 2)
  1028.                 (
  1029.                 (copyfiles
  1030.                     (source (tackon #DOpus_Dest "wbstartup/Opus5_Startup"))
  1031.                     (dest "SYS:WBStartup")
  1032.                     (infos)
  1033.                 )
  1034.         
  1035.                 (tooltype
  1036.                     (dest "SYS:WBStartup/Opus5_Startup")
  1037.                     (settooltype "CX_POPUP" "NO")
  1038.                 )
  1039.                 )
  1040.             )
  1041.             )
  1042.         )
  1043.         )
  1044.         (message #Title_msg
  1045.             "Woops Can't do this!\nDirectory Opus is not installed yet!")
  1046.     )
  1047.  
  1048. )
  1049.  
  1050. ; Procedure install_arcdir
  1051. ; Part of Script to install ArcDir.dopus5 1.0.
  1052. ; Developed by Edmund Vermeulen (edmundv@grafix.xs4all.nl).
  1053. ;
  1054.  
  1055. (procedure install_arcdir
  1056.  
  1057.     (set #Title_msg "ARexx ArcDir Installation.\n\n")
  1058.     (if    (askbool (prompt #Title_msg 
  1059.                 "ArcDir was developed by Edmund Vermeulen.\n"
  1060.                 "It allows you to easily handle LHA, LZH,"
  1061.                 " and LZX files via Directory Opus 5\n"
  1062.                 "\n HIGHLY RECOMMENDED -Install it!\n\n"
  1063.                 "Do you wish to install the ARexx ArcDir"
  1064.                 " archive to your Opus 5 Directory?\n")
  1065.             (help "Yes do it! It is great!")
  1066.         )
  1067.         (
  1068.         (set #Changed 1)
  1069.         (set #Want_disk 2)
  1070.         (get_disk)
  1071.         (if    (> (+ (database "total-mem")) 1000000)
  1072.             (
  1073.             (working #Title_msg 
  1074.                 "Copying Files.")
  1075.             (copyfiles (source (tackon #Disk2_Name "ArcDir10.lha")) (dest "ram:"))
  1076.             (set #SRC "ram:")
  1077.             )
  1078.             (set #SRC #Disk2_Name)
  1079.         )
  1080.         (working #Title_msg 
  1081.             "Dearchiving Arcdir installation.\n\n"
  1082.             "This will be quicker...")
  1083.         (run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "#SRC"ArcDir10.lha "))
  1084.         (delete "ram:ArcDir10.lha" (safe))
  1085.  
  1086.         (run "cd ram:arcdir")
  1087.  
  1088.     ; delete old stuff
  1089.  
  1090.     
  1091.         (if    (= (getversion "DOPUSDEST:ARexx/LhADir.dopus5") 65536)
  1092.             (message #Title_msg
  1093.                 "Version 1.0 of LhADir.dopus5 detected!\n\n"
  1094.                 "Please note that ArcDir.dopus5 doesn't need any alterations "
  1095.                 "to the toolbar or any other buttons in Opus whatsoever.\n\n"
  1096.                 "You should remove all references to LhADir.dopus5. Copying "
  1097.                 "the default toolbar over your old toolbar will usually "
  1098.                 "accomplish this."
  1099.               )
  1100.         )
  1101.     
  1102.         (if    (= (exists "DOPUSDEST:ARexx/LhADir.dopus5" (noreq)) 1)
  1103.             (if    (askbool (prompt #Title_msg
  1104.                         "LhADir.dopus5 detected.\n\n"
  1105.                         "LhADir has been superseded by ArcDir and is not needed "
  1106.                         "any more. Is it okay to delete it?")
  1107.                     (help "Select 'Yes' to delete LhADir.dopus5 and related files "
  1108.                     "from your system or 'No' to leave them alone.")
  1109.                 )
  1110.                 ( ;yes
  1111.                 (delete "DOPUSDEST:ARexx/LhADir.dopus5")
  1112.                 (delete "DOPUSDEST:ARexx/LhADir-handler")
  1113.                 (delete "DOPUSDEST:ARexx/NewLhA.dopus5")
  1114.                 (delete "DOPUSDEST:C/LhADirList")
  1115.                 (delete "Locale:Catalogs/nederlands/LhADir.catalog")
  1116.                 (delete "Locale:Catalogs/deutsch/LhADir.catalog")
  1117.                 (delete "Locale:Catalogs/français/LhADir.catalog")
  1118.                 (delete "Locale:Catalogs/norsk/LhADir.catalog")
  1119.                 (delete "DOPUSDEST:Buttons/LhADir Buttons")
  1120.                 (delete "DOPUSDEST:Buttons/toolbar_LhADir")
  1121.                 )
  1122.             )
  1123.         )
  1124.     
  1125.     ; ask questions first, copy files later
  1126.     
  1127.         (set #Storeold
  1128.             (if    (askbool (prompt #Title_msg
  1129.                         "Any current filetypes for LHA and LZX will be will be overwritten. "
  1130.                         "Would you like to keep a safe copy of them in the "
  1131.                         "'DOpus5:Storage' drawer?\n\n"
  1132.                         "In case of an uninstallation these files will be reinstalled.")
  1133.                     (help "Select 'Yes' to copy the files 'LHA archive' and 'LZX archive' "
  1134.                         "from the 'DOpus5:Filetypes' drawer to the 'DOpus5:Storage' "
  1135.                         "drawer. If you select 'No', the current (default) filetypes for "
  1136.                         "LHA and LZX in the Storage drawer will be kept.\n\n"
  1137.                         "When doing an uninstallation, these filetypes will be "
  1138.                         "reinstalled from the Storage drawer to the Filetypes drawer. "
  1139.                         "You can accomplish an uninstallation by running this "
  1140.                         "installation script again.")
  1141.                 )
  1142.             )
  1143.         )
  1144.         
  1145.         (set #how
  1146.             (+
  1147.                 (askchoice
  1148.                 (prompt #Title_msg
  1149.                     "How would you like an archive to be listed when it "
  1150.                     "is double-clicked?")
  1151.                 (help @askchoice-help)
  1152.                 (choices
  1153.                 (cat #proprender "In a new lister (Browse).")
  1154.                 "In the same lister (GetDir)."
  1155.                 )
  1156.                 )
  1157.                 (* 2
  1158.                 (askchoice
  1159.                     (prompt #Title_msg
  1160.                         "What do you want to happen when you drag and drop "
  1161.                         "an archive in another lister?")
  1162.                     (help @askchoice-help)
  1163.                     (choices
  1164.                         (cat #proprender "Extract it (with LhA/LZX).")
  1165.                             "List it (with ArcDir)."
  1166.                     )
  1167.                 )
  1168.                 )
  1169.             )    
  1170.         )
  1171.  
  1172.         (set #Language
  1173.             (if
  1174.                 (= (exists "ENV:Language" (noreq)) 1)
  1175.                 (getenv "Language")
  1176.                     ""
  1177.                 )
  1178.         )
  1179.  
  1180.         (set #Catalogs
  1181.             (askoptions
  1182.                 (prompt #Title_msg
  1183.                     "Which language catalog(s) do you want to install?\n"
  1184.                     "(English is built-in.)")
  1185.                 (help @askoptions-help)
  1186.                 (choices (cat #proprender "Nederlands") "Deutsch" "Français" "Norsk")
  1187.                 (default 
  1188.                     (+
  1189.                     (= #Language "nederlands")
  1190.                     (* 2 (= #Language "deutsch"))
  1191.                     (* 4 (= #Language "français"))
  1192.                     (* 8 (= #Language "norsk"))
  1193.                     )
  1194.                 )
  1195.                 )
  1196.         )
  1197.         
  1198.         
  1199.     ; copy the files
  1200.     
  1201.         (copyfiles
  1202.             (source "ram:ArcDir/ARexx")
  1203.             (dest "DOPUSDEST:ARexx")
  1204.             (pattern "#?")
  1205.             (files)
  1206.         )
  1207.         (copyfiles
  1208.             (source "ram:ArcDir/C")
  1209.             (dest "DOPUSDEST:C")
  1210.             (pattern "#?")
  1211.             (files)
  1212.         )
  1213.     
  1214.         (set #Storedir
  1215.             (if (= (exists "DOPUSDEST:Storage/Filetypes" (noreq)) 2)
  1216.                 ("DOPUSDEST:Storage/Filetypes")
  1217.                 ("DOPUSDEST:Storage")
  1218.             )
  1219.         )
  1220.         (set #N 0)
  1221.         (while
  1222.             (set #Arctype (select #N "LHA" "LZX" ""))
  1223.             (
  1224.             (if #Storeold
  1225.                 (copyfiles
  1226.                     (source (cat "DOPUSDEST:Filetypes/" #Arctype " archive"))
  1227.                     (dest #Storedir)
  1228.                 )
  1229.             )
  1230.             (copyfiles
  1231.                 (source    (select    #how
  1232.                     (cat "ram:ArcDir/Filetypes/" #Arctype " archive")
  1233.                     (cat "ram:ArcDir/Storage/Filetypes/" #Arctype " archive_GetDir")
  1234.                     (cat "ram:ArcDir/Storage/Filetypes/" #Arctype " archive_Browse&DnD")
  1235.                     (cat "ram:ArcDir/Storage/Filetypes/" #Arctype " archive_GetDir&DnD")
  1236.                     )
  1237.                 )
  1238.                 (dest "DOPUSDEST:Filetypes")
  1239.                 (newname (cat #Arctype " archive"))
  1240.             )
  1241.             (set #N (+ #N 1))
  1242.             )
  1243.         )
  1244.     
  1245.         (set #N 0)
  1246.         (while
  1247.             (set #Thiscat (select #N "nederlands" "deutsch" "français" "norsk" ""))
  1248.             (
  1249.             (if (in #Catalogs #N)
  1250.                 (copyfiles
  1251.                     (source (cat "ram:ArcDir/Locale/Catalogs/" #Thiscat "/ArcDir.catalog"))
  1252.                     (dest (cat "LOCALE:Catalogs/" #Thiscat))
  1253.                 )
  1254.             )
  1255.             (set #N (+ #N 1))
  1256.             )
  1257.         )
  1258.                 
  1259.     ; Done
  1260.         
  1261.         (message #Title_msg
  1262.             "Installation Done!\n\n"
  1263.             "To be able to use ArcDir.dopus5, ARexx needs to be activated "
  1264.             "by running the RexxMast program from the System drawer.\n\n"
  1265.             "You may uninstall ArcDir by running the installation script"
  1266.             " from the ARCDir archive on the Opus 5.5 Extras Disk."
  1267.         )
  1268.     
  1269.         (run "cd ram:")
  1270.         (run "delete ram:ArcDir#? all")
  1271.         )
  1272.     )
  1273. )
  1274.  
  1275.  
  1276. ;
  1277. ; Procedure install_complete ;
  1278. ;
  1279.  
  1280. (procedure install_complete
  1281.  
  1282.     (get_dir)
  1283.     (signal_opus)
  1284.     (install_core)
  1285.     (install_support)
  1286.     (install_arcdir)
  1287.     (install_arexx)    
  1288.     (install_mwbextras)
  1289.     (startup_options)
  1290.     (do_startup)
  1291. )
  1292.  
  1293.  
  1294. ;
  1295. ; Real not procedure at last! ;
  1296. ;
  1297.  
  1298.  
  1299. (while    (
  1300.     (set #Title_msg "Directory Opus 5 Installation.\n\n")
  1301.      (set #Inst_choice
  1302.       (askchoice
  1303.         (prompt #Title_msg
  1304.             "Please select one of following:-")
  1305.         (help     "Install Opus 5.5 "
  1306.               "Installs or updates Opus 5.5 on"
  1307.              " your hard disk, including program"
  1308.              " and support files plus button banks,"
  1309.              " filetypes, environments etc. NOTE: "
  1310.              "Any old configuration items are saved first.\n\n"
  1311.             "Install Opus 5.5  - Custom\n"
  1312.               "Installs Opus 5.5 as above but allows"
  1313.              " you to choose which parts to install.\n\n"
  1314.             "Install ARexx ArcDir\n "    
  1315.              "Installs ArcDir\n\n"
  1316.             "Install Additional MWB Extras\n"    
  1317.              "Installs the MagicWorkbench archive of"
  1318.              " images, icons, buttons and other files"
  1319.              " as supplied by Trevor Morris and Leo Davidson.\n\n"
  1320.             "Change Opus Startup Options"
  1321.              "Allows you to change the startup options for Opus 5.")
  1322.         (choices
  1323.             "Install or Update Opus 5.5 "    ; 0
  1324.             "Custom Install Opus 5.5 "    ; 1 
  1325.             "Change Opus Startup Options"    ; 2 only if 5.5 installed
  1326.             "Done")                ; 3
  1327.         (default 3)
  1328.      )
  1329.     )
  1330.     (<> #Inst_choice 3)
  1331.     )
  1332.     (select #Inst_choice
  1333.         (install_complete)    ;0
  1334.         (install_complete)    ;1
  1335.         (startup_options)    ;2
  1336.     )
  1337. )
  1338.  
  1339. (if    (= #Inst_core 1)
  1340.     (message #Title_msg
  1341.         "Serialise Directory Opus 5 \n"
  1342.         "---------------------------\n"
  1343.         "To protect your valuable investment in Opus 5 "
  1344.         "and complete the installation procedure, you "
  1345.         " SERIALISE your copy of Opus 5 with your details and "
  1346.         " the registration number from your installation disk.\n\n"
  1347.         "By the way, now is also a good time to complete"
  1348.         " the registration card and return it to your local"
  1349.         " distributor.  Technical support and warranty will"
  1350.         " only be honoured if a valid registration card has"
  1351.         " been received.")
  1352. )
  1353.  
  1354. (if    (= #Changed 1)
  1355.     (message #Title_msg
  1356.         "Directory Opus is now installed.\n\n"
  1357.         "We suggest that you finish this Installer"
  1358.         " script then remove all disks from floppy"
  1359.         " drives and REBOOT your computer.")
  1360. )
  1361.  
  1362. ;
  1363. ;Please please ReadMe 
  1364. ;
  1365.  
  1366. (if    (= #Changed 1)
  1367.     (if    (askbool (prompt #Title_msg
  1368.                 "All things change including software.\n\n"
  1369.                 "Any changes are noted in the ReadMe"
  1370.                 " file on the installation disk.\n\n"
  1371.                 "Do you wish to read the ReadMe file now?\n\n")
  1372.             (help "go on, read it now.")
  1373.         )
  1374.         (if (> (run "Sys:Utilities/MultiView DOPUSDEST:ReadMe.55") 0)
  1375.             (if (> (run "Sys:Utilities/AmigaGuide DOPUSDEST:ReadMe.55") 0)
  1376.                 (if (> (run "More DOPUSDEST:ReadMe.55") 0)
  1377.                     (
  1378.                     (set #Want_disk 1)
  1379.                     (get_disk)
  1380.                     (run "Opus55_Install:More DOPUSDEST:ReadMe.55")
  1381.                     )
  1382.                 )
  1383.             )
  1384.         )
  1385.     )
  1386. )
  1387.  
  1388. (complete 100)
  1389.  
  1390. (delete "ram:lhex")
  1391. (exit "Directory Opus 5.5 Install script done!")
  1392.  
  1393.