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 >
Wrap
Text File
|
1996-08-27
|
35KB
|
1,393 lines
; Script to install Directory Opus version 5.5
;
; Directory Opus Install Version $VER: Install-Opus 5.5 (27.08.96)
; COPYRIGHT ©1996 GP SOFTWARE, AUSTRALIA
; note uses Opus<Alt-Shift>5
; now installs new catalogs if they are on the disk.
(onerror
(makeassign "DOPUSDEST" (safe))
)
(complete 0)
;
;check user has Dos 2
;
(set #DOSTYPE (/ (getversion) 65536))
(if
(NOT (>= #DOSTYPE 37))
(abort "Directory Opus 5 requires AmigaDOS 2.04 or higher."
" If you have an earlier version of AmigaDOS you must purchase an upgrade before using Opus 5.")
)
(set @default-dest "work:")
(set #Dopus_prog "DOpus5:DirectoryOpus")
(set #Loadwb "C:LoadWb")
(set #Loadwb_old "C:LoadWb_old")
(set #Has_loadwb_old 0)
(set #Has_loaddb 0)
(set #Inst_choice 0)
(set #Changed 0)
(set #Inst_core 0)
(set #DName1 "Opus55_Install")
(set #DName2 "Opus55_Extras")
(set #Disk1_Name (cat #DName1 ":"))
(set #Disk2_Name (cat #DName2 ":"))
(set #TLArchive "MWB_DOpus8c.lha")
(set #CatalogFiles "CatFiles.lha")
(set #Is_update 0)
(set #DOpus_Dest (getassign "DOpus5" "a"))
(set #O_DOpus_Dest (getassign "DOpus5" "a"))
(set #Go "Proceed")
(set #Skip "Skip this part")
;
; Procedure signal
; inc ase Opus is re-installed. The notification on the modules
; directory can cause problems so signal Opus to turn off notifications
(procedure signal_opus
(set #Want_disk 1)
(get_disk)
(set #Sigs (tackon #Disk1_Name "dopusmsg"))
(if (exists #Sigs (noreq))
(run (cat #Sigs " DOPUS.1 \"command set notify off\""))
)
)
;
; Procedure get_lhex
;
(procedure get_lhex
(if ( = (exists "ram:lhex" (noreq)) 0)
(
(set #Want_disk 1)
(get_disk)
(working #Title_msg
"Reading the Install disk for Directory Opus files.")
(copyfiles (source (tackon #Disk1_Name "lhex")) (dest "ram:"))
)
)
)
;
; Procedure get_disk
; get the correct disk for a program
;
(procedure get_disk
(if (= #Want_disk 1)
(set #DiskName #DName1)
(set #DiskName #DName2)
)
(askdisk
(prompt #Title_msg
"\nPlease insert the disk labeled \""#DiskName"\".")
(help "Insert this disk in a floppy drive to continue the installation.")
(assigns)
(dest #DiskName)
)
(set #Current_disk #Want_disk)
)
;
; Procedure install_arexx ;
; From Leo Davidson collection.
;
(procedure install_arexx
(set #Title_msg "Installation of ARexx Archive.\n\n")
(get_lhex)
(if (askbool (prompt #Title_msg
"We have also included an archive of ARexx scripts and other add-ons for Opus "
"by various users. Most of the scripts will require some further "
"installation after this script has been run.\n\n"
"Do you wish to install the ARexx Archives?\n")
(help "Yes do it! It is great!")
)
(
(set #Changed 1)
(set #Want_disk 2)
(get_disk)
(if (> (+ (database "total-mem")) 1000000)
(
(working #Title_msg
"Copying Files.")
(copyfiles (source (tackon #Disk2_Name "ARexx.lha")) (dest "ram:"))
(set #SRC "ram:")
)
(set #SRC #Disk2_Name)
)
(working #Title_msg
"Dearchiving and installing the ARexx scripts.\n\n"
"More patience..\n"
"Won't take too long.")
(run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"ARexx.lha"))
(delete "ram:ARexx.lha" (safe))
(run "c:protect DOPUSDEST:ARexx/#? +s")
(message #Title_msg
"The ARexx scripts are now installed. Please read "
"the top of the scripts for further information on "
"what they do and how to use them.\n\n"
"The scripts are in \"DOpus5:Arexx\", some add-on modules are in "
"\"DOpus5:Storage/Modules\", and some of the add-ons have AmigaGuides "
"which are in \"DOpus5:Help\". There are also some new icons in "
"\"DOpus5:Icons\".\n"
"\nTo activate modules you must move them to \"DOpus5:Modules\" and "
"re-start Opus."
)
)
)
)
;
; Procedure install_mwbextras ;
; MWB_DOpus_8_Install 1.0 (11.8.96)
; Install originally written by Leo Davidson.
;
(procedure install_mwbextras
(set #Title_msg "MWB_DOpus v8.0 Installation.\n\n")
(get_lhex)
;- Introductory message
(if (askbool (prompt #Title_msg
"Developed by Trevor Morris and Leo Davidson\n\n"
"MagicWorkbench toolbar icons and backdrops "
"for Directory Opus 5.5 (and other programs).\n\n"
"These provide a very nice set of images for"
" toolbars and icons whether or not you use MagicWorkbench."
"\n\nDo you wish to install these on your system?")
(help "Yes do it! It is great!")
)
(
(set #Changed 1)
(set #Want_disk 2)
(get_disk)
(if (> (+ (database "total-mem")) 1000000)
(
(working #Title_msg
"Copying Files.")
(copyfiles (source (tackon #Disk2_Name #TLArchive)) (dest "ram:"))
(set #SRC "ram:")
)
(set #SRC #Disk2_Name)
)
(working #Title_msg
"Dearchiving the MWB Archive.\n\n"
"Ever thought of taking up Chess?....\n\n"
"Ahh, wouldn't a \"Power\" Amiga be great!")
(run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "(tackon #SRC #TLArchive)))
(delete (tackon "ram:" #TLArchive) (safe))
(run "cd ram:MWB8")
;- Set where to do the install to
(set #Target "DOPUSDEST:")
;- Back-up the old Images drawer (if exists) and copy new images
(if (= (exists "DOPUSDEST:Images" (noreq)) 2)
(
(set #Tmp_msg "\n\nYour old \"Images\" drawer can be backup before the new images are installed.")
(set images_exist 1)
)
(
(set #Tmp_msg " ")
(set images_exist 0)
)
)
(if (askbool (prompt #Title_msg
"The new toolbar images will be copied"
" to your \"Dopus5:Images\" drawer."
#Tmp_msg)
(choices #Go #Skip)
(default 1)
(help "This part installs all the toolbar images.")
)
( ; yes
(if images_exist
(
(set #Bkup 1)
(set #New_name (cat "Images" #Bkup))
(while (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
(
(set #Bkup (+ #Bkup 1))
(set #New_name (cat "Images" #Bkup))
)
)
(if (askbool (prompt #Title_msg
"Do you wish to backup your current"
" \"Images\" directory or overwrite it"
" with the new images?\n\n"
"Your old directory would be backed up as "#New_name".")
(choices "Yes - Backup" "No - Overwrite")
(default 1)
(help "If in doubt select Yes.")
)
(; backup Images
(rename (tackon #Target "Images") (tackon #Target #New_name))
)
)
)
)
(copyfiles
(source "ram:MWB8/Images")
(dest (tackon #Target "Images"))
(all)
(optional force)
)
)
)
;- Copy the Colours guide
(if (askbool (prompt #Title_msg
"We have provided some simple shortcuts which"
" allow you to quickly set MagicWorkbench colours.\n\n"
"Do you wish to install this \"Colours\" directory?")
(default 1)
(help "This part installs a MWB Colors directory.")
)
(copyfiles
(source "ram:MWB8/Colors")
(dest (tackon #Target "Colors"))
(all)
(infos)
(optional force)
)
)
;- Copy the new icons (for programs, files, etc)
(if (askbool (prompt #Title_msg
"The old DOpus5 file icons will be replaced by "
"MagicWorkbench versions.\n\n"
"Note: In case you have set some tooltypes in it, "
"the main DirectoryOpus icon will be left alone. You "
"should replace it manually as described in the help "
"guide which is installed later.")
(choices #Go #Skip)
(default 1)
(help "This part installs all the program and file icons.")
)
(copyfiles
(source "ram:MWB8/DOpus_Icons")
(dest #Target)
(all)
(optional force)
)
)
;- Copy the Help guide
(if (askbool (prompt #Title_msg
"An AmigaGuide about MWB_DOpus 8, including hints & tips "
"will be copied to \"DOpus5:Help\".")
(choices #Go #Skip)
(default 1)
(help "This part installs the help guide.")
)
(copyfiles
(source "ram:MWB8/Help/MWB_DOpus8_Help.guide")
(dest (tackon #Target "Help"))
(infos)
(optional force)
)
)
;- Copy the fonts
(if (askbool (prompt #Title_msg
"Some extra fonts will be copied to \"Fonts:\".\n"
"They are not essential to use MWB_DOpus.\n\n"
"These fonts are:\n"
"\"P0T-NOoDLE\",\n"
"\"P0T-Prop\",\n"
"\"PolarSmall\", and,\n"
"\"PolarSmall-Prop\".")
(choices #Go #Skip)
(default 1)
(help "This part installs some extra fonts.")
)
(copyfiles
(source "ram:MWB8/Fonts")
(dest "Fonts:")
(all)
(optional force)
)
)
;- Copy the backdrops (ask where first)
(if (askbool (prompt #Title_msg
"Do you wish to install the backdrop pictures?\n")
(default 1)
(help "This part installs some backdrop pictures.")
)
(copyfiles
(source "ram:MWB8/Backdrops")
(dest (askdir (prompt "Select where to install the backdrops.")
(help @askdir-help)
(default "Sys:Prefs/Presets")
)
)
(all)
(optional force)
)
)
;- Copy the Index files (ask where first)
(if (askbool (prompt #Title_msg
"Do you wish to install the index picture?\n\n"
"This make it easy to find particular icons"
" in the collection.\n\n"
"The picture will be installed in \"Dopus5:Help\"")
(default 1)
(help "This part installs the index picture. Do it!")
)
(copyfiles
(source "ram:MWB8/Index")
(dest (tackon #Target "Help"))
(infos)
(all)
(optional force)
)
)
;- Copy the Disk icons (ask where first)
(if (askbool (prompt #Title_msg
"Do you wish to install some disk icons?\n"
" You can use these to replace your existing"
" disk icons with if you wish.\n\n"
"You'll have to do the replacements yourself using "
"IconEdit (comes with Workbench) or MUIReIcon "
"(on Aminet).")
(default 1)
(help "This part installs some disk icons.\n"
"Your existing icons will not be replaced.")
)
(copyfiles
(source "ram:MWB8/Disk_Icons")
(dest (askdir (prompt "Select where to install the disk "
"icons:")
(help @askdir-help)
(default "sys:prefs/presets")
)
)
(all)
(optional force)
)
)
(message #Title_msg
"Installation done!\n\n"
"Be sure to read the help guide in"
" \"DOpus5:Help\" for more info. This will also"
" explain how to set up MagicWorkbench colours etc.")
; tidy up
(working #Title_msg
"Tidying up after MWB_DOpus v8.0 Installation")
(run "cd ram:")
(run "delete ram:MWB8#? all")
)
)
)
;
; Procedure install_support ;
; add the extra non-program bits
;
(procedure install_support
(set #Title_msg "Directory Opus 5.5 Support Files.\n\n")
(get_lhex)
(if (<> #Inst_choice 0)
(if (askbool (prompt #Title_msg
"Do you wish to install the following support drawers and associated files for DOpus 5.5:-\n"
"\nButtons, Environment, Groups\nIcons, Images, Settings\n Storage and WBStartup.\n\n"
"These directories contain configuration details,\n"
"and associated files required for the correct operation"
" of Opus 5.5.")
(help "Yes do it!")
(default 1)
)
(set #Doit 1)
(set #Doit 0)
)
(; else tell 'em what we are doing.
(message #Title_msg
"This section installs the following support drawers and associated files for DOpus 5.5:-\n"
"\nButtons, Environment, Groups\nIcons, Images, Settings\n Storage, System and WBStartup.\n\n"
"These directories contain configuration details,\n"
"and associated files for the correct operation"
" of Opus 5.5.")
)
)
(if (OR (= #Inst_choice 0) (= #Doit 1))
(
(set #Changed 1)
(set #Want_disk 1)
(get_disk)
(if (> (+ (database "total-mem")) 1000000)
(
(working #Title_msg
"Installing Support Files.")
(copyfiles (source (tackon #Disk1_Name "SupportA.lha")) (dest "ram:"))
(copyfiles (source (tackon #Disk1_Name "SupportB.lha")) (dest "ram:"))
(set #SRC "ram:")
)
(set #SRC #Disk1_Name)
)
(working #Title_msg
"Dearchiving and installing the main support components.\n\n"
"This won't take too long....")
(run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"SupportA.lha "))
(delete "ram:SupportA.lha" (safe))
(run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "#SRC"SupportB.lha "))
(delete "ram:SupportB.lha" (safe))
(complete 70)
(if #Is_update ;if update then give choice
(if (askbool (prompt #Title_msg
"Do you wish to overwrite your old configurations"
" for Buttons, Toolbar, Menus, Environments and"
" Settings with the new default set?\n\n"
"You may choose the parts to install later but you may"
" have to re-setup your configurations if you install"
" these new parts. Alternatively you could dearchive"
" the file SupportB.lha on the install disks later and"
" install specific parts manually.")
(help "This allows you to select certain parts of your"
" old Opus directory to be updated or left unchanged. If unsure select YES.")
)
(
(copyfiles
(prompt #Title_msg
"Select which Buttons/Menus etc to install.")
(source "ram:SupportB/Buttons")
(dest (tackon #DOpus_Dest "Buttons"))
(all)
(confirm)
(help "Select the files you wish to copy. If in doubt select all!")
)
(copyfiles
(prompt #Title_msg
"Select which Environment files to install.")
(source "ram:SupportB/Environment")
(dest (tackon #DOpus_Dest "Environment"))
(all)
(confirm)
(help "Select the files you wish to copy. If in doubt select all!")
)
(copyfiles
(prompt #Title_msg
"Select which Settings files to install.")
(source "ram:SupportB/Settings")
(dest (tackon #DOpus_Dest "Settings"))
(all)
(confirm)
(help "Select the files you wish to copy. If in doubt select all!")
)
)
)
(copyfiles ; if not update just copy to dest
(source "ram:SupportB")
(dest #DOpus_Dest)
(all)
)
)
(run "delete ram:SupportB#? all")
(complete 90)
)
)
)
;
; Procedure get_dir ;
; get place to install Opus
;
(procedure get_dir
(if #DOpus_Dest ; if we have a valid destination?
(if (askbool (prompt #Title_msg
"Opus 5 has already been installed on this system\n"
"in the drawer named \"" #DOpus_Dest"\"."
"\n\nDo you want this version installed in that drawer?")
(help "The installer has determined that you may already have a "
"copy of Opus 5 installed on your system. If this is wrong or "
"you want the update installed elsewhere, select NO as an "
"answer. Otherwise, select YES.")
(default 1)
)
(set #Is_update 1) ; if user wants in same place
(set #DOpus_Dest ; if user wants in different place
(tackon (askdir
(prompt "Directory Opus 5 will be installed in its own"
" directory on your hard disk.\n"
"Where should the Opus 5 directory be created?")
(help @askdir-help)
(default @default-dest)
)
"Opus5"
)
)
)
(set #DOpus_Dest ; else if not an update, get a location for program
(tackon
(askdir
(prompt "Directory Opus 5 will be installed in its own"
" directory on your hard disk.\n"
"Where should the Opus 5 directory be created?")
(help @askdir-help)
(default @default-dest)
)
"Opus5"
)
)
)
; make DOpus drawer & icon if not there
(if (NOT #Is_update)
(makedir #DOpus_Dest (infos))
)
; at this point we have a valid destination, so we tell installer where
; the application will end up so the exit page will be correct -- also,
; the installation log file (if any) will be copied to the destination
(set @default-dest #DOpus_Dest)
(makeassign "DOPUSDEST" #DOpus_Dest (safe))
)
;
; Procedure backup_old
; if an update to same place then backup bits
; Also handle Catalogs
; Non-English installations should modify this section
;
(procedure backup_old
; must have had an old 'Dopus5:' installed to get here so warn.
(message #Title_msg
"********** WARNING *************\n\n"
"If you are currently running a previous version of"
" Directory Opus 5, your system may become unstable if"
" you use any Opus functions while installing this new"
" version.\n\n"
"We recommend that you either quit Opus 5 before"
" installing this new version, or REBOOT your computer"
" immediately after the installation is complete.")
(if #Is_update
(
(if (askbool (prompt #Title_msg
"You already have Directory Opus installed on your hard disk.\n\n"
"Do you wish to BACKUP the user configurable files?.\n\n"
"These include Buttons, Environment, FileTypes, Icons,"
" Images, Settings, Storage, and System drawers.")
(help "For safety you, select yes.")
(default 1)
)
(
(set #Bkup 1)
(set #New_name (cat "OLD" #Bkup))
(while (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
(
(set #Bkup (+ #Bkup 1))
(set #New_name (cat "OLD" #Bkup))
)
)
(set #Whichfiles
(askoptions
(prompt "Backing up old files to \""#New_name"\"\n"
"Please select the Drawers to be saved:-")
(choices
"Buttons" ;0
"Environment" ;1
"FileTypes" ;2
"Icons" ;3
"Images" ;4
"Storage" ;5
"Settings" ;6
)
(help "This allows you to select only certain parts of your"
" old Opus drirectory to be saved. If unsure select all.")
(default 127)
)
)
(working "Backing up old files to new directory \""#New_name"\"")
(set #New_name (tackon "DOPUSDEST:" #New_name))
(makedir #New_name)
(if (AND (= (exists "DOPUSDEST:Buttons" (noreq)) 2) (IN #Whichfiles 0))
(copyfiles
(source "DOPUSDEST:Buttons")
(dest (tackon #New_name "Buttons"))
(all)
(optional force)
)
)
(if (AND (= (exists "DOPUSDEST:Environment" (noreq)) 2) (IN #Whichfiles 1))
(copyfiles
(source "DOPUSDEST:Environment")
(dest (tackon #New_name "Environment"))
(all)
(optional force)
)
)
(if (AND (= (exists "DOPUSDEST:FileTypes" (noreq)) 2) (IN #Whichfiles 2))
(copyfiles
(source "DOPUSDEST:FileTypes")
(dest (tackon #New_name "FileTypes"))
(all)
(optional force)
)
)
(if (AND (= (exists "DOPUSDEST:Icons" (noreq)) 2) (IN #Whichfiles 3))
(copyfiles
(source "DOPUSDEST:Icons")
(dest (tackon #New_name "Icons"))
(all)
(optional force)
)
)
(if (AND (= (exists "DOPUSDEST:Images" (noreq)) 2) (IN #Whichfiles 4))
(copyfiles
(source "DOPUSDEST:Images")
(dest (tackon #New_name "Images"))
(all)
(optional force)
)
)
(if (AND (= (exists "DOPUSDEST:Storage" (noreq)) 2) (IN #Whichfiles 5))
(copyfiles
(source "DOPUSDEST:Storage")
(dest (tackon #New_name "Storage"))
(all)
(optional force)
)
)
(if (AND (= (exists "DOPUSDEST:Settings" (noreq)) 2) (IN #Whichfiles 6))
(copyfiles
(source "DOPUSDEST:Settings")
(dest (tackon #New_name "Settings"))
(all)
(optional force)
)
)
)
)
; and for non-english versions?
(if (= (exists "DOPUSDEST:Catalogs" (noreq)) 2)
(
(set #Bkup 1)
(set #New_name (cat "Catalogs" #Bkup))
(while (= (exists (cat "DOPUSDEST:" #New_name) (noreq)) 2)
(
(set #Bkup (+ #Bkup 1))
(set #New_name (cat "Catalogs" #Bkup))
)
)
(if (askbool (prompt #Title_msg
"A \"Catalogs\" directory has been detected!"
" Opus 5.5 needs new language files if used with a non-English"
" Locale. This installation MAY contain new catalogs."
" Others will available on AmiNet or from local distributors"
" as available.\n\n"
"Your current \"Catalogs\" directory can be saved as "
"\""#New_name"\" in preparation for the new Opus 5.5.\n\n"
"Do you wish to save the OLD catalogs?")
(default 1)
(help "If in doubt then select Yes.")
)
(
(rename "DOPUSDEST:Catalogs" (tackon "DOPUSDEST:" #New_name))
(makedir "DOPUSDEST:Catalogs")
)
)
)
)
)
)
)
;
; Procedure install_core
; install the program files and new bits
; MUST HAVE A VALID DOPUSDEST ;
(procedure install_core
(set #Title_msg "Directory Opus 5.5 Core Installation.\n\n")
(get_lhex)
(if #O_DOpus_Dest (backup_old)) ; Is re-install so give save option
(if (<> #Inst_choice 0)
(if (askbool (prompt #Title_msg
"Do you wish to install\n"
" the main Opus 5.5 program files?")
(help "Yes do it!")
)
(set #Doit 1)
(set #Doit 0)
)
)
(if (OR (= #Inst_choice 0) (= #Doit 1))
(
(set #Changed 1)
(set #Inst_core 1)
(set #Want_disk 1)
(get_disk)
(if (> (+ (database "total-mem")) 1000000)
(
(working #Title_msg
"Copying Files.")
(copyfiles (source (tackon #Disk1_Name "Core.lha")) (dest "ram:"))
(set #SRC "ram:")
)
(set #SRC #Disk1_Name)
)
(working #Title_msg
"Dearchiving and installing the main program components.\n\n"
"This will take a minute or so....")
(run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#SRC"Core.lha "))
(delete "ram:Core.lha" (safe))
;
; install non-english catalogs
;
(if (exists (tackon #Disk1_Name #CatalogFiles) (noreq))
(run (cat "ram:lhex >NIL: <NIL: -qfw=DOPUSDEST: x "#Disk1_Name #CatalogFiles))
)
(complete 50)
;
; tidyup
;
; make sure update module is re-initialised
(run "c:delete DOPUSDEST:system/update-history FORCE")
(run "c:protect DOPUSDEST:c/DopusRT5 +p")
(run "c:protect DOPUSDEST:ARexx/#? +s")
;Install the other bits
(copyfiles
(source "Opus55_Install:InstallOpus")
(dest #DOpus_Dest)
(infos)
(files)
)
(copyfiles
(source "Opus55_Install:ReadMe.55")
(dest #DOpus_Dest)
(infos)
(files)
)
; just in case use has installed LoadDB in C:, update it
(if (exists "C:LoadDB" (noreq))
(copyfiles
(source (tackon #DOpus_Dest "C/LoadDB"))
(dest "C:")
(files)
)
)
)
)
)
;
; Procedure do_startup ;
; modify S:User-Startup
; set the script for user startup
(procedure do_startup
(if (= #Inst_core 1)
(startup "DirectoryOpus 5"
(prompt #Title_msg
"The following instructions will be added to your "
"\"S:User-Startup\" so that your system will be properly "
"configured to use Opus.\n\n"
"ASSIGN DOpus5: \"" #DOpus_Dest "\"\n"
"PATH DOpus5:c Add \n")
(help "This will add commands to your S:user-startup file to "
"allow the correct operation of Directory Opus")
(command "ASSIGN DOpus5: \"" #DOpus_Dest "\"\n")
(command "PATH DOpus5:c Add \n")
)
)
)
;
; Procedure find_startup ;
; check what they have installed
;
(procedure find_startup
;check if they have our load_wb installed
(if (exists #Dopus_prog (noreq))
(
(set #Vernum (getversion #Dopus_prog))
(set #Dop_ver (/ #Vernum 65536))
(set #Dop_rev (- #Vernum (* #Dop_ver 65536) ) )
)
)
(set #Has_loaddb 0)
(if (exists #Loadwb (noreq))
( ; yes
(set #Vernum (getversion #Loadwb))
(set #Wb_ver (/ #Vernum 65536))
(set #Wb_rev (- #Vernum (* #Wb_ver 65536) ) )
(if (>= #Wb_ver 42) ; should be ours
(set #Has_loaddb 1) ; yes
(set #Has_loaddb 0) ; no
)
)
)
(if (exists #Loadwb_old (noreq))
( ; yes
(set #Has_loadwb_old 1)
(set #Vernum (getversion #Loadwb_old))
(set #Op_ver (/ #Vernum 65536))
(set #Op_rev (- #Vernum (* #Op_ver 65536) ) )
)
(set #Has_loadwb_old 0) ;no
)
)
;
; Procedure remove_wb ;
;
(procedure remove_wb
; does user have loadwb_old or loaddb already installed
(if (= #Has_loadwb_old 1) ; if loadwb_old exhists
(copyfiles
(source "C:LoadWB_old")
(dest "C:")
(newname "LoadWB")
)
)
)
;
; Procedure startup_options ;
;
(procedure startup_options
(set #Title_msg "Directory Opus 5 Startup Options.\n\n")
(if #DOpus_Dest
(
(find_startup)
(if ( = #Inst_choice 1)
(if (askbool (prompt #Title_msg
"Do you wish to change the\n"
" startup options for Opus 5.5?")
(help "If in doubt, then select \"Yes\"")
)
(set #Doit 1)
(set #Doit 0)
)
)
(if (OR (<> #Inst_choice 1) (= #Doit 1))
(
(set #Curr_choice 0)
;Get the users startup choices
(set #Mode (askchoice
(prompt #Title_msg
"Opus 5 can be started automatically when you"
" boot your computer. What do you wish to do?")
(help @askchoice-help )
(choices "Install Opus 5 as Workbench Replacement!" ;0
"Start Opus 5 on boot" ;1
"Start Opus 5 Iconified" ;2
"Do not start Directory Opus on boot" ;3
"No Change") ;4
(default #Curr_choice)
)
)
(if (<> #Mode 4) (set #Changed 1))
; use as wb replacement
(if (= #Mode 0)
(
; does user have loadwb_old or loaddb already installed
(if (= #Has_loadwb_old 0) ; if loadwb_old not exhist
(if (= #Has_loaddb 0) ; then is loadwb actually loaddb
(if (exists #Loadwb (noreq)) ; no. Good then does loadwb exhist?
(rename "c:LoadWB" "c:LoadWB_old") ; then rename it
)
)
)
; then copy our loaddb as loadWB
(copyfiles
(source (tackon #DOpus_Dest "c/LoadDB"))
(dest "C:")
(newname "LoadWB")
)
) ;else remove the loadDB
(if (AND (<> #Mode 4) (= #Has_loaddb 1)) (remove_wb))
)
; start on boot normal
(if (= #Mode 1)
(
(copyfiles
(source (tackon #DOpus_Dest "wbstartup/Opus5_Startup"))
(dest "SYS:WBStartup")
(infos)
)
(tooltype
(dest "SYS:WBStartup/Opus5_Startup")
(settooltype "CX_POPUP" "YES")
)
)
)
; start on iconified normal
(if (= #Mode 2)
(
(copyfiles
(source (tackon #DOpus_Dest "wbstartup/Opus5_Startup"))
(dest "SYS:WBStartup")
(infos)
)
(tooltype
(dest "SYS:WBStartup/Opus5_Startup")
(settooltype "CX_POPUP" "NO")
)
)
)
)
)
)
(message #Title_msg
"Woops Can't do this!\nDirectory Opus is not installed yet!")
)
)
; Procedure install_arcdir
; Part of Script to install ArcDir.dopus5 1.0.
; Developed by Edmund Vermeulen (edmundv@grafix.xs4all.nl).
;
(procedure install_arcdir
(set #Title_msg "ARexx ArcDir Installation.\n\n")
(if (askbool (prompt #Title_msg
"ArcDir was developed by Edmund Vermeulen.\n"
"It allows you to easily handle LHA, LZH,"
" and LZX files via Directory Opus 5\n"
"\n HIGHLY RECOMMENDED -Install it!\n\n"
"Do you wish to install the ARexx ArcDir"
" archive to your Opus 5 Directory?\n")
(help "Yes do it! It is great!")
)
(
(set #Changed 1)
(set #Want_disk 2)
(get_disk)
(if (> (+ (database "total-mem")) 1000000)
(
(working #Title_msg
"Copying Files.")
(copyfiles (source (tackon #Disk2_Name "ArcDir10.lha")) (dest "ram:"))
(set #SRC "ram:")
)
(set #SRC #Disk2_Name)
)
(working #Title_msg
"Dearchiving Arcdir installation.\n\n"
"This will be quicker...")
(run (cat "ram:lhex >NIL: <NIL: -qfw=ram: x "#SRC"ArcDir10.lha "))
(delete "ram:ArcDir10.lha" (safe))
(run "cd ram:arcdir")
; delete old stuff
(if (= (getversion "DOPUSDEST:ARexx/LhADir.dopus5") 65536)
(message #Title_msg
"Version 1.0 of LhADir.dopus5 detected!\n\n"
"Please note that ArcDir.dopus5 doesn't need any alterations "
"to the toolbar or any other buttons in Opus whatsoever.\n\n"
"You should remove all references to LhADir.dopus5. Copying "
"the default toolbar over your old toolbar will usually "
"accomplish this."
)
)
(if (= (exists "DOPUSDEST:ARexx/LhADir.dopus5" (noreq)) 1)
(if (askbool (prompt #Title_msg
"LhADir.dopus5 detected.\n\n"
"LhADir has been superseded by ArcDir and is not needed "
"any more. Is it okay to delete it?")
(help "Select 'Yes' to delete LhADir.dopus5 and related files "
"from your system or 'No' to leave them alone.")
)
( ;yes
(delete "DOPUSDEST:ARexx/LhADir.dopus5")
(delete "DOPUSDEST:ARexx/LhADir-handler")
(delete "DOPUSDEST:ARexx/NewLhA.dopus5")
(delete "DOPUSDEST:C/LhADirList")
(delete "Locale:Catalogs/nederlands/LhADir.catalog")
(delete "Locale:Catalogs/deutsch/LhADir.catalog")
(delete "Locale:Catalogs/français/LhADir.catalog")
(delete "Locale:Catalogs/norsk/LhADir.catalog")
(delete "DOPUSDEST:Buttons/LhADir Buttons")
(delete "DOPUSDEST:Buttons/toolbar_LhADir")
)
)
)
; ask questions first, copy files later
(set #Storeold
(if (askbool (prompt #Title_msg
"Any current filetypes for LHA and LZX will be will be overwritten. "
"Would you like to keep a safe copy of them in the "
"'DOpus5:Storage' drawer?\n\n"
"In case of an uninstallation these files will be reinstalled.")
(help "Select 'Yes' to copy the files 'LHA archive' and 'LZX archive' "
"from the 'DOpus5:Filetypes' drawer to the 'DOpus5:Storage' "
"drawer. If you select 'No', the current (default) filetypes for "
"LHA and LZX in the Storage drawer will be kept.\n\n"
"When doing an uninstallation, these filetypes will be "
"reinstalled from the Storage drawer to the Filetypes drawer. "
"You can accomplish an uninstallation by running this "
"installation script again.")
)
)
)
(set #how
(+
(askchoice
(prompt #Title_msg
"How would you like an archive to be listed when it "
"is double-clicked?")
(help @askchoice-help)
(choices
(cat #proprender "In a new lister (Browse).")
"In the same lister (GetDir)."
)
)
(* 2
(askchoice
(prompt #Title_msg
"What do you want to happen when you drag and drop "
"an archive in another lister?")
(help @askchoice-help)
(choices
(cat #proprender "Extract it (with LhA/LZX).")
"List it (with ArcDir)."
)
)
)
)
)
(set #Language
(if
(= (exists "ENV:Language" (noreq)) 1)
(getenv "Language")
""
)
)
(set #Catalogs
(askoptions
(prompt #Title_msg
"Which language catalog(s) do you want to install?\n"
"(English is built-in.)")
(help @askoptions-help)
(choices (cat #proprender "Nederlands") "Deutsch" "Français" "Norsk")
(default
(+
(= #Language "nederlands")
(* 2 (= #Language "deutsch"))
(* 4 (= #Language "français"))
(* 8 (= #Language "norsk"))
)
)
)
)
; copy the files
(copyfiles
(source "ram:ArcDir/ARexx")
(dest "DOPUSDEST:ARexx")
(pattern "#?")
(files)
)
(copyfiles
(source "ram:ArcDir/C")
(dest "DOPUSDEST:C")
(pattern "#?")
(files)
)
(set #Storedir
(if (= (exists "DOPUSDEST:Storage/Filetypes" (noreq)) 2)
("DOPUSDEST:Storage/Filetypes")
("DOPUSDEST:Storage")
)
)
(set #N 0)
(while
(set #Arctype (select #N "LHA" "LZX" ""))
(
(if #Storeold
(copyfiles
(source (cat "DOPUSDEST:Filetypes/" #Arctype " archive"))
(dest #Storedir)
)
)
(copyfiles
(source (select #how
(cat "ram:ArcDir/Filetypes/" #Arctype " archive")
(cat "ram:ArcDir/Storage/Filetypes/" #Arctype " archive_GetDir")
(cat "ram:ArcDir/Storage/Filetypes/" #Arctype " archive_Browse&DnD")
(cat "ram:ArcDir/Storage/Filetypes/" #Arctype " archive_GetDir&DnD")
)
)
(dest "DOPUSDEST:Filetypes")
(newname (cat #Arctype " archive"))
)
(set #N (+ #N 1))
)
)
(set #N 0)
(while
(set #Thiscat (select #N "nederlands" "deutsch" "français" "norsk" ""))
(
(if (in #Catalogs #N)
(copyfiles
(source (cat "ram:ArcDir/Locale/Catalogs/" #Thiscat "/ArcDir.catalog"))
(dest (cat "LOCALE:Catalogs/" #Thiscat))
)
)
(set #N (+ #N 1))
)
)
; Done
(message #Title_msg
"Installation Done!\n\n"
"To be able to use ArcDir.dopus5, ARexx needs to be activated "
"by running the RexxMast program from the System drawer.\n\n"
"You may uninstall ArcDir by running the installation script"
" from the ARCDir archive on the Opus 5.5 Extras Disk."
)
(run "cd ram:")
(run "delete ram:ArcDir#? all")
)
)
)
;
; Procedure install_complete ;
;
(procedure install_complete
(get_dir)
(signal_opus)
(install_core)
(install_support)
(install_arcdir)
(install_arexx)
(install_mwbextras)
(startup_options)
(do_startup)
)
;
; Real not procedure at last! ;
;
(while (
(set #Title_msg "Directory Opus 5 Installation.\n\n")
(set #Inst_choice
(askchoice
(prompt #Title_msg
"Please select one of following:-")
(help "Install Opus 5.5 "
"Installs or updates Opus 5.5 on"
" your hard disk, including program"
" and support files plus button banks,"
" filetypes, environments etc. NOTE: "
"Any old configuration items are saved first.\n\n"
"Install Opus 5.5 - Custom\n"
"Installs Opus 5.5 as above but allows"
" you to choose which parts to install.\n\n"
"Install ARexx ArcDir\n "
"Installs ArcDir\n\n"
"Install Additional MWB Extras\n"
"Installs the MagicWorkbench archive of"
" images, icons, buttons and other files"
" as supplied by Trevor Morris and Leo Davidson.\n\n"
"Change Opus Startup Options"
"Allows you to change the startup options for Opus 5.")
(choices
"Install or Update Opus 5.5 " ; 0
"Custom Install Opus 5.5 " ; 1
"Change Opus Startup Options" ; 2 only if 5.5 installed
"Done") ; 3
(default 3)
)
)
(<> #Inst_choice 3)
)
(select #Inst_choice
(install_complete) ;0
(install_complete) ;1
(startup_options) ;2
)
)
(if (= #Inst_core 1)
(message #Title_msg
"Serialise Directory Opus 5 \n"
"---------------------------\n"
"To protect your valuable investment in Opus 5 "
"and complete the installation procedure, you "
" SERIALISE your copy of Opus 5 with your details and "
" the registration number from your installation disk.\n\n"
"By the way, now is also a good time to complete"
" the registration card and return it to your local"
" distributor. Technical support and warranty will"
" only be honoured if a valid registration card has"
" been received.")
)
(if (= #Changed 1)
(message #Title_msg
"Directory Opus is now installed.\n\n"
"We suggest that you finish this Installer"
" script then remove all disks from floppy"
" drives and REBOOT your computer.")
)
;
;Please please ReadMe
;
(if (= #Changed 1)
(if (askbool (prompt #Title_msg
"All things change including software.\n\n"
"Any changes are noted in the ReadMe"
" file on the installation disk.\n\n"
"Do you wish to read the ReadMe file now?\n\n")
(help "go on, read it now.")
)
(if (> (run "Sys:Utilities/MultiView DOPUSDEST:ReadMe.55") 0)
(if (> (run "Sys:Utilities/AmigaGuide DOPUSDEST:ReadMe.55") 0)
(if (> (run "More DOPUSDEST:ReadMe.55") 0)
(
(set #Want_disk 1)
(get_disk)
(run "Opus55_Install:More DOPUSDEST:ReadMe.55")
)
)
)
)
)
)
(complete 100)
(delete "ram:lhex")
(exit "Directory Opus 5.5 Install script done!")