home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
comm
/
mail
/
thor
/
updatethor
< prev
next >
Wrap
Text File
|
1994-04-18
|
14KB
|
581 lines
;*************************************************************************
; Title:
; Install-Thor
;*************************************************************************
; Description:
; Commodore Installer Script for the Thor software
;*************************************************************************
; Author:
; Øyvind Ellefsen
;*************************************************************************
; Still to do:
;
;*************************************************************************
; History:
; 4/8-93 - First tries. Ver 00
; 4/8-93 - Working version. Copying files&stuff.
; 5/8-93 - Asking for install from disk
; 7/8-93 - What's up? New beta.. Shit!
; 5/9-93 - Ok. Final effort..
; 21/9-93 - Changes Changes...
; 23/9-93 - Removed beta-strings. Polished help-texts. Release Ver.
; 7/10-93 - Added Reqtools.library install.
; 10/10-93 - Convert, ChoiceType, User-startup, CheckForThor
; 12/10-93 - Assign-handling
; 13/10-93 - Custom ReqTools.library install
; 14/10-93 - Device/Volume check
; 1/11-93 - Added some CfgArchivers stuff (some bugs too)
; 4/11-93 - Removed bugs
; 5/1-94 - Optimized a little. More BBSTypes.
; 9/1-94 - Added Hippo types, and convert option.
; 20/2-94 - Thor files is now packed with lha
;
;Changes made by Petter Nilsen:
;
; 3/3-94 - Will no longer ask for to convert of the database on a
; first time install.
; - Will flush library before running "basemanager"
; - Better check for if THOR is already installed.
; (checks for "THOR:libs/bbsread.library" and not
; "THOR:THOR")
; - Uses LhX for un-archiving
; - Made all library-names lower case
; 4/3-94 - Added code to copy the keyfile (if available) to THOR:
;*************************************************************************
;
;******************************************************
;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
;******************************************************
; some useful variables
(set true 1)
(set false 0)
(set yes true)
(set no false)
(set is_a_file 1)
(set is_a_dir 2)
(set quote "\"")
(set newline "\n")
(set nothing "")
(set Convert Yes)
; 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))
; introduce ourselfs to the viewers
(welcome "Welcome to the Thor installer. This installer uses "
"the Commodore Amiga Installer. All of our future Thor releases "
"will be using this installer and we would like 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)
;Make assign to install from
(makeassign "Thor_Install" "" (safe))
;******************
;** Check Memory **
;******************
(run "Avail flush")
(set Running (run "Thor_Install:CheckForLib"))
(while (= Running 20)
((Message newline "Thor seem to be running, you MUST close it NOW."
newline "If you don't, the installation will fail!")
(run "Avail flush")
(set Running (run "Thor_Install:CheckForLib")))
)
;************************
;** Start Installation **
;************************
(if (exists "Thor:libs/bbsread.library" (noreq))
; Then
( (set ThorUpdate Yes)
(set Thor_Dir (expandpath "Thor:"))
)
; Else
( (set ThorUpdate No)
)
)
(if (exists "BBSData:global.config" (noreq))
; Then
( (set BBSDataUpdate Yes)
(set BBSData_Dir (expandpath "BBSData:"))
)
; Else
( (set BBSDataUpdate No)
)
)
(if (= ThorUpdate Yes)
;then
(if (askbool
(prompt "Thor seems to be installed on your system already." newline
"The program resides in " quote Thor_Dir quote "." newline
"Do you want to install Thor over it?")
(help
"The installer has determined that you may already have a "
"copy of Thor 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)
)
; Then
(
(set is_update Yes)
)
; Else
(
(set is_update No)
(set Thor_Dir
(askdir
(prompt "Where would you like Thor installed?"
newline "The installer will NOT create a directory")
(help @askdir-help)
(default "Work:")
(newpath)
)
)
(set Thor_Dir (expandpath Thor_Dir))
(set user_script (cat user_script (cat "Assign Thor: " quote Thor_dir quote newline)))
)
)
;Else
((set Thor_Dir
(askdir
(prompt "Where would you like Thor installed?"
newline "The installer will NOT create a directory")
(help @askdir-help)
(default @default-dest)
(newpath)
)
)
(set Thor_Dir (expandpath Thor_Dir))
(set user_script (cat "Assign Thor: " quote Thor_dir quote newline))
)
)
; before we go on lets reset the user's level back to what it was
(default_level)
; verify that the Thor directory exists
(if (<> (exists Thor_Dir) is_a_dir)
(
(makedir Thor_Dir
(prompt
"The directory you have selected for Thor does not "
"seem to exist. Do you want us to create it for you?"
)
(help @makedir-help)
(infos)
(confirm)
)
(set Thor_Dir (expandpath Thor_Dir))
(set user_script (cat "Assign Thor: " quote Thor_dir quote newline))
)
)
(makeassign "Thor" Thor_dir)
(makedir "Thor:Data")
;*************
;** BBSData **
;*************
(default_level)
(if (= BBSDataUpdate Yes)
; Then
(if (askbool
(prompt "There seems to be a message database installed on your system already."
"The database resides in " quote BBSData_Dir quote "." newline
"Do you want to use this database further?"
)
(help
"The installer has determined that you may already have a "
"message database installed on your system. If this is wrong or "
"you want the database installed elsewhere, select NO as an "
"answer. Otherwise, select YES."
)
(default 1)
)
; Then
(
(set RunCfgArchivers No)
(set ConvertCfg Yes)
)
; Else
(
(set RunCfgArchivers Yes)
(set BBSDataMove Yes)
(set is_update No)
(set BBSData_Dir
(askdir
(prompt "Where would you like the message database installed?"
newline "The installer will NOT create a directory")
(help @askdir-help)
(default "Thor:Data")
(newpath)
)
)
(set user_script (cat user_script (cat "Assign BBSData: " quote BBSData_dir quote newline)))
)
)
; Else
(
(set ConvertCfg No)
(set RunCfgArchivers Yes)
(set BBSData_Dir (expandpath "Thor:Data"))
(set user_script (cat user_script (cat "Assign BBSData: " quote BBSData_dir quote newline)))
)
)
;***********************************
;***** GET FIRST DISK IN HERE ******
;***********************************
; first copy over the stuff
(working omp "Decompressing and copying Thor files.")
;(run "Thor_Install:unpack.sh" )
(run "Thor_Install:lhx -a x Thor_Install:thor.lha THOR:" )
;******************
;** User-Startup **
;******************
(save_default_level)
(expert_level)
(if (= is_update Yes)
;Then
(set is_update Yes)
;else
(if (= BBSDataMove Yes)
;Then
(
; now figure out the addition to the user-startup
; modify S:User-Startup
(working omp "Updating S:User-Startup.")
(startup "Thor"
(prompt
"These instructions need to be added to the \"S:User-Startup\" "
"so that your system will be properly configured to use Thor "
newline
newline
user_script
)
(help @startup-help)
(command user_script)
)
)
;Else
(
; now figure out the addition to the user-startup
; modify S:User-Startup
(working omp "Updating S:User-Startup.")
(startup "Thor"
(prompt
"These instructions need to be added to the \"S:User-Startup\" "
"so that your system will