home *** CD-ROM | disk | FTP | other *** search
- ; *************************************************************************
- ; ******************* SHELLBENCH INSTALLATION SCRIPT ********************
- ; *************************************************************************
- ;
- ; $VER: ShellBench.install 1.3 (5.4.96)
- ;
- ; Copyright ©1996 Nick Christie
- ;
- ; *************************************************************************
- ;
- ; Find out about program version, etc
-
- ; get version of SB in distribution
- (set vernum-sb (getversion "ShellBench_BGUI"))
- (set ver-sb (/ vernum-sb 65536))
- (set rev-sb (- vernum-sb (* ver-sb 65536) ) )
-
- (set @default-dest "")
- (set defsbdir "SYS:WBStartup")
- (set catsdir "Locale:Catalogs")
-
- ; if novice user-level, bump up to average
- (if (= 0 @user-level)
- (
- (set @user-level 1)
- (user 1)
- )
- )
-
- (set old-user-level @user-level)
-
- ; ************************************************************************
- ; English strings
- ; ************************************************************************
-
- (set default_lang 1)
-
- (set #yes-msg "Yes")
-
- (set #no-msg "No")
-
- (set #bad-kick-msg "ShellBench requires AmigaOS 2.04 or better!")
-
- (set #hello-msg
- (cat
- ("Welcome to ShellBench V%ld.%ld\n\n" ver-sb rev-sb)
- "This script will install ShellBench and "
- "related files on your Amiga.\n\n"
- "You will need to answer a few questions such as "
- "where you would like the program installed.\n\n"
- "If you do not wish to install ShellBench at this time, "
- "select the 'Abort Install' button now. "
- )
- )
-
- (set #whichsb-msg "Which version of ShellBench would you like to install?")
-
- (set #whichsb-help
- (cat
- "Different versions of ShellBench have been provided, "
- "to support two different graphical user interface (GUI) "
- "systems: MUI and BGUI.\n\nYou must already have at least "
- "one of these systems installed on your Amiga in order "
- "to use ShellBench. Neither system has been included in "
- "this package, because they would take up too much space "
- "and are widely available on their own.\n\n"
- "Simply select which of the two systems you have on your "
- "Amiga, or if you have both, which one you prefer. The "
- "Installer will then install the corresponding version of "
- "ShellBench."
- )
- )
-
- (set #sb-askdir-msg "Please select the directory to install ShellBench in.")
-
- (set #sbguide "ShellBench.guide")
-
- (set #sbguide-ask-msg
- (cat
- "\nInstall ShellBench documentation?\n\n"
- "(This is an AmigaGuide file, and you will be asked "
- "for the directory in which to install it.)\n\n"
- "I recommend installing this, and reading it too, "
- "so that you know how to utilitise ShellBench to "
- "its fullest."
- )
- )
-
- (set #sbguide-askdir-msg
- (cat
- "\nPlease select the directory "
- "to install ShellBench.guide in.\n"
- )
- )
-
- (set #guide-help
- (cat
- "AmigaGuide is the Amiga's standard hypertext format.\n\n"
- "If you have AmigaOS 3.0 or better, you can use MultiView "
- "to read this documentation, otherwise you must use the AmigaGuide "
- "program, which is available on AmiNet and Fred Fish disk #870.\n\n"
- "Both of these viewer programs have a 'search path', a set "
- "of directories they search for AmigaGuide documents. "
- "You should place this guide somewhere in that path."
- )
- )
-
- (set #locale-msg
- (cat
- "\nShellBench is localized, which means you may use "
- "the program in several different languages. "
- "Please choose your preferred languages.\n"
- )
- )
-
- (set #locale-help
- (cat
- "These are the languages supported by ShellBench.\n\n"
- "Simply specify the languages you prefer and the "
- "required catalog files will be copied to the "
- "Locale:Catalogs directory.\n\nThis feature is "
- "only available under AmigaOS 2.1 and later."
- )
- )
-
- (set #bye-msg
- (cat
- "ShellBench has been installed with a standard four-colour "
- "icon. In the Icons directory of the distribution you will "
- "find a number of alternative icons that you may wish to use "
- "instead. You will also find some example ShellBench project "
- "icons there."
- )
- )
-
- ; ************************************************************************
- ; xxxx strings - template for other languages
- ; ************************************************************************
-
- (if (= @language "xxxx") ; fill in language name
- (
- (set default_lang x) ; I will fill this in
-
- (set #yes-msg "Yes")
-
- (set #no-msg "No")
-
- (set #bad-kick-msg "ShellBench requires AmigaOS 2.04 or better!")
-
- (set #hello-msg
- (cat
- ("Welcome to ShellBench V%ld.%ld\n\n" ver-sb rev-sb)
- "This script will install ShellBench and "
- "related files on your Amiga.\n\n"
- "You will need to answer a few questions such as "
- "where you would like the program installed.\n\n"
- "If you do not wish to install ShellBench at this time, "
- "select the 'Abort Install' button now. "
- )
- )
-
- (set #whichsb-msg "Which version of ShellBench would you like to install?")
-
- (set #whichsb-help
- (cat
- "Different versions of ShellBench have been provided, "
- "to support two different graphical user interface (GUI) "
- "systems: MUI and BGUI. You must already have at least "
- "one of these systems installed on your Amiga in order "
- "to use ShellBench. Neither system has been included in "
- "this package, because they would take up too much space "
- "and are widely available on their own.\n"
- "Simply select which of the two systems you have on your "
- "Amiga, or if you have both, which one you prefer. The "
- "Installer will then install the corresponding version of "
- "ShellBench."
- )
- )
-
- (set #sb-askdir-msg "Please select the directory to install ShellBench in.")
-
- ; if guide is translated, uncomment second line & fill in language
- ; (set #sbguide "ShellBench.guide")
- ; (set #sbguide "/Guides/xxxx/ShellBench.guide")
-
- (set #sbguide-ask-msg
- (cat
- "\nInstall ShellBench documentation?\n\n"
- "(This is an AmigaGuide file, and you will be asked "
- "for the directory in which to install it.)\n\n"
- "I recommend installing this, and reading it too, "
- "so that you know how to utilitise ShellBench to "
- "its fullest."
- )
- )
-
- (set #sbguide-askdir-msg
- (cat
- "\nPlease select the directory "
- "to install ShellBench.guide in.\n"
- )
- )
-
- (set #guide-help
- (cat
- "AmigaGuide is the Amiga's standard hypertext format.\n\n"
- "If you have AmigaOS 3.0 or better, you can use MultiView "
- "to read this documentation, otherwise you must use the AmigaGuide "
- "program, which is available on AmiNet and Fred Fish disk #870.\n\n"
- "Both of these viewer programs have a 'search path', a set "
- "of directories they search for AmigaGuide documents. "
- "You should place this guide somewhere in that path."
- )
- )
-
- (set #locale-msg
- (cat
- "\nShellBench is localized, which means you may use "
- "the program in several different languages. "
- "Please choose your preferred languages.\n"
- )
- )
-
- (set #locale-help
- (cat
- "These are the languages supported by ShellBench.\n\n"
- "Simply specify the languages you prefer and the "
- "required catalog files will be copied to the "
- "Locale:Catalogs directory.\n\nThis feature is "
- "only available under AmigaOS 2.1 and later."
- )
- )
- ) ; endif xxxx language
- )
-
- ; ************************************************************************
- ; Begin actual installation
- ; ************************************************************************
-
- ; Check for KickV37 or better
-
- (if (< (/ (getversion) 65536) 37)
- (
- (abort #bad-kick-msg)
- )
- )
-
- ; ------------------------------------------------------------------------
- ; Show welcome msg
-
- (user 2)
- (message #hello-msg)
- (user old-user-level)
-
- ; ------------------------------------------------------------------------
- ; Ask the user which version of ShellBench to install (either
- ; ShellBench_MUI or ShellBench_BGUI.
-
- (if (askchoice
- (prompt #whichsb-msg)
- (help #whichsb-help)
- (default 0)
- (choices "BGUI" "MUI")
- )
- ; then
- (
- (set sbexe "ShellBench_MUI")
- )
- ; else
- (
- (set sbexe "ShellBench_BGUI")
- )
- )
-
- ; ------------------------------------------------------------------------
- ; Ask the user where we should install ShellBench and copy the program.
-
- (if
- (set sbdir
- (askdir
- (prompt #sb-askdir-msg)
- (help @askdir-help)
- (default defsbdir)
- )
- )
- (
- (copyfiles (source sbexe) (dest sbdir) (newname "ShellBench") (infos))
- (set @default-dest sbdir)
- )
- )
-
- ; ------------------------------------------------------------------------
- ; Install ShellBench.guide. Ask yes/no first, then ask for directory.
-
- (set guidedir sbdir)
-
- (if (askbool
- (prompt #sbguide-ask-msg)
- (help #guide-help)
- (default 1)
- (choices #yes-msg #no-msg)
- )
- ; then
- (
- (set guidedir
- (askdir
- (prompt #sbguide-askdir-msg)
- (help @askdir-help)
- (default guidedir)
- )
- )
- (copyfiles (source #sbguide) (dest guidedir) (infos) )
- )
- )
-
- ;------------------------------------------------------------------------
- ; install catalog(s)
-
- (if (exists "libs:locale.library")
- (
- (if (exists catsdir)
- (
- (user 2)
- (set lang
- (askoptions
- (prompt #locale-msg)
- (help #locale-help)
- (choices
- "English"
- "Français"
- "Italiano"
- )
- (default default_lang)
- )
- )
- (user old-user-level)
- (set n 0)
- (while
- (set language
- (select n
- "English"
- "Français"
- "Italiano"
- ""
- )
- )
- (
- (if (in lang n)
- (
- (if (<> 0 n)
- (
- (makedir (cat catsdir "/" language))
- (copyfiles
- (source (cat "Catalogs/" language "/ShellBench.catalog"))
- (dest (cat catsdir "/" language))
- )
- )
- )
- )
- )
- (set n (+ n 1))
- )
- ) ; endwhile pick language n
- ) ; endthen
- ) ; endif exists catsdir
- ) ; endthen
-
- ) ; endif exists locale lib
-
- ;------------------------------------------------------------------------
- ; final exit message
-
- (exit #bye-msg)
-
-