home *** CD-ROM | disk | FTP | other *** search
- ;*************************************************************************
- ; Title:
- ; Install-ToFloppy20
- ;*************************************************************************
- ; Description:
- ; The Commodore Installer Script for updating CanDo 2.0 diskettes to
- ; use OS2.0
- ;*************************************************************************
- ; Author:
- ; Eddie Churchill, c/o INOVAtronics, Inc.
- ;*************************************************************************
- ; Still to do:
- ;*************************************************************************
- ; History:
- ; 14:26:05 CST, 27 Jan 1992
- ; Finished
- ; 21:45:12 CST, 21 Jan 1992
- ; Created from Install-CanDo
- ;*************************************************************************
-
-
- ;******************************************************
- ;***** 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 resident_candolib (getversion "cando.library" (resident)))
- (set ntsc_mode false)
- (set pal_mode true)
- (set free-mem (+ (database "total-mem") 0)) ; leftover free ram
-
- ; set up our delete options
- (delopts "AskUser" "OkNoDelete" "Force")
-
- ; some useful procedures
-
- ; some overused strings
- (set omp (cat "One moment please..." newline))
- (set pci "Patching the copied icons.")
-
- ; a general purpose global error trapper
- (onerror
- (makeassign "Workbench_Master" (safe))
- (makeassign "CanDoProgram_Master" (safe))
- )
-
-
- ;****************************************
- ;***** FIGURE OUT WHERE STUFF GOES ******
- ;****************************************
-
- ; introduce our selfs to the viewers
- (welcome "Welcome to the CanDo 2.00 boot disk update program. This program 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 newline
- )
-
- ;*******************************************
- ;***** GET CANDO PROGRAM DISK IN HERE ******
- ;*******************************************
-
- ; ask for the first disk, it should be here but lets check anyway
- (askdisk
- (prompt "Please insert the disk labeled " quote "CanDo Program" quote ".")
- (help "The CanDo Program disk contains 1.3 system software.")
- (dest "CanDo")
- (newname "CanDoProgram_Master")
- )
-
- ; tell the user of our progress
- (complete 5)
-
- ; make sure that default-dir is pointing to the right place
- (set @default-dest "CanDo:")
-
-
- ;***************************************
- ;***** GET WORKBENCH DISK IN HERE ******
- ;***************************************
-
- ; ask for the workbench disk.
- (askdisk
- (prompt "Please insert the 2.0x " quote "Workbench" quote
- " disk into your other diskdrive."
- )
- (help "The Workbench disk contains 2.0x system software.")
- (dest "Workbench")
- (newname "Workbench_Master")
- )
-
- ; tell the user of our progress
- (complete 10)
-
-
- ;*******************************
- ;***** UPDATE C: DIRECTORY *****
- ;*******************************
-
- ; first copy over the new c: stuff
- (working omp "Scanning for new C: files on Workbench.")
-
- (copyfiles
- (prompt "Copying 2.0x Workbench's C: files needed by CanDo")
- (help "This will copy various C: files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:C")
- (dest "CanDo:C")
- ; files needed "AddBuffers,Assign,BindDrivers,Copy,Delete,
- ; Dir,Execute,List,LoadWB,SetPatch"
- (pattern "(AddB|Ass|BindD|Copy|Del|Dir|Exec|List|LoadWB|SetPatch)#?")
- (files)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 15)
-
- ; then copy over additional files
- (working omp "Scanning for additional C: files on Workbench.")
-
- (copyfiles
- (prompt "Copying additional 2.0x Workbench's C: files needed by CanDo")
- (help "This will copy various C: files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:C")
- (dest "CanDo:C")
- ; files needed "Version|SetClock|MakeDir|IPrefs|Wait
- (pattern "(Vers|SetClock|MakeDir|IPrefs|Wait)#?")
- (files)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 20)
-
- ; delete out of date stuff
- (working omp "Deleting some out of date C: files from the CanDo Program disk.")
-
- ; files to be deleted "CD,Echo,EndCli,FF,NewCLI,Path,Run,Stack"
- (delete "CanDo:C/CD")
- (delete "CanDo:C/Echo")
- (delete "CanDo:C/EndCLI")
- (delete "CanDo:C/FF")
- (delete "CanDo:C/NewCLI")
- (delete "CanDo:C/Path")
- (delete "CanDo:C/Run")
- (delete "CanDo:C/Stack")
-
- ; tell the user of our progress
- (complete 25)
-
-
- ;**********************************
- ;***** UPDATE DEVS: DIRECTORY *****
- ;**********************************
-
- ; first copy over the new devs: stuff
- (working omp "Scanning for new Devs: files on Workbench.")
-
- (copyfiles
- (prompt "Copying 2.0x Workbench's Devs: files needed by CanDo")
- (help "This will copy various Devs: files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:Devs")
- (dest "CanDo:Devs")
- ; files needed "MountList, Parallel.Device, Printer.Device,
- ; Serial.Device and System-Configuration
- (pattern "(Mount|Parall|Printer|Serial|System-Con)#?")
- (files)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 30)
-
- ; delete out of date stuff
- (working omp "Deleting some out of date Devs: files from the CanDo Program disk.")
-
- ; first the usa1 keymap
- (delete "CanDo:Devs/KeyMaps/usa1")
-
- ; second the clipboard directory
- (delete "CanDo:ClipBoards")
-
- ; tell the user of our progress
- (complete 35)
-
-
- ;*******************************
- ;***** UPDATE L: DIRECTORY *****
- ;*******************************
-
- ; first copy over the new l: stuff
- (working omp "Scanning for new L: files on Workbench.")
-
- (copyfiles
- (prompt "Copying 2.0x Workbench's L: files needed by CanDo")
- (help "This will copy various L: files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:L")
- (dest "CanDo:L")
- ; files needed "Port-Handler"
- (pattern "Port-Handler")
- (files)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 40)
-
- ; delete out of date stuff
- (working omp "Deleting some out of date L: files from the CanDo Program disk.")
-
- ; handlers "Disk-Validator, FastFileSystem, Ram-Handler"
- (delete "CanDo:L/Disk-Validator")
- (delete "CanDo:L/FastFileSystem")
- (delete "CanDo:L/Ram-Handler")
-
- ; tell the user of our progress
- (complete 45)
-
-
- ;**********************************
- ;***** UPDATE LIBS: DIRECTORY *****
- ;**********************************
-
- ; first copy over the new libs: stuff
- (working omp "Scanning for new Libs: files on Workbench.")
-
- (copyfiles
- (prompt "Copying 2.0x Workbench's Libs: files needed by CanDo")
- (help "This will copy various Libs: files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:Libs")
- (dest "CanDo:Libs")
- ; files needed "DiskFont.Library, Version.Library, MathTrans.Library,
- ; MathIEEEDoubBas.Library, MathIEEEDoubTrans.Library,
- ; IffParse and ASL"
- (pattern "(DiskF|Vers|MathTr|MathIEEEDoub|Iff|Asl)#?")
- (files)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 50)
-
- ; delete out of date stuff
- (working omp "Deleting some out of date Libs: files from the CanDo Program disk.")
-
- ; libraries "Icon.Library, Info.Library"
- (delete "CanDo:Libs/Icon.Library")
- (delete "CanDo:Libs/Info.Library")
-
- ; tell the user of our progress
- (complete 55)
-
-
- ;************************************
- ;***** UPDATE SYSTEM: DIRECTORY *****
- ;************************************
-
- ; first copy over the new sys:system stuff
- (working omp "Scanning for new System files on Workbench.")
-
- (copyfiles
- (prompt "Copying 2.0x Workbench's System files needed by CanDo")
- (help "This will copy various System files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:System")
- (dest "CanDo:System")
- ; files needed "CLI, DiskCopy, Format, BindMonitor"
- (pattern "(CLI|DiskCopy|Format|BindMonitor)")
- (infos)
- (files)
- (confirm)
- )
-
- ; tell the user of our progress
- (complete 60)
-
- ; delete out of date stuff
- (working omp "Deleting some out of date System files from the CanDo Program disk.")
-
- ; file "SetMap" and its icon
- (delete "CanDo:System/SetMap")
- (delete "CanDo:System/SetMap.info")
-
- ; tell the user of our progress
- (complete 65)
-
-
- ;*******************************************
- ;***** CREATE/COPY WBSTARTUP DIRECTORY *****
- ;*******************************************
-
- ; create the initial directory
- (working omp "Creating WBStartup on the CanDo Program disk.")
-
- ; create the wbstartup directory
- (makedir "CanDo:WBStartup"
- (infos)
- )
-
- ; tell the user of our progress
- (complete 70)
-
-
- ;****************************************
- ;***** CREATE/COPY ENVARC DIRECTORY *****
- ;****************************************
-
- ; create the initial directory
- (working omp "Creating default ENVARC drawer on the CanDo Program disk.")
-
- ; create the prefs directory
- (makedir "CanDo:Prefs"
- (infos)
- )
-
- ; tell the user of our progress
- (complete 75)
-
- ; make presets and Env-Archive drawers
- (set env_dir NOPE)
- (if (= (exists "CanDo:Prefs") is_a_dir)
- (
- (copyfiles
- (prompt "Copying 2.0x Workbench preference files needed by CanDo")
- (help "This will copy various preference files to the CanDo Program disk."
- newline
- newline
- @copyfiles-help
- )
- (source "Workbench_Master:Prefs")
- (dest "CanDo:Prefs")
- ; directories needed "Presets and Env-Archive"
- (pattern "(Presets|Env-Archive)")
- (infos)
- (confirm)
- )
- (if (= (exists "CanDo:Prefs/Env-Archive") is_a_dir)
- (set env_dir YES)
- )
- )
- )
-
- ; tell the user of our progress
- (complete 80)
-
-
- ;*******************************
- ;***** UPDATE S: DIRECTORY *****
- ;*******************************
-
- ; delete out of date stuff
- (working omp "Updating S: files on the CanDo Program disk.")
-
- ; rename file "Startup-Sequence"
- (rename "CanDo:S/Startup-Sequence" "CanDo:S/Orig-Startup-Sequence")
-
- ; tell the user of our progress
- (complete 85)
-
- ; create a new Startup-Sequence
- (working omp "Creating a new Startup-Sequence file.")
-
- (set temp
- (cat
- "Version >NIL:" newline
- "FailAt 21" newline
- "SetClock >NIL: load" newline
- )
- )
-
- (if (= env_dir YES)
- (set temp
- (cat
- temp
- "Copy >NIL: ENVARC: ram:env all quiet noreq" newline
- )
- )
- )
-
- (set temp
- (cat
- temp
- "MakeDir ram:T ram:ClipBoards" newline
- "Assign T: Ram:T ;set up T: directory for scripts" newline
- "Assign CLIPS: Ram:ClipBoards" newline
- "If Exists Sys:Monitors" newline
- " List >T:mon-start Sys:Monitors/~#?.info lformat=\"Run >NIL: %s%s\"" newline
- " Execute T:mon-start" newline
- "EndIf" newline
- "Assign ENV: Ram:Env" newline
- "Run >NIL: IPrefs >NIL:" newline
- "Wait >NIL: 5" newline
- "AddBuffers >NIL: DF0: 15" newline
- "Echo \"CanDo Workbench Disk. 2.0 Release Version $Workbench\"" newline
- "BindDrivers" newline
- "SetEnv Workbench $Workbench" newline
- "SetEnv Kickstart $Kickstart" newline
- "Resident c:Execute pure add" newline
- "Resident c:List pure add" newline
- "Resident c:Assign pure add" newline
- "Path Ram: C: Sys:Utilities Sys:System S: add" newline
- "If Exists S:User-Startup" newline
- " Execute S:User-Startup" newline
- "EndIf" newline
- "LoadWB" newline
- "EndCli >NIL:" newline
- )
- )
- (textfile (dest "CanDo:S/Startup-Sequence")
- (append temp)
- )
-
- ; tell the user of our progress
- (complete 90)
-
-
- ;***************************************
- ;***** MAKE CANDO DISK A BOOT DISK *****
- ;***************************************
-
- ; we don't know which disk cando is in so we cannot make it a 2.0 boot disk
- ; (working omp "Installing 2.0 BootBlock on CanDo disk.")
- ;
- ; (set cando_device (figureout cando device))
- ; (run "Workbench_Master:C/Install "||cando_device)
-
- (complete 95)
-
- ;*****************************
- ;***** WE BE ALMOST DONE *****
- ;*****************************
-
- ; make sure that default-dir is pointing to the right place
- (set @default-dest "CanDo:")
-
- ; unmake those three assignments
- (makeassign "Workbench_Master" (safe))
- (makeassign "CanDoProgram_Master" (safe))
-
- ; tell the user of our progress
- (complete 100)
-
- ; final message for our viewers
- (exit "The CanDo boot disk has now been updated to Workbench 2.0x.") ; altspace in name
-