home *** CD-ROM | disk | FTP | other *** search
- ;*************************************************************************
- ; Title:
- ; Install-Opus
- ;*************************************************************************
- ; Description:
- ; The Commodore Installer Script for Opus 4.1 Software
- ;*************************************************************************
- ; Author:
- ; Eddie Churchill, c/o INOVAtronics, Inc.
- ;*************************************************************************
- ; Still to do:
- ;*************************************************************************
- ; History:
- ; 05-Jun-93
- ; Simply clean up
- ; 10-Feb-93
- ; Removed nasty words, bad eddie
- ; 25-Jan-93
- ; Removed the "Run >Nil: <Nil:" from the user-startup
- ; 08-Jan-93
- ; Added some additional removal code for Sys:ConfigOpus & ConfigOpus
- ; 08-Dec-92
- ; Rewritting script for DirectoryOpus
- ;*************************************************************************
-
- ; BEWARE OF ALTSPACES IN TEXT Directory Opus
-
- ;******************************************************
- ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
- ;******************************************************
-
- ; some useful variables
- (set true 1)
- (set false 0)
- (set on true)
- (set off false)
- (set yes true)
- (set no false)
- (set yep yes)
- (set nope no)
- (set is_a_file 1)
- (set is_a_dir 2)
- (set quote "\"")
- (set newline "\n")
- (set nothing "")
- (set testing nope)
- ; (set testing yep) ;<- uncomment this for testing mode
- (set os2 (< 2293760 (getversion "exec.library" (resident)))) ; true if under 2.0
-
- ; set up our delete options
- (delopts "AskUser" "OkNoDelete" "Force")
-
- ; some useful procedures
- ; change userlevel to expert
- (procedure expert_level
- (
- (user 2)
- )
- )
-
- ; reset userlevel back to default
- (procedure default_level
- (
- (user default-level)
- )
- )
-
- ; store off userlevel
- (procedure save_default_level
- (
- (set default-level @user-level)
- )
- )
-
- ; some overused strings
- (set omp (cat "One moment please..." newline))
-
- ; a general purpose global error trapper
- (onerror
- (makeassign "DOpus_Master" (safe))
- )
-
-
- ; introduce ourselfs to the viewers
- (welcome "Welcome to the Directory Opus v4.1 installer. This installer uses "
- "the Commodore Amiga Installer. All of our future new products "
- "will be using this installer and we would love to get any feedback "
- "that might help in improving the installation procedure." newline
- )
-
- ; first reset the user level so that the novice can see whats going on
- (save_default_level)
- (expert_level)
-
- ; what type of install is this going to be?
- (if
- (askbool
- (prompt "How do you want to install?")
- (help @askbool-help)
- (choices "To your HardDrive" "To your boot floppy")
- )
- (
- ; hard drive part
-
- ;****************************************
- ;***** FIGURE OUT WHERE STUFF GOES ******
- ;****************************************
-
- ; now figure out the initial defaults for a bunch of things
- ; @default-dest is already set for us
- (set DOpus_Dir (getassign "DOpus"))
-
- ; see if we are doing an update
- (if (<> DOpus_Dir nothing)
- (if (askbool
- (prompt "There seems to be a Directory Opus already installed in"
- " your drawer named " quote DOpus_Dir quote ". "
- "Do you want the install Directory Opus v4.1 over it?")
- (help
- "The installer has determined that you may already have a "
- "copy of Directory Opus 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)
- )
- ( ; the then clause
- (set is_update true) ; hey, the user said yes
- )
- ( ; the else clause
- (set is_update false) ; hey, the user said nope
- (set DOpus_Dir
- (askdir
- (prompt "Where would you like Opus installed?")
- (help @askdir-help)
- (default @default-dest)
- (newpath)
- )
- )
- )
- )
- )
-
- ; if DOpus_Dir is still nothing then where do they want it?
- (if (= DOpus_Dir nothing)
- (set DOpus_Dir
- (askdir
- (prompt "Where would you like Opus installed?")
- (help @askdir-help)
- (default @default-dest)
- (newpath)
- )
- )
- )
-
- ; before we go on lets reset the user's level back to what it was
- (default_level)
-
- ; verify that the Opus directory exists
- (if (<> (exists DOpus_Dir) is_a_dir)
- (makedir DOpus_Dir
- (prompt
- "The directory you have selected for Directory Opus v4.1 does not "
- "seem to exist. Do you want us to create it for you?"
- )
- (help @makedir-help)
- (infos)
- (confirm)
- )
- )
-
-
- ;***********************************
- ;***** GET FIRST DISK IN HERE ******
- ;***********************************
-
- ; ask for the first disk, it should be here but lets check anyway
- (askdisk
- (prompt "Please insert the disk labeled \"Opus Program\".")
- (help "The Directory Opus v4.1 program disk contains the main Directory Opus program and support files")
- (dest "DOpus")
- (newname "DOpus_Master")
- )
-
- ; tell the user of our progress
- (complete 10)
-
-
- ; clean up after Directory Opus v3.41
-
- ; Delete S:DirectoryOpus.HLP
- (set temp_file "S:DirectoryOpus.HLP")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 15)
-
- ; Delete C:DOpusRT
- (set temp_file "C:DOpusRT")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 20)
-
- ; Delete C:ConfigOpus
- (set temp_file "C:ConfigOpus")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 22)
-
- ; Delete Sys:ConfigOpus
- (set temp_file "Sys:ConfigOpus")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 23)
-
- ; Delete ConfigOpus
- (set temp_file "ConfigOpus")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 25)
-
- ; Delete Libs:Dopus.Library
- (set temp_file "Libs:Dopus.Library")
- (if (= (exists temp_file) is_a_file)
- (
- (set libraryexisted yes)
- (delete temp_file)
- )
- )
-
- (set temp_file (tackon DOpus_Dir "Libs/DOpus.Library"))
- (if (= (exists temp_file) is_a_file)
- (
- (set libraryexisted yes)
- )
- )
-
- ;****************************************
- ;***** COPY OVER FIRST DISK'S STUFF *****
- ;****************************************
-
- ; first copy over the stuff
- (working omp "Scanning Directory Opus v4.1's disk for files.")
-
- (set DOpus_Dir
- (copyfiles
- (prompt "Copying files needed by Opus")
- (help "This will copy the program and support files needed by Directory Opus v4.1"
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:")
- (dest DOpus_dir)
- (pattern "(C|Libs|Modules|S|DirectoryOpus|ReadMe.Doc)")
- (infos)
- (confirm)
- )
- )
-
-
- ; tell the user of our progress
- (complete 60)
-
- ; verify that directory opus made it over there
- (if (= (exists (tackon dopus_dir "DirectoryOpus")) is_a_file)
- (set dopus_exists yes)
- (set dopus_exists no)
- )
-
-
- ; tell the user of our progress
- (complete 65)
-
- ; only the next stuff if dopus got copied
- (if (= dopus_exists yes)
- (
-
- ; reset the user level so that the novice can see whats going on
- (save_default_level)
- (expert_level)
-
-
- ; ask the user if they want directory opus auto-started when they boot
- (set startup_mode (askchoice
- (prompt "What do you want to do when your machine starts up?")
- (help
- "The installer can adjust your startup to include the commands needed "
- "to automatically startup Directory Opus when your machine starts up."
- newline
- @askchoice-help
- )
- (choices "Do not auto-start Directory Opus" "Startup Directory Opus" "Startup Directory Opus Iconified")
- (default 0)
- )
- )
-
-
- ; tell the user of our progress
- (complete 90)
-
- ; now figure out the addition to the user-startup
- (set user_script
- (cat "ASSIGN DOpus: " quote DOpus_dir quote newline)
- )
-
- ; startup directory opus
- (if (= startup_mode 1)
- (set user_script
- (cat user_script
- "Stack 20480" newline
- "DOpus:DirectoryOpus" newline
- )
- )
- )
-
- ; startup directory opus in ICONIFIED mode
- (if (= startup_mode 2)
- (set user_script
- (cat user_script
- "Stack 20480" newline
- "DOpus:DirectoryOpus -i" newline
- )
- )
- )
-
-
- ; modify S:User-Startup
- (working omp "Updating S:User-Startup.")
-
- (startup "DOpus"
- (prompt
- "These instructions need to be added to the \"S:User-Startup\" "
- "so that your system will be properly configured to use Directory Opus v4.1."
- newline
- newline
- user_script
- )
- (help @startup-help)
- (command user_script)
- )
- )
- )
-
- ; tell the user of our progress
- (complete 100)
-
-
- ;*****************************
- ;***** WE BE ALMOST DONE *****
- ;*****************************
-
- ; make sure that default-dir is pointing to the right place
- (set @default-dest DOpus_Dir)
- )
- (
- ; onto the floppy version
- ;****************************************
- ;***** FIGURE OUT WHERE STUFF GOES ******
- ;****************************************
-
- ; where to go?
- (set @default-dest "Sys:")
-
- ; get the free space from the SYS: diskette
- (set sys_free (getdiskspace "Sys:"))
- (set sys_free (/ sys_free 1024))
- (set space_used 0)
-
- ; now figure out what the user wants to copy?
- (set first_choice
- (askoptions
- (prompt "Your boot diskette has " sys_free " kilobytes free." newline "What do you want to install?")
- (help "Becareful not to select too much stuff.")
- (choices
- "DirectoryOpus (275k)"
- "Important Stuff (103k)"
- " DOpusRT (6k)"
- " DOpus.Library (65k)"
- " DirectoryOpus Help (32k)"
- )
- (default 3)
- )
- )
-
- ; figure out how much space will used
- ; opus is to be copied
- (if (bitand first_choice 1)
- (set sys_free (- sys_free 260))
- )
-
- ; important stuff to be copied
- (if (bitand first_choice 2)
- (set sys_free (- sys_free 103))
- (
- ; else is DOpusRT to be copied?
- (if (bitand first_choice 4)
- (set sys_free (- sys_free 6))
- )
- ; Dopus.library to be copied?
- (if (bitand first_choice 8)
- (set sys_free (- sys_free 65))
- )
- ; DOpus Helpfiles to be copied?
- (if (bitand first_choice 16)
- (set sys_free (- sys_free 32))
- )
- )
- )
-
-
- ; if there is room then ask about these items
- (if (> sys_free 0)
- (set second_choice
- (askoptions
- (prompt "Your boot diskette has " sys_free " kilobytes free." newline "What do you want to install?")
- (help "Becareful not to select too much stuff.")
- (choices
- "Extra Libraries (45k)"
- " PowerPacker.Library (10k)"
- " InovaMusic.Library (35k)"
- "All Modules (225k)"
- " ConfigOpus (150k)"
- " DiskUtilities (30k)"
- " PrintUtilities (30k)"
- " IconViewer (15k)"
- )
- (default 9)
- )
- )
- (set second_choice 0)
- )
-
- ; before we go on lets reset the user's level back to what it was
- (default_level)
-
-
- ;***********************************
- ;***** GET FIRST DISK IN HERE ******
- ;***********************************
-
- ; ask for the first disk, it should be here but lets check anyway
- (askdisk
- (prompt "Please insert the disk labeled \"Opus Program\".")
- (help "The Directory Opus v4.1 program disk contains the main Directory Opus program and support files")
- (dest "DOpus")
- (newname "DOpus_Master")
- )
-
- ; tell the user of our progress
- (complete 5)
-
- ; clean up after Directory Opus v3.41
- ; Delete S:DirectoryOpus.HLP
- (set temp_file "S:DirectoryOpus.HLP")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 10)
-
- ; Delete C:DOpusRT
- (set temp_file "C:DOpusRT")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 15)
-
- ; Delete C:ConfigOpus
- (set temp_file "C:ConfigOpus")
- (if (= (exists temp_file) is_a_file)
- (delete temp_file)
- )
-
- ; tell the user of our progress
- (complete 20)
-
- ; Delete Libs:Dopus.Library
- (set temp_file "Libs:Dopus.Library")
- (if (= (exists temp_file) is_a_file)
- (
- (set libraryexisted yes)
- (delete temp_file)
- )
- )
-
-
- (set temp_file (tackon DOpus_Dir "Libs/DOpus.Library"))
- (if (= (exists temp_file) is_a_file)
- (
- (set libraryexisted yes)
- )
- )
-
- ; now copy over directory opus if requested
- (if (bitand first_choice 1)
- (copyfiles
- (prompt "Copying Directory Opus v4.1 to your bootfloppy")
- (help "This will copy Directory Opus v4.1 to your boot diskette."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:")
- (dest @default-dest)
- (choices "DirectoryOpus")
- (infos)
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 30)
-
- ; did they select all important stuff?
- (if (bitand first_choice 2)
- (set first_choice 28)
- )
-
- ; see if we are supposed to copy DOpusRT
- (if (bitand first_choice 4)
- (copyfiles
- (prompt "Copying the DOPusRT program to your bootfloppy")
- (help "This program lets Directory Opus v4.1 launch other applications."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:C")
- (dest (tackon @default-dest "C"))
- (choices "DOpusRT")
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 35)
-
- ; see if we are supposed to copy DOpus.Library
- (if (bitand first_choice 8)
- (copylib
- (prompt "Copying the DOpus.Library to your bootfloppy")
- (help "This is a support library for Directory Opus v4.1."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Libs/DOpus.Library")
- (dest (tackon @default-dest "Libs"))
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 45)
-
- ; see if we are supposed to copy DirectoryOpus.HLP
- (if (bitand first_choice 16)
- (copyfiles
- (prompt "Copying Directory Opus v4.1's help files to your bootfloppy")
- (help "This file contains help information about Directory Opus v4.1."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:S")
- (dest (tackon @default-dest "S"))
- (choices "DirectoryOpus.HLP")
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 50)
-
- ; break up the second_choice
- (set xlibs_choice (bitand second_choice 7))
- (set mods_choice (bitand second_choice 248))
-
- ; Is all extralibs selected?
- (if (bitand xlibs_choice 1)
- (set xlibs_choice 6)
- )
-
- ; see if we are supposed to copy PowerPacker.library
- (if (bitand xlibs_choice 2)
- (copylib
- (prompt "Copying the PowerPacker.Library to your bootfloppy")
- (help "This is a support library for Directory Opus v4.1."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Libs/PowerPacker.Library")
- (dest (tackon @default-dest "Libs"))
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 55)
-
- ; see if we are supposed to copy InovaMusic.library
- (if (bitand xlibs_choice 4)
- (copylib
- (prompt "Copying the InovaMusic.Library to your bootfloppy")
- (help "This is a support library for Directory Opus v4.1."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Libs/InovaMusic.Library")
- (dest (tackon @default-dest "Libs"))
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 60)
-
- ; did they select all modules
- (if (bitand mods_choice 8)
- (set mods_choice 240)
- )
-
- ; see if we are supposed to copy ConfigOpus
- (if (bitand mods_choice 16)
- (
- ; first copy the program
- (copyfiles
- (prompt "Copying the ConfigOpus program to your bootfloppy")
- (help "This program lets you configure Directory Opus v4.1."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Modules")
- (dest @default-dest)
- (choices "ConfigOpus")
- (infos)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 65)
-
- ; second ask about the help file
- (copyfiles
- (prompt "Do you want to copy the ConfigOpus help file to your bootfloppy?")
- (help "This is the help file for ConfigOpus."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:S")
- (dest (tackon @default-dest "S"))
- (choices "ConfigOpus.HLP")
- (confirm)
- )
- )
- )
-
- ; tell the user of our progress
- (complete 70)
-
- ; see if we are supposed to copy Disk utilities
- (if (bitand mods_choice 32)
- ; first copy the program
- (copyfiles
- (prompt "Copying the Disk Utilities to your bootfloppy")
- (help "This program lets Directory Opus v4.1 manipulate diskettes."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Modules")
- (dest (tackon @default-dest "C"))
- (choices "DOpus_Disk")
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 80)
-
- ; see if we are supposed to copy print utilities
- (if (bitand mods_choice 64)
- ; first copy the program
- (copyfiles
- (prompt "Copying the Print Utilities to your bootfloppy")
- (help "This program lets Directory Opus v4.1 print files."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Modules")
- (dest (tackon @default-dest "C"))
- (choices "DOpus_Print")
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 90)
-
- ; see if we are supposed to copy icon utilities
- (if (bitand mods_choice 128)
- ; first copy the program
- (copyfiles
- (prompt "Copying the Icon Utilities to your bootfloppy")
- (help "This program lets Directory Opus v4.1 manipulate icons."
- newline
- @copyfiles-help
- )
- (source "DOpus_Master:Modules")
- (dest (tackon @default-dest "C"))
- (choices "DOpus_Icon")
- (confirm)
- )
- )
-
- ; tell the user of our progress
- (complete 100)
- )
- )
-
- ; unmake the assignment
- (makeassign "DOpus_Master" (safe))
-
- ; final message for our viewers
- ; well either way we want to say this
- (set end_text "Well thats it folks, have a fun time with Directory Opus v4.1.")
-
- ; did the library already exist?
- (if libraryexisted
- (set end_text (cat end_text newline "Since you already had the library installed you will have to reboot your system."))
- )
-
- ; now for the real exit
- (exit end_text)
-