home *** CD-ROM | disk | FTP | other *** search
- ; -------------------------------------------------------
- ; Installer script for AmiReadMeGen V1.0
- ; -------------------------------------------------------
-
- (set #welcome "This is the installer for AmiReadMeGen!")
-
- (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."
- ))
-
- (set #destdir-prompt "Select a Volume & Path where AmiReadMeGen will be added:")
-
- (set #destdir-help
- (cat "Select the volume that you wish to place AmiReadMeGen in."
- "Then select a directory (if any) that will serve as a "
- "parent for AmiReadMeGen. Example: Select DH0: as the volume,"
- "then select a directory (such as Programs) & the installer"
- "will make a directory called DH0:Programs/AmiReadMeGen, where"
- "the AmiReadMeGen program will be placed."
- "NOTE:"
- "If this is changed in the future, remember to edit the Icon"
- "ToolTypes to reflect the actual location of the program."
- ))
-
- (set #Cdir-prompt "Select a Path where commands are located (example C:):")
-
- (set #Cdir-help
- (cat "Select the volume & Path that you wish to place AmiReadMeGen"
- "support program(s) in. I recommend the 'C:' directory."
- ))
-
- (set #no-diskspace "To install AmiReadMeGen into '%s', you need at least %ld bytes of free harddrive space!")
-
- ;------------------------------------------------------------------------
- ; 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 #ARMGDirBase (GETPATH "Work:" TRUE #destdir-prompt #destdir-help))
-
- ; We have to create a drawer "AmiReadMeGen" there!
- ; if (expr) (true) (false)
-
- (set #DiskLibDir (tackon #ARMGDirBase "AmiReadMeGen"))
-
- (copyfiles (prompt "Copying Drawer (Icon file)...")
- (help @copyfiles-help)
- (source "ENV:sys/def_Drawer.info")
- (dest #ARMGDirBase)
- (newname "AmiReadMeGen.info")
- )
-
- ; Where are we going to place DiskDirTree:
- (set #CmdDir (GETPATH "C:" TRUE #Cdir-prompt #Cdir-help))
-
- (set @default-dest #DiskLibDir)
-
- ; 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 #ARMGDirBase) 700000)
- (abort (#no-diskspace #ARMGDirBase 700000))
- )
-
- (makedir @default-dest)
-
- (complete 9)
-
- (copyfiles (prompt "Copying DeckBrowser (Support Program)...")
- (help @copyfiles-help)
- (source "DeckBrowser")
- (dest #CmdDir)
- )
-
- (complete 25)
-
- (copyfiles (prompt "Copying Main files...")
- (help @copyfiles-help)
- (source "AmiReadMeGen.bsh")
- (dest #DiskLibDir)
- )
-
- (copyfiles (prompt "Copying Help file...")
- (help @copyfiles-help)
- (source "AmiReadMeGen.guide")
- (dest #DiskLibDir)
- (infos)
- )
-
- (complete 83)
-
- (copyfiles (prompt "Copying Main program...")
- (help @copyfiles-help)
- (source "AmiReadMeGen")
- (dest #DiskLibDir)
- (infos)
- )
-
- (complete 98)
- )
- )
-
-
- ;------------------------------------------------------------------------
- ; That's it!
-
- (complete 100)
-
- (CLEANUP)
- (exit)
-
- (abort "Well, I tried!")
-