home *** CD-ROM | disk | FTP | other *** search
- ; -------------------------------------------------------
- ; Installer script for AmigaTalk V1.5
- ; -------------------------------------------------------
-
- (set #welcome "This is the installer for AmigaTalk!")
-
- (set #wrongversion
- (cat "You have an old version of the program 'Installer' "
- "on your Amiga!\n\n"
- "The installation procedure needs at least Installer 42.9."
- "\n\nPlease check your System & obtain a newer version!"
- ))
-
- (set #general-help
- (cat "The install script will copy all %s files &"
- "directories to the destination that you specify."
- "Then it will add an Assign AmigaTalk: Vol:destination/"
- "statement to your User-Startup file located in the "
- "S: directory."
- ))
-
- (set #destdir-prompt "Select a Volume & Path where AmigaTalk will be added:")
-
- (set #destdir-help
- (cat "Select the volume that you wish to place AmigaTalk1.7 in."
- "Then select a directory (if any) that will serve as a "
- "parent for AmigaTalk. Example: Select DH0: as the volume,"
- "then select a directory (such as Programs) & the installer"
- "will make a directory called DH0:Programs/AmigaTalk, where"
- "the AmigaTalk program will be placed."
- ))
-
- (set #no-diskspace "To install AmigaTalk1.7 into '%s', you need at least %ld bytes of free harddrive space!")
-
- (set #startup-prompt "An Assign has to be added to S:User-Startup for AmigaTalk.")
- (set #startup-help "AmigaTalk won't work correctly without this!")
-
-
-
- ;------------------------------------------------------------------------
- ; Cleanup any temporary mess we created
- (procedure CLEANUP
- ; Nothing to cleanup
- (delete (tackon @default-dest ".tempinstall") (all) (optional "force"))
- ) ; CLEANUP
-
-
- ;------------------------------------------------------------------------
- ; Obtain an installation path
- (procedure GETPATH #gp_default #gp_remdir #gp_msg #gp_help
-
- (set #gp_res "")
- (while (= "" #gp_res)
- (set #gp_res #gp_default)
- (if (not (exists #gp_res (noreq)))
- (
- ; Surfer 1.1 Hack:
- (if (= #gp_res "Work:")
- (
- (set #gp_res "")
- (set #gp_default @default-dest)
- )
- ) ; if
-
- )
- ) ; if
-
- (if (OR (= "" #gp_res) (= @user-level 2))
- (
- ; We had a problem. So we need to ask the user!
- (set #gp_res
- (expandpath
- (askdir
- (prompt #gp_msg)
- (help #gp_help)
- (default #gp_default)
- )
- )
- )
- )
- ) ; if
-
- ; If the directory does not exist, retry!
- (if (<> "" #gp_res)
- (
- (if (not (exists #gp_res (noreq)))
- (set #gp_res "")
- ) ; if
- )
- ) ; if
- ) ; while
-
- ; return the result!
- (set #gp_res #gp_res)
-
- ) ; GETPATH
-
- ;------------------------------------------------------------------------
- ; We can't handle this script without Installer 42.9 or better!
- (if (< @installer-version 2752521)
- (
- ; Big problem!
- (message #wrongversion)
- (exit (quiet))
- )
- )
-
- ; find out how the user wants to install things
- (welcome #welcome)
-
- (complete 0)
-
- ; First find the Destination base:
-
- (set #ATalkDirBase (GETPATH "Work:" TRUE #destdir-prompt #destdir-help))
-
- ; We have to create a drawer "AmigaTalk" there!
- (set #ATalkDir (tackon #ATalkDirBase "AmigaTalk"))
-
- (set @default-dest #ATalkDir)
-
- ; If this is a new installation, we check the diskspace!
-
- (if (not (exists @default-dest))
- (
- ; For a new setup, we should leave some space!
- (if (< (getdiskspace #ATalkDirBase) 3000000)
- (abort (#no-diskspace #ATalkDirBase 3000000))
- )
-
- (makedir @default-dest)
-
- (set #ARexxDir (tackon @default-dest "ARexxScripts"))
- (makedir #ARexxDir)
-
- (set #BrowserDir (tackon @default-dest "Browser"))
- (makedir #BrowserDir)
-
- (set #CDir (tackon @default-dest "C"))
- (makedir #CDir)
-
- (set #CodeLibDir (tackon @default-dest "CodeLib"))
- (makedir #CodeLibDir)
-
- (set #ExamplesDir (tackon @default-dest "Examples"))
- (makedir #ExamplesDir)
-
- (set #GeneralDir (tackon @default-dest "General"))
- (makedir #GeneralDir)
-
- (set #HelpDir (tackon @default-dest "Help"))
- (makedir #HelpDir)
-
- (set #IntuitionDir (tackon @default-dest "Intuition"))
- (makedir #IntuitionDir)
-
- (set #PreludeDir (tackon @default-dest "Prelude"))
- (makedir #PreludeDir)
-
- (set #SystemDir (tackon @default-dest "System"))
- (makedir #SystemDir)
-
- (set #TestFilesDir (tackon @default-dest "TestFiles"))
- (makedir #TestFilesDir)
-
- (set #UserDir (tackon @default-dest "User"))
- (makedir #UserDir)
-
- (complete 9)
-
- (copyfiles (prompt "Copying ARexxScripts...")
- (help @copyfiles-help)
- (source "ARexxScripts")
- (dest #ARexxDir)
- (pattern "#?.rexx")
- (files)
- )
-
- (copyfiles (prompt "Copying Browser...")
- (help @copyfiles-help)
- (source "Browser")
- (dest #BrowserDir)
- (pattern "#?")
- )
-
- (copyfiles (prompt "Copying C...")
- (help @copyfiles-help)
- (source "C")
- (dest #CDir)
- (pattern "#?")
- )
-
- (copyfiles (prompt "Copying CodeLib...")
- (help @copyfiles-help)
- (source "CodeLib")
- (dest #CodeLibDir)
- (pattern "#?")
- )
-
- (copyfiles (prompt "Copying Examples...")
- (help @copyfiles-help)
- (source "Examples")
- (dest #ExamplesDir)
- (pattern "#?.(st|p)")
- )
-
- (complete 25)
-
- (copyfiles (prompt "Copying General...")
- (help @copyfiles-help)
- (source "General")
- (dest #GeneralDir)
- (pattern "#?.st")
- )
-
- (copyfiles (prompt "Copying Help...")
- (help @copyfiles-help)
- (source "Help")
- (dest #HelpDir)
- (pattern "#?")
- )
-
- (copyfiles (prompt "Copying Intuition...")
- (help @copyfiles-help)
- (source "Intuition")
- (dest #IntuitionDir)
- (pattern "#?.(st|p)")
- )
-
- (complete 50)
-
- (copyfiles (prompt "Copying Prelude...")
- (help @copyfiles-help)
- (source "Prelude")
- (dest #PreludeDir)
- (pattern "#?")
- )
-
- (copyfiles (prompt "Copying System...")
- (help @copyfiles-help)
- (source "System")
- (dest #SystemDir)
- (pattern "#?.(st|p)")
- )
-
- (copyfiles (prompt "Copying TestFiles...")
- (help @copyfiles-help)
- (source "TestFiles")
- (dest #TestFilesDir)
- (pattern "#?")
- )
-
- (copyfiles (prompt "Copying User...")
- (help @copyfiles-help)
- (source "User")
- (dest #UserDir)
- (pattern "#?")
- )
-
- (complete 80)
-
- (copyfiles (prompt "Copying Main files...")
- (help @copyfiles-help)
- (source "AmigaTalk.env")
- (dest #ATalkDir)
- )
-
- (copyfiles (prompt "Copying Main files...")
- (help @copyfiles-help)
- (source "AmigaTalk.colors")
- (dest #ATalkDir)
- )
-
- (copyfiles (prompt "Copying Main files...")
- (help @copyfiles-help)
- (source "AmigaTalk1.7.info")
- (dest #ATalkDir)
- )
-
- (copyfiles (prompt "Copying Main files...")
- (help @copyfiles-help)
- (source "AmigaTalk.readme")
- (dest #ATalkDir)
- )
-
- (copyfiles (prompt "Copying Main files...")
- (help @copyfiles-help)
- (source "History.txt")
- (dest #ATalkDir)
- )
-
- (complete 83)
-
- (copyfiles (prompt "Copying Main program...")
- (help @copyfiles-help)
- (source "AmigaTalk1.7")
- (dest #ATalkDir)
- (pattern "AmigaTalk")
- )
-
- (complete 98)
- )
- )
-
-
- (startup "AmigaTalk"
- (prompt "An Assign needs to be added to the \"S:user-startup\".")
- (help "AmigaTalk has to know where to find certain files.")
- (command "Assign AmigaTalk: " #ATalkDir)
- )
-
- ; If we have to add an Assign, we better create one right now
- (makeassign "AmigaTalk" #ATalkDir)
-
- ;------------------------------------------------------------------------
- ; That's it!
-
- (complete 100)
-
- (CLEANUP)
- (exit)
-
- (abort "Well, I tried!")
-