home *** CD-ROM | disk | FTP | other *** search
Wrap
;*********************************************************************** ; FunFont installation script (v2.0) written by Andrew J Bailey (Carbon) ; © CREATIVE DESIGN 1997 ;*********************************************************************** ;PROCEDURES ;********** (procedure greet ( (complete 0) (set #speak "welcome to the fun font instalation.") (talk) (message "\n\n\nWelcome to the FunFont installation\n\nI will now install the necessary files.\n\n\nNO SYSTEM FILES WILL BE DELETED BY THIS INSTALLATION") )) ;*********************************************************************** (procedure amirc ( (set #speak "Select the directory where am eye are see, is located.") (talk) (set @default-dest (askdir (prompt "\nSelect the directory where \"AmIRC\" is located...\n") (help "\n Arexx scripts have to be copied to the \"Rexx\" sub-directory\n" " of your \"AmIRC:\" directory...\n\n" " Example choice \"DH0:Comms/AmIRC/\"\n\n" " The default directory is \"AmIRC:\"") (default "Amirc:") ) ) (copyfiles (source "bin/amirc") (dest @default-dest) (all) ) (complete 10) )) ;*********************************************************************** (procedure helpdir ( (set #speak "Select the directory, to install the fun font guide and associated help files.") (talk) (set @default-dest (askdir (prompt "\nSelect the directory to install the\n" " FunFont guide and associated HELP files...\n") (help "\n The FunFont guide and its support files will be copied\n" " to the selected directory.\n\n" " A drawer called \"FunFont\" will be created.\n\n" " The default directory is \"Help:\"") (default "Help:") ) ) (makedir (tackon @default-dest "FunFont")) (copyfiles (source "BIN/Misc/DRW") (dest @default-dest) (newname "FunFont.info") ) (complete 50) )) ;*********************************************************************** (procedure guide ( (copyfiles (source "GUIDES") (dest (tackon @default-dest "FunFont")) (newname "GUIDE") ) (copyfiles (source "bin/misc/guide") (dest (tackon @default-dest "FunFont")) (newname "GUIDE.info") ) (copyfiles (source "Images") (dest (tackon @default-dest "FunFont/Images")) (all) ) (copyfiles (source "bin/misc/ADVUSR") (dest (tackon @default-dest "FunFont/Images")) ) (complete 60) )) ;*********************************************************************** (procedure preview ( (set #speak "you are now required to select a font, to install.") (talk) (message "\nYou are now required to select a font to install.\n\n" "To help you choose an appropriate font,\n" "a preview follows...\n\n" "Fonts are identified by their index number 1-12\n\n" "Press PROCEED to continue.") (if (> @user-level 0) (run "run >NIL: <NIL: sys:utilities/multiview images/FontPreview.pic") ) (complete 20) )) ;*********************************************************************** (procedure font ( (set #speak "Please note the index numbers, displayed in wite.") (talk) (set @choice (askchoice (prompt "\nSelect the font you wish to install...\n") (choices ("01 11P/9W/H") ("02 11P/7W/H") ("03 11P/7W/M") ("04 9P/7W/M") ("05 9P/6W/M") ("06 9P/5W/M") ("07 9P/5W/L") ("08 9P/4W/L") ("09 9P/3W/L") ("10 7P/7W/M") ("11 7P/5W/L") ("12 7P/3W/L") ) (default 3) (help "\n The first number is the point size of the font.\n" " The second number is the width of a standard letter.\n" " The end letter refers to the weight of the font.\n\n" " The default choice is 04 which is a nine point font.") ) ) (run "delete fonts:funfont#? all >NIL:") (rename "envarc:mui/amirc.1.prefs" "envarc:mui/AMIRC.1.prefs.bak") (if (= @choice 0) (run "lha x -X -q bin/fonts/01.fnt fonts:")) (if (= @choice 0) (copyfiles (source "bin/envarc/amirc11") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 1) (run "lha x -X -q bin/fonts/02.fnt fonts:")) (if (= @choice 1) (copyfiles (source "bin/envarc/amirc11") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 2) (run "lha x -X -q bin/fonts/03.fnt fonts:")) (if (= @choice 2) (copyfiles (source "bin/envarc/amirc11") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 3) (run "lha x -X -q bin/fonts/04.fnt fonts:")) (if (= @choice 3) (copyfiles (source "bin/envarc/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 4) (run "lha x -X -q bin/fonts/05.fnt fonts:")) (if (= @choice 4) (copyfiles (source "bin/envarc/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 5) (run "lha x -X -q bin/fonts/06.fnt fonts:")) (if (= @choice 5) (copyfiles (source "bin/envarc/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 6) (run "lha x -X -q bin/fonts/07.fnt fonts:")) (if (= @choice 6) (copyfiles (source "bin/envarc/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 7) (run "lha x -X -q bin/fonts/08.fnt fonts:")) (if (= @choice 7) (copyfiles (source "bin/envarc/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 8) (run "lha x -X -q bin/fonts/09.fnt fonts:")) (if (= @choice 8) (copyfiles (source "bin/envarc/amirc9") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 9) (run "lha x -X -q bin/fonts/10.fnt fonts:")) (if (= @choice 9) (copyfiles (source "bin/envarc/amirc7") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 10) (run "lha x -X -q bin/fonts/11.fnt fonts:")) (if (= @choice 10) (copyfiles (source "bin/envarc/amirc7") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (if (= @choice 11) (run "lha x -X -q bin/fonts/12.fnt fonts:")) (if (= @choice 11) (copyfiles (source "bin/envarc/amirc7") (dest "envarc:mui/") (newname "AMIRC.1.prefs"))) (copyfiles (source "bin/fonts") (dest "fonts:") (pattern "FFGuide#?") ) (complete 30) )) ;*********************************************************************** (procedure keymap ( (set #speak "do you want to install, an enhanced key map.") (talk) (set @keymap (askbool (prompt "\nDo you want to install an enhanced keymap ?\n\n" "This allows you to use keyboard shortcuts\n" "for frequently used graphics.\n\n" "For more information, select HELP.") (help "\n Selecting YES will prompt you to choose a keymap.\n" " These keymaps have been designed to enhance FunFont\n" " usage by remapping frequently used graphics to appropriate\n" " keystrokes...\n\n" " For example \"Alt-y\" will print a \"Yes!\" graphic.\n\n" " These keymaps are totally invisible during normal use.\n\n" " Selecting NO will skip this part of the installation.") (default "0") ) ) (if (= @keymap 1) (set @map (askchoice (prompt "\nSelect the keymap to install...\n") (choices ("CDN") ("CH1") ("CH2") ("D") ("DK") ("E") ("F") ("GB") ("I") ("N") ("S") ("USA") (help "\n Select the keymap you normally use.\n\n" " If you are not sure which keymap is currently installed,\n" " you can check by using your \"Input\" preference program\n" " which is located in your \"SYS:Prefs/\" drawer.\n\n" " Default keymap is GB.") (default "7") ) ) ) (set @map "14") ) (if (= @map 0) (copyfiles (source "bin/keymaps/cdn") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 1) (copyfiles (source "bin/keymaps/ch1") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 2) (copyfiles (source "bin/keymaps/ch2") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 3) (copyfiles (source "bin/keymaps/d") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 4) (copyfiles (source "bin/keymaps/dk") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 5) (copyfiles (source "bin/keymaps/e") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 6) (copyfiles (source "bin/keymaps/f") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 7) (copyfiles (source "bin/keymaps/gb") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 8) (copyfiles (source "bin/keymaps/i") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 9) (copyfiles (source "bin/keymaps/n") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 10) (copyfiles (source "bin/keymaps/s") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 11) (copyfiles (source "bin/keymaps/usa") (dest "keymaps:") (newname "FunFont")) ("")) (if (= @map 14) ("") (copyfiles (source "bin/misc/key") (dest "keymaps:") (newname "FunFont.info"))) (if (= @map 14) ("") (rename "envarc:sys/input.prefs" "envarc:sys/Input.prefs.bak")) (if (= @map 14) ("") (copyfiles (source "bin/envarc/input") (dest "envarc:sys/") (newname "Input.prefs"))) )) ;************************************************************************* (procedure without ( (complete 40) (set #speak "Select the support files, to be installed.") (talk) (set support (askoptions (prompt "\nSelect the support files to be installed...\n") (help "\n GUIDE This is the main FunFont guide (Multiview)\n" "\n CODES This is a reference sheet fot the codes\n" " used for printing realtime IRC graphics.\n" "\n FANSI This is a reference sheet for the keystrokes\n" " used for printing extended ansi characters.") (choices (" FunFont GUIDE") (" Graphic CODES reference sheet") (" FANSI keystroke reference sheet")) (default 0) ) ) )) ;************************************************************************* (procedure with ( (complete 40) (set #speak "Select the support files, to be installed.") (talk) (set support (askoptions (prompt "\nSelect the support files to be installed...\n") (help "\n GUIDE This is the main FunFont guide (Multiview)\n" "\n CODES This is a reference sheet for the codes\n" " used for printing realtime IRC graphics.\n" "\n FANSI This is a reference sheet for the keystrokes\n" " used for printing extended ansi characters.\n" "\n KEYS This is the keyboard shortcut reference sheet\n" " used for printing frequent IRC graphics.") (choices (" FunFont GUIDE") (" Graphic CODES reference sheet") (" FANSI keystroke reference sheet") (" KEYS keyboard shortcut reference sheet")) ) ) )) ;************************************************************************** (procedure check ( (if (= support 0) (end) ) (helpdir) (if (BITAND support 1) (guide) ) (if (BITAND support 2) (codes) ) (if (BITAND support 4) (fansi) ) (if (BITAND support 8) (keys) ) )) ;************************************************************************** (procedure codes ( (copyfiles (source "bin/misc/CODES") (dest (tackon @default-dest "FunFont")) (infos) ) (complete 70) )) ;************************************************************************** (procedure fansi ( (copyfiles (source "bin/misc/FANSI") (dest (tackon @default-dest "FunFont")) (infos) ) (complete 80) )) ;************************************************************************** (procedure keys ( (copyfiles (source "bin/misc/KEYS") (dest (tackon @default-dest "FunFont")) (infos) ) (complete 90) )) ;************************************************************************** (procedure end ( (complete 100) (set #speak "-w1 Thankyoo for installing, fun font.") (talk) (exit "\n\nFunFont has been successfuly installed." "\n\nPLEASE REBOOT SYSTEM" (quiet)) )) ;************************************************************************** (procedure endmsg ( (complete 100) (set #speak "-w1 Thankyoo for installing, fun font.") (talk) (message "\n\nFunFont has been successfuly installed." "\n\nPLEASE REBOOT SYSTEM") )) ;************************************************************************** (procedure talk ( (if (= @user-level 0) ("") (if (exists "C:talk") (run "run >NIL: <NIL: talk" #speak) ) ) )) ;************************************************************************** (procedure extras ( (set #speak "select the extra files, to install.") (talk) (set extra (askoptions (prompt "\nSelect the EXTRA files to install...\n") (choices (" Font Installer") (" Fansi Maker")) (help "\n Font Installer: Enables you to install any of the\n" " fonts at a later date so that you do not have to\n" " retain the original archive.\n\n" " The fonts are stored in a compressed format (55K).\n\n" " Fansi Maker: This useful script and editor will make\n" " the creation of Fansi graphics easier.") ) ) (if (= extra 0) (endmsg) ) (if (BITAND extra 1) (FontInstall) ) (if (BITAND extra 2) (FansiMaker) ) )) ;************************************************************************** (procedure FontInstall ( (copyfiles (source "bin/misc/FONTINSTALL") (dest (tackon @default-dest "FunFont")) (infos) ) (copyfiles (source "bin/fonts/") (dest (tackon @default-dest "FunFont/Fonts")) (pattern "#?.fnt") ) (copyfiles (source "images/FontPreview.pic") (dest (tackon @default-dest "FunFont/Images")) ) (copyfiles (source "bin/envarc/") (dest (tackon @default-dest "FunFont/Fonts")) (pattern "AMIRC#?") ) )) ;************************************************************************** (procedure FansiMaker ( (copyfiles (source "bin/misc/FANSIMAKER") (dest (tackon @default-dest "FunFont")) (infos) ) (copyfiles (source "bin/misc/NEW.fansi") (dest (tackon @default-dest "FunFont")) ) (copyfiles (source "bin/misc/GEditor") (dest "c:") ) (copyfiles (source "bin/envarc/GEDITOR") (dest "ENVarc:MUI") (newname "GEDITOR.1.prefs") ) (copylib (source "bin/misc/Textfield.gadget") (dest "SYS:Classes/Gadgets") ) )) ;************************************************************************** (procedure start ( (copylib (source "bin/misc/Talk") (dest "c:") (nogauge) ) (copylib (source "bin/misc/Narrator.device") (dest "devs:") (nogauge) ) (copylib (source "bin/misc/Translator.library") (dest "libs:") (nogauge) ) )) ;************************************************************************** ;SEQUENCE ;******** (working "\nPreparing system...\n\nPLEASE WAIT") (start) (welcome "\nWelcome to the FunFont installation utility\nPlease indicate how the installation should proceed (based upon your knowledge of the Amiga computer.)\n") (greet) (amirc) (preview) (font) (keymap) (if (= @map 14) (without) (with) ) (check) (extras) (endmsg)