home *** CD-ROM | disk | FTP | other *** search
- ;--------------------------- Current version.revision ----------------------
- (set vernum (getversion "libs:gadutil.library"))
-
- (set thisvernum (getversion "libs/gadutil.library"))
- (set thisver (/ thisvernum 65536))
- (set thisrev (- thisvernum (* thisver 65536)))
-
- ;---------------------- All strings in the script --------------------------
-
- (set #install-msg "Installing GadUtil.library...")
-
- (set #info-msg (cat "\n\nGadUtil installation script.\n"
- ("This script installs GadUtil %ld.%ld on your system.\n\n" thisver thisrev)
- "Read the docs for more information on the "
- "distribution and for use in commercial or "
- "other non-free programs.\n\n"
- "GadUtil is Copyright © 1994-1996 by\n"
- "P-O Yliniemi and Staffan Hämälä.\n"
- "All rights reserved."))
-
- (set #useroptions-msg "Select which user file(s) to install")
- (set #useroption1-msg "The library file (replaces old version)")
- (set #useroption2-msg "The debug version of the library file")
- (set #useroption3-msg "User documentation")
- (set #useroption4-msg "Aminet .readme file")
-
- (set #maindir-msg (cat "Where do you wish to install GadUtil related\n"
- "files? The Installer will NOT create a new\n"
- "drawer at the selected location."))
-
- (set #sellocfor-msg "Please select a location for")
- (set #docdir-msg ("%s all documentation" #sellocfor-msg))
-
- (set #debuglib-msg (cat "\nYou have selected to install another version\n"
- "of GadUtil.library, that contains some extra\n"
- "code for debugging. This version can be used\n"
- "to trace problems while starting up applications\n"
- "that uses gadutil.library.\n\n"
- "To use the 'debug' version, rename the original\n"
- "library to something else, and rename the 'debug'\n"
- "version to 'gadutil.library'. Type 'avail flush'\n"
- "in Shell to remove the normal library from memory.\n"
- "You may have to reboot to remove the library from\n"
- "memory. Start the program and read...\n"))
-
- (set #libinst-msg "Installing gadutil.library.")
- (set #debuglibinst-msg "Installing gadutil.library (debug version).")
-
- ;-------------------- Installation script begins here ----------------------
- (set olduserlevel @user-level)
- (user 2)
- (transcript #install-msg)
- (message #info-msg)
- (user olduserlevel)
-
- ;-------------------------- Get options for user install -------------------
- (set userinstall
- (askoptions
- (prompt #useroptions-msg)
- (help @askoptions-help)
- (choices #useroption1-msg
- #useroption2-msg
- #useroption3-msg
- #useroption4-msg
- )
- (default %1101)
- )
- )
-
- ;-------------------------- Create main directory --------------------------
- (if (IN userinstall 2 3)
- (
- (set destdir
- (askdir
- (prompt #maindir-msg)
- (help @askdir-help)
- (default @default-dest)
- )
- )
- (if (= @user-level 0) (set destdir (tackon destdir "GadUtil")))
-
- (if (<> (substr destdir (- (strlen destdir) 1)) ":")
- (makedir destdir (infos))
- )
-
- (set @default-dest destdir)
-
- (set docdir
- (askdir
- (prompt #docdir-msg)
- (help @askdir-help)
- (newpath)
- (default (tackon destdir "Docs"))
- )
- )
- (makedir docdir (infos))
- )
- )
-
- ;-------------------------- Do user installation ---------------------------
- (if (IN userinstall 0)
- (copylib
- (prompt #libinst-msg)
- (help @copylib-help)
- (source "libs/gadutil.library")
- (dest "libs:")
- (confirm)
- )
- )
-
- (if (IN userinstall 1)
- (
- (message #debuglib-msg)
- (copylib
- (prompt #debuglibinst-msg)
- (help @copylib-help)
- (source "libs/gadutil.library_dbg")
- (dest "libs:")
- (confirm)
- )
- )
- )
-
- (if (IN userinstall 2)
- (
- (copyfiles (source "docs/GadUtil.Manual")
- (dest docdir)
- )
- (copyfiles (source "icons/def_guide.info")
- (dest docdir) (newname "GadUtil.Manual.info")
- )
- )
- )
-
- (if (IN userinstall 3)
- (
- (copyfiles (source "docs/GadUtil_usr.readme")
- (dest docdir)
- )
- (copyfiles (source "docs/GadUtil_dev.readme")
- (dest docdir)
- )
- (copyfiles (source "icons/def_doc.info")
- (dest docdir) (newname "GadUtil_usr.readme.info")
- )
- (copyfiles (source "icons/def_doc.info")
- (dest docdir) (newname "GadUtil_dev.readme.info")
- )
- )
- )
-
- ;--------------------------------- Done ------------------------------------
- (exit)
-