home *** CD-ROM | disk | FTP | other *** search
Wrap
; Installer® Script v1.1 for MagicMenu ; Written by Deryk Robosson (newlook@bbs.justcompute.com, IRC: #Amiga as newlook) ; ; ***HISTORY*** ; ; 26.12.96 - Initial creation of script ; 27.12.96 - Corrected mismatched ) in removal section of script ; 29.12.96 - Corrected installer version checking and cpu prompting ; initialize some variables (set @options "") (set destination_path "SYS:WBStartup") (set removehelp "If you are unsatisfied with MagicMenu for any reason please notify the authors at the following address' as to the reason why, and thank you for trying MagicMenu\n\nolsen@sourcery.han.de\nor on the MagicMenu home page: http://fsinfo.cs.uni-sb.de/~cattaneo/magicmenu/magicmenu.e.html\n") (set AmigaDos_Number (getversion)) (set AmigaDos_Version (/ AmigaDos_Number 65536)) (set AmigaDos_Revision (- AmigaDos_Number (* AmigaDos_Version 65536))) ;(set installer_version (/ (getversion "sys:utilities/installer") 65535)) ;(transcript "installer_version = " installer_version) (if (< @installer-version 2752521) ( (abort "This Installer® script requires the Installer® program " "to be a minimum of version 42.9 to install MagicMenu correctly." ) ) ) (if (< AmigaDos_Version 37) ( (abort "MagicMenu cannot be run under this version of AmigaDOS. " "MagicMenu requires a minimum of AmigaDOS 2.0" ) ) ) ;installation/removal begins here (complete 0) (set install_remove_choice (askchoice (prompt "Please select method:") (help "This script will allow you to install or remove MagicMenu\n" "Other options for installation will include:\n\n" " MagicMenu Documentation\n" " MagicMenuPrefs\n") (choices "Install MagicMenu" "UnInstall MagicMenu") (default 0) ) ) ; install magicmenu (if (= 0 install_remove_choice) ( (set @abort-button "Abort Install") ; get destination directory (set destination_path (askdir (prompt "Please indicate where you wish MagicMenu located.") (help "The MagicMenu executable will be copied to the directory which you specify.\n" "The default directory will be your WBStartup drawer.\n\n" @askdir-help) (default "SYS:WBStartup") ) ) ; ask which processor they have (complete 25) (set options (askchoice (prompt "Please select your processor from below:") (choices "68000" "68020+") (default 0) (help @askoptions-help) ) ) ; install 68000 version (complete 35) (if (bitand 1 options) ( (copyfiles (prompt "Now preparing to copy 68000 version of MagicMenu") (help @copyfiles-help) (source "MagicMenu") (dest destination_path) (infos) ) ) ) ; install 68020+ version (complete 35) (if (bitand 2 options) ( (set @default-dest (tackon destination_path "MagicMenu")) (copyfiles (prompt "Now preparing to copy 68020+ version of MagicMenu") (help @copyfiles-help) (source "MagicMenu_020+") (dest @default-dest) (infos) ) ) ) ; get destination directory (set destination_path (askdir (prompt "Please indicate where you wish MagicMenu Documentation to be located.") (help "The MagicMenu documentation will be copied to the directory which you specify.\n" "The default directory will HELP:.\n\n" @askdir-help) (default "HELP:") ) ) ; copy magicmenu docs (complete 45) (copyfiles (prompt "Now preparing to copy MagicMenu documentation") (help @copyfiles-help) (source "MagicMenu.guide") (dest destination_path) (infos) ) ; copy appropriate catalog file (complete 65) (set options (askchoice (prompt "Please select your language from below:") (choices "english" "dansk" "deutsch" "español" "français" "greek" "polski" "suomi" "svenska" "ÃeÓtina") (default 0) (help "The default language is english\n\n" @askoptions-help) ) ) ; pretend to install english catalog (complete 75) (if (bitand 0 options) ( (message "The default language is english and requires no catalog file.") ) ) ; install dansk catalog (complete 75) (if (bitand 1 options) ( (copyfiles (prompt "Now preparing to copy dansk catalog.") (help @copyfiles-help) (source "catalogs/dansk") (dest "locale:catalogs/dansk") (infos) (all) ) ) ) ; install deutsch catalog (complete 75) (if (bitand 2 options) ( (copyfiles (prompt "Now preparing to copy deutsch catalog.") (help @copyfiles-help) (source "catalogs/deutsch") (dest "locale:catalogs/deutsch") (infos) (all) ) ) ) ; install español catalog (complete 75) (if (bitand 3 options) ( (copyfiles (prompt "Now preparing to copy español catalog.") (help @copyfiles-help) (source "catalogs/español") (dest "locale:catalogs/español") (infos) (all) ) ) ) ; install français catalog (complete 75) (if (bitand 4 options) ( (copyfiles (prompt "Now preparing to copy français catalog.") (help @copyfiles-help) (source "catalogs/français") (dest "locale:catalogs/français") (infos) (all) ) ) ) ; install greek catalog (complete 75) (if (bitand 5 options) ( (copyfiles (prompt "Now preparing to copy greek catalog.") (help @copyfiles-help) (source "catalogs/greek") (dest "locale:catalogs/greek") (infos) (all) ) ) ) ; install polski catalog (complete 75) (if (bitand 6 options) ( (copyfiles (prompt "Now preparing to copy polski catalog.") (help @copyfiles-help) (source "catalogs/polski") (dest "locale:catalogs/polski") (infos) (all) ) ) ) ; install suomi catalog (complete 75) (if (bitand 7 options) ( (copyfiles (prompt "Now preparing to copy suomi catalog.") (help @copyfiles-help) (source "catalogs/dansk") (dest "locale:catalogs/suomi") (infos) (all) ) ) ) ; install svenska catalog (complete 75) (if (bitand 8 options) ( (copyfiles (prompt "Now preparing to copy svenska catalog.") (help @copyfiles-help) (source "catalogs/ÃeÓtina") (dest "locale:catalogs/svenska") (infos) (all) ) ) ) ; install ÃeÓtina catalog (complete 75) (if (bitand 9 options) ( (copyfiles (prompt "Now preparing to copy ÃeÓtina catalog.") (help @copyfiles-help) (source "catalogs/ÃeÓtina") (dest "locale:catalogs/ÃeÓtina") (infos) (all) ) ) ) ; Update gtlayout.library (complete 85) (set gtlayout_version (/ (getversion "libs:gtlayout.library") 65535)) (transcript "gtlayout_version = " gtlayout_version) (if (< gtlayout_version 38) ( (working "Checking \"gtlayout.library\" version number...") (copylib (prompt "Updating \"gtlayout.library\"...") (help "You will need \"gtlayout.library\" version 38 (or better) for " "MagicMenu Prefs to work properly. The library should only " "be updated if its version number is less than the " "minimum version number required by MagicMenu Prefs.\n\n" @copylib-help) (source "libs/gtlayout.library") (dest "libs:") (confirm) ) ) ) ; run magicmenuprefs for the user (complete 95) (message "You should now configure MagicMenu using the MagicMenuPrefs editor.") (run "sys:prefs/MagicMenuPrefs" (prompt "Running 'MagicMenuPrefs'") (help "We are now going to run MagicMenuPrefs so you " "can configure MagicMenu to your liking.\n") (confirm) ) ; all done! (complete 100) (exit "MagicMenu Installation Complete." (quiet) ) ) ) ; unistall magicmenu (if (= 1 install_remove_choice) ( ;remove magicmenu (complete 50) (set @abort-button "Abort Removal") (delete "sys:wbstartup/magicmen#?" (prompt "MagicMenu is about to be deleted!") (help " MagicMenu will be removed.\n" @removehelp) (delopts (infos)) (confirm) ) (complete 75) (delete "help:magicmenu.guide" (prompt "MagicMenu.guide is about to be deleted!") (help "MagicMenu.guide will be removed.\n" @removehelp) (delopts (infos)) (confirm) ) (complete 85) (delete "envarc:magicmenu.prefs" (prompt "MagicMenu.prefs is about to be deleted!") (help "ENVARC:MagicMenu.prefs will be removed.\n" @removehelp) (delopts (infos)) (confirm) ) (complete 100) ; all done! (exit "MagicMenu successfully removed!" (quiet) ) ) )