home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Studio16.Install 1.3 (14.12.93)
- ; Installer script for install Studio16 3.0
- ;
- ; USAGE: Installer Studio16.Install
- ;
-
- (complete 0)
-
- ;=============================================================================
- ; the name of the disk
- (set #s16-disk1-name "Studio16_1")
- (set #s16-disk2-name "Studio16_2")
-
- ;=============================================================================
- ; some other handy names
- (set #s16-app-name "Studio16 3.0")
- (set #s16-base-name "Studio16_3")
- (set #s16-base-dir "Studio16_3:")
- (set #s16-orig-base-name "Studio16")
-
- ;=============================================================================
- ; English strings
-
- (if (= @language "english")
- (
- (set #bad-kick
- (cat "You must be using Kickstart 2.04 or higher to install " #s16-app-name
- ))
-
- (set #confirm-target
- (cat "\n" #s16-app-name " appears to already be installed in \"%s\".\n\n"
- #s16-app-name " will now be installed on your hard drive.\n"
- "The previous version already present will be replaced. If applicable, "
- "certain files from previous releases will be deleted.\n\n"
- "Are you sure you want " #s16-app-name " installed in the \"%s\" drawer?"
- ))
-
- (set #confirm-target-help
- (cat "\nThe installer has determined that you may already have the " #s16-app-name " "
- "software installed on your system. If this is wrong or you want "
- "to install the new " #s16-app-name " software elsewhere, select \"NO\".\n\n"
- "If you want to proceed with the installation in \"%s\", select "
- "\"YES\". Proceeding with the installation will cause any " #s16-app-name " "
- "files in this drawer to be replaced with newer files.\n\n"
- "WARNING!: OBSOLETE FILES WILL BE DELETED."
- ))
-
- (set #confirm-copy-fastfilesys
- (cat "Copying new version of FastFileSystem to your L: drawer."
- ))
-
- (set #confirm-copy-fastfilesys-help
- (cat @copylib-help
- ))
-
- (set #confirm-copy-hdtoolbox
- (cat "Copy new version of HDToolBox to your SYS:Tools drawer."
- ))
-
- (set #confirm-copy-hdtoolbox-help
- (cat @copylib-help
- ))
-
-
- (set #which-disk
- (cat "Where should " #s16-app-name " be installed?\n"
- "(A new \"" #s16-base-name "\" drawer will be created)"
- ))
-
- (set #which-disk-help
- (cat "\nThis section lets you choose on which hard drive partition the "
- #s16-app-name " files will be installed. These should normally go in the "
- "same location as the current " #s16-app-name " files.\n\n"
- @askdir-help
- ))
-
-
- (set #ask-s16-disk
- (cat "\n\nPlease insert the \"%s\" disk in any floppy drive."
- ))
-
- (set #msg-send-reg-card
- (cat "\nNow would be a good time to fill out your registration card. "
- "This form must be mailed to receive software updates and technical support."
- ))
-
- (set #msg-no-cards
- (cat "\nI could not find any audio cards!\n"
- "Check Installation, or install card(s)."
- ))
-
- (set #msg-no-AD1012-handler
- (cat "\n" #s16-app-name " does not include the AD1012 handler.\n"
- ))
-
- (set #msg-num-cards
- (cat "\nI found%s.\n"
- "Is this correct?"
- ))
-
- (set #msg-num-cards-ad516 " %ld AD516")
- (set #msg-num-cards-ad1012 " %ld AD1012")
- (set #msg-num-cards-card " card")
- (set #msg-num-cards-cards " cards")
-
- (set #msg-fix-cards
- (cat "\nMake sure your audio cards are installed properly "
- "before installing " #s16-app-name "."
- ))
-
- (set #msg-update-old-version
- (cat "\nInstaller has found a copy of %s that may be obsolete.\n"
- "You may need to update to a later version of %s "
- "to work with " #s16-app-name ".\n"
- ))
-
-
- (set #msg-update-old-version
- (cat "\nInstaller has found a copy of %s that may be obsolete.\n"
- "You may need to update to a later version of %s "
- "to work with " #s16-app-name ".\n"
- ))
-
-
- (set #working-deletefiles
- (cat "\n\nRemoving obsolete files..."
- ))
-
- (set #working-movefiles
- (cat "\n\nMoving obsolete " #s16-app-name " files to OLD..."
- ))
-
- (set #working-copyfiles
- (cat "\n\nInstalling " #s16-app-name " files..."
- ))
-
- (set #working-startup
- (cat "\n\nUpdating S:User-Startup..."
- ))
-
- (set #startup-assign
- (cat "Assign " #s16-base-dir " \"%s\"\n"
- ))
-
- (set #startup-s16
- (cat "\n\nThe following lines need to be added to your User-Startup file:\n\n"
- #startup-assign
- ))
-
- (set #all-done
- (cat "\n" #s16-app-name " Installation completed."
- ))
-
- ))
-
-
- ;=============================================================================
- ; Procedure to copy the sound card handlers....
- ;
- ; put number of cards in 'num_cards'.
- ; put the handler file name in 'handler_name'
- ;
- (procedure copy_handlers
- (
- (if (> num_cards 0)
- (
- (set handler_src (tackon (tackon target "Dormant") handler_name))
- (set handler_dest (tackon target "Drivers"))
-
- (if (> num_cards 1)
- (
- (set handler_name (cat handler_name "%ld"))
-
- (set n 0)
- (while (< n num_cards)
- (
- (set n (+ n 1))
-
- (copyfiles (source handler_src)
- (dest handler_dest)
- (newname (handler_name n))
- (infos)
- )
- ))
-
- (delete handler_src)
- (delete (cat handler_src ".info"))
- )
- ; else
- (
- (set handler_dest (tackon handler_dest handler_name))
-
- (rename handler_src handler_dest)
- (rename (cat handler_src ".info") (cat handler_dest ".info"))
- ))
- ))
- ))
-
- ;=============================================================================
- ; procedure to call on exit...
-
- (procedure TERMINATE
- (makeassign "S16.1")
- (makeassign "S16.2")
- )
-
-
- ;=============================================================================
- ; termination stuff
-
- (onerror (TERMINATE))
-
-
- ;=============================================================================
- ; make sure we are running under V37 or higher...
-
- (if (< (/ (getversion) 65536) 37)
- (
- (abort #bad-kick)
- ))
-
-
- ;=============================================================================
- ; do a bit of set up...
-
- (delopts "oknodelete" "force" "askuser")
-
-
- ;=============================================================================
- ; Greetings...
-
- (welcome)
- (set old_level @user-level)
-
- ; We really want the questions to be asked...
- (user 2)
-
- ;=============================================================================
- ; Check for audio cards...
- ;
- ; We do this before we begin the installation...
- ;
- (set num_AD1012_cards 0)
- (set num_AD516_cards 0)
-
- (if (= (run ("ScanCard MANUFACTURER 2127 PRODUCT 1 ENVNAME num_cards") (safe)) 0)
- (
- (set num_AD1012_cards (+ (getenv "num_cards") 0))
- ))
-
- (if (= (run ("ScanCard MANUFACTURER 2127 PRODUCT 2 ENVNAME num_cards") (safe)) 0)
- (
- (set num_AD516_cards (+ (getenv "num_cards") 0))
- ))
-
- (run ("UnSetEnv num_cards") (safe))
-
- (if (> (+ num_AD1012_cards num_AD516_cards) 0)
- (
- (set card-txt "")
-
- (if (> num_AD1012_cards 0)
- (
- (set card-txt (cat card-txt (#msg-num-cards-ad1012 num_AD1012_cards)))
- ))
-
- (if (> num_AD516_cards 0)
- (
- (if card-txt
- (
- (set card-txt (cat card-txt " and"))
- ))
- (set card-txt (cat card-txt (#msg-num-cards-ad516 num_AD516_cards)))
- ))
-
- (if (> (+ num_AD1012_cards num_AD516_cards) 1)
- (
- (set card-txt (cat card-txt #msg-num-cards-cards))
- )
- ; else
- (
- (set card-txt (cat card-txt #msg-num-cards-card))
- ))
-
- (if (NOT (askbool (prompt (#msg-num-cards card-txt))
- (help @askbool-help)
- (default 1)
- )
- )
- (
- (abort #msg-fix-cards)
- ))
- )
- ;else
- (
- (abort #msg-no-cards)
- ))
-
- ;=============================================================================
- ; Let the user know that we don't work with AD1012 cards yet...
- (if (> num_AD1012_cards 0)
- (
- (if (> num_AD516_cards 0)
- (
- (message #msg-no-AD1012-handler)
- )
- ; else
- (
- (abort #msg-no-AD1012-handler)
- ))
- ))
-
- ;=============================================================================
- ; get target drawer where Studio16 is to be installed
-
- (set target (getassign #s16-base-dir "a"))
-
- (if target
- (
- (set target (pathonly target))
- )
- ;else
- (
- (set target @default-dest)
- ))
-
- (set ask_again TRUE)
-
- (while (= ask_again TRUE)
- (
- (set ask_again FALSE)
- (set virgin_install TRUE)
-
- (set target (askdir (prompt #which-disk)
- (help #which-disk-help)
- (default target)
- (disk)
- )
- )
-
- ; check if the user picked a "Studio16_3" drawer by accident.
- ;
- (if (patmatch #s16-base-name (fileonly target))
- (
- (set target (pathonly target))
- )
- ; else
- (
- ; check if the user picked a "Studio16" drawer by accident.
- ;
- (if (patmatch #s16-orig-base-name (fileonly target))
- (
- (set target (pathonly target))
- ))
- ))
-
- (if (exists (tackon target #s16-base-name))
- (
- (set virgin_install FALSE)
-
- (if (not (askbool (prompt (#confirm-target target target))
- (help (#confirm-target-help target))
- (default 1)
- )
- )
- (
- (set ask_again TRUE)
- ))
- )
- ; else
- (
- (makedir (tackon target #s16-base-name) (infos))
- ))
- ))
-
- (user old_level)
-
- (set target (tackon target #s16-base-name))
- (set @default-dest target)
-
- ;=============================================================================
- ; Delete any files that are obsolete now...
-
- (if (= virgin_install FALSE)
- (
- (working #working-deletefiles)
-
- (set n 0)
- (while (set oldfile (select n "0 DiskIO"
- "0 RealtimeDelay"
- "0 Transport"
- "0 OpenList"
- "0 MessageMonitor"
- "0 ModList"
- "0 AD516Handler"
- "0 AD1012Handler"
- "1 Drivers"
- "1 Config"
- "2 SMPTEOutput"
- ""
- )
- )
- (
- (set n (+ n 1))
-
- (set oldop (substr oldfile 0 1))
- (set oldfile (substr oldfile 2))
-
- (select (+ oldop 0)
-
- ; operation 0 - Delete from target/Apps,
- ; target/Drivers,
- ; target/Utilities,
- ; target/ProjectMenu,
- ; target/Dormant,
- (
- (set dircount 0)
- (while (set targetdir (select dircount "Apps"
- "Drivers"
- "Utilities"
- "ProjectMenu"
- "Dormant"
- ""
- )
- )
- (
- (set dircount (+ dircount 1))
-
- (if (exists (tackon (tackon target targetdir) oldfile))
- (
- (delete (tackon (tackon target targetdir) oldfile))
- (delete (cat (tackon (tackon target targetdir) oldfile) ".info"))
- ))
- ))
- )
-
- ; operation 1 - Copy to OLD/(drawer) from target/(drawer)
- ;
- (
- ; check if the 'oldfile' is actually a drawer...
- ;
- (if (= (exists (tackon target oldfile)) 2)
- (
- (set olddir (tackon target "OLD"))
-
- (if (NOT (exists olddir))
- (
- (makedir olddir)
- ))
-
- (if (NOT (exists (tackon olddir oldfile)))
- (
- (makedir (tackon olddir oldfile))
- ))
-
- (foreach (tackon target oldfile) "#?"
- (
- (copyfiles (source (tackon (tackon target oldfile) @each-name))
- (dest (tackon olddir oldfile))
- )
-
- (delete (tackon (tackon target oldfile) @each-name))
- ))
- ))
- )
-
- ; operation 2 - Check for target/Apps,
- ; target/Drivers,
- ; target/Utilities,
- ; target/ProjectMenu,
- ; target/Dormant,
- (
- (set dircount 0)
- (while (set targetdir (select dircount "Apps"
- "Drivers"
- "Utilities"
- "ProjectMenu"
- "Dormant"
- ""
- )
- )
- (
- (set dircount (+ dircount 1))
-
- (if (exists (tackon (tackon target targetdir) oldfile))
- (
- (message #msg-update-old-version oldfile oldfile)
- ))
- ))
- )
-
- )
- ))
-
- (complete 5)
- ))
-
- ;=============================================================================
- ; ask for Disk 1
-
- (askdisk (prompt (#ask-s16-disk #s16-disk1-name))
- (help @askdisk-help)
- (dest #s16-disk1-name)
- (newname "S16.1")
- )
-
- ;=============================================================================
- ; Now show the reg-card message and eventually collect the serial number
-
- (message #msg-send-reg-card)
-
-
- ;=============================================================================
- ; Now copy some files from Disk 1...
-
- (working #working-copyfiles)
-
- (copyfiles (source "S16.1:Studio16")
- (dest target)
- (all)
- )
-
- (copyfiles (source "S16.1:Studio16.info")
- (dest (pathonly target))
- (newname (cat #s16-base-name ".info"))
- )
-
- (copyfiles (source "S16.1:Read_Me")
- (dest target)
- (infos)
- )
-
- (complete 50)
-
- ;=============================================================================
- ; ask for Disk 2
-
- (askdisk (prompt (#ask-s16-disk #s16-disk2-name))
- (help @askdisk-help)
- (dest #s16-disk2-name)
- (newname "S16.2")
- )
-
- ;=============================================================================
- ; Now copy some files from Disk 2...
-
- (working #working-copyfiles)
-
- (copyfiles (source "S16.2:Studio16")
- (dest target)
- (all)
- )
-
- (complete 70)
-
- (copyfiles (source "S16.2:Extras")
- (dest (tackon target "Extras"))
- (pattern "~(#?.lha)")
- (files)
- (infos)
- )
-
- (complete 75)
-
- (copylib (prompt #confirm-copy-fastfilesys)
- (help #confirm-copy-fastfilesys-help)
- (source "S16.2:Extras/L/FastFileSystem")
- (dest "L:")
- (confirm)
- (optional)
- )
-
- (copylib (prompt #confirm-copy-hdtoolbox)
- (help #confirm-copy-hdtoolbox-help)
- (source "S16.2:Extras/Tools/HDToolBox")
- (dest "SYS:Tools")
- (confirm)
- (optional)
- (infos)
- )
-
- (complete 80)
-
- ;=============================================================================
- ; Install the AD1012 handlers... (don't have an AD1012 handler yet...)
- ;
- ;(set num_cards num_AD1012_cards)
- ;(set handler_name "AD1012Handler")
- ;(copy_handlers)
- ;
- ;(complete 85)
-
- ;=============================================================================
- ; Install the AD516 handlers...
-
- (set num_cards num_AD516_cards)
- (set handler_name "AD516Handler")
- (copy_handlers)
-
- (complete 90)
-
- ;=============================================================================
- ; update startup-sequence
-
- (working #working-startup)
-
- (startup @app-name (prompt (#startup-s16 ("%s" target) start-options))
- (help @startup-help)
- (command (#startup-assign target))
- )
-
- ; Make the assignment so the user doesn't have to reboot...
- ;
- (makeassign #s16-base-name target)
- (run "avail flush")
-
- (complete 100)
-
- ;=============================================================================
- ; "END OF LINE."
- ;
- (TERMINATE)
-
- (exit #all-done)
-
-