; Install-Script for STCCG.guide ; ; © 1996 Ralf Schwate ; ; $VER:STCCG-install 2.0 (04-Nov-96) ; ; Version 2.0 ; ; 2.0 revamped, deletes 1.x installation and starts over again:-) ; dirty hack, hope it does run in all cases... ; 1.1 usable now for updates. checks whether data-files exist! ; 1.0 Initial Release ; (if (= @language "english") ( (set @abort-button "Cancel installation") (set @app-name "STCCGguide") (set #stccg_introduction (cat "\n" "STCCG.guide 2.0 \n" "All Rights Reserved. \n" " \n" "©1996 Ralf Schwate \n" " \n" "An AmigaGuide-Database for the Card Game \n" "Star Trek: The Next Generation \n" )) (set #stccg_error (cat "\n" " Some error has occured. Please inform the author \n" " (e.g. Ralf.Schwate@mch.sni.de) after having tried \n" " a different Installer release. \n" )) (set #stccg_datafile_missing (cat "\n" " Datafiles are missing! You also need the archive \n" " STCCGdata.lha extracted in the same directory \n" " where you extracted this archive! \n" "\n" " Aborting install.... \n" )) (set #stccg_where "\nPlease select a destination for the STCCG.guide drawer") (set #stccg_where_help (cat "Use this dialogue to select the partition or the directory where you " "want the STCCG.guide drawer to be created.\n\n" @askdir-help ) ) (set #stccg_update_install (cat "\n" " You already have STCCG.guide installed. This \n" " installation assumes, you want an update of the \n" " installation. \n\n" " If you want to install new, abort the installation\n" " remove the assign 'STCCG:' ('assign STCCG: remove'\n" " in a shell) and start the installation a second \n" " time! \n" )) (set #stccg_new_install (cat "\n" " This is a new installation of STCCG.guide! \n" " A directory will be created in which all files \n" " will be copied! \n" )) (set #stccg_already_installed_font (cat "\n" " It seems you already have installed a \n" " StarTrek.font! \n" " You need an 8pt size font to use the Guides \n" " correctly. If you installed this font with a \n" " previous STCCGguide version you are safe. \n" )) (set #stccg_already_installed_crille (cat "\n" " It seems you already have installed a \n" " StarTrekTNGCrille.font! \n" " You need an 30pt size font to use the Guides \n" " correctly. If you installed this font with a \n" " previous STCCGguide version you are safe. \n" )) (set #stccg_install_font "Installing needed fonts in Fonts:?\n") (set #stccg_install_font_help (cat "\n" " STCCG.guide needs the font StarTrek.font in size 8\n" " to correctly display some of its pages. \n" " The installer script tries to install this font \n" " into the Fonts:-directory. \n" )) (set #stccg_install_crillefont_help (cat "\n" " STCCG.guide needs the font StarTrekTNGCrille.font \n" " in size 30 to correctly display some of its pages.\n" " The installer script tries to install this font \n" " into the Fonts:-directory. \n" )) (set #stccg_delete "\nOld files in STCCG: removed!\n") (set #stccg_delete_help (cat "\n" " There is a new structure in the STCCG:-directory. \n" " Since this installation includes all guide-files \n" " it is save to remove the old installation. \n" " If you don't want this abort this installation and\n" " remove the STCCG:-assign by hand (so this instal- \n" " lation assumes a first installation). \n" )) (set #stccg_add_assign "\nAdd STCCG assign to user-startup?\n") (set #stccg_add_assign_help (cat "\n" " STCCG.guide needs this assign to find crosslinked \n" " files in it's database! \n" )) (set #stccg_install_show_script (cat " There is already a show-script installed! \n" " Do you want to update the current show-script? \n" )) (set #stccg_install_show_script_help (cat "\n" " STCCG.guide needs the show-script to show pictures\n" " contained in the guide. There should be no need to\n" " update the current script. Only if the viewing \n" " utility cannot be found anymore. \n" )) (set #stccg_viewer "\nPlease select a viewer for pictures in the database") (set #stccg_viewer_help (cat "\n" " STCCG.guide needs this file to show the pictures \n" " included in the database. Should support jpg- and \n" " gif-formats (jpg is sufficient, there are no more \n" " gifs any more)! \n" )) (set #stccg_complete (cat "\n" " Installation complete. \n\n" " You may consider to install also the picture files\n" " with their own installer, so you can view the card\n" " pictures from the guide... \n\n" " Enjoy... \n" )) ) ) ; ** Setting of Variables ; (set install_mode 0) (set install_mode_new 0) (set install_mode_update 1) (set install_show_script 1) (set install_show_script_no 0) (set install_show_script_yes 1) (onerror ( (if (> @ioerr 0) (message (cat "\n ERROR CODE: " @ioerr "\n\n" #stccg_error)) ) )) ; ** Start of Installation ; (message #stccg_introduction) (welcome) (transcript "On installing STCCG.guide ...") (complete 0) (if (exists "USER:" (noreq)) (set #stccg_default "USER:") (set #stccg_default "SYS:TOOLS") ) (if (exists "STCCG:" (noreq)) ( (message #stccg_update_install) (set install_mode install_mode_update) ) ( (message #stccg_new_install) (set install_mode install_mode_new) ) ) (if (= install_mode install_mode_new) ( (set install_path (askdir (prompt #stccg_where) (help #stccg_where_help) (default #stccg_default) ) ) ) ) (if (= install_mode install_mode_update) ( (set install_dir (expandpath "STCCG:")) (if (exists "STCCG:show" (noreq)) ( (copyfiles (source "STCCG:show") (dest "T:")) ) ) (delete ("STCCG:#?") (prompt #stccg_delete) (confirm) (help #stccg_delete_help) (optional force)) ) ( (set install_dir (tackon install_path "STCCGguide")) (if (exists install_dir) (exit "should not happen yet!\n" (quiet)) ( (makedir install_dir (infos)) ) ) (makeassign "STCCG" install_dir) ) ) (set @default-dest (install_dir)) (complete 10) (copyfiles (source "Guides") (dest "STCCG:") (all)) (complete 70) (if (exists "fonts:StarTrek" (noreq)) (message #stccg_already_installed_font) (copyfiles (prompt #stccg_install_font) (help #stccg_install_font_help) (source "Fonts") (dest "Fonts:") ) ) (if (exists "fonts:StarTrekTNGCrille" (noreq)) (message #stccg_already_installed_crille) (copyfiles (prompt #stccg_install_font) (help #stccg_install_crillefont_help) (source "Fonts") (dest "Fonts:") ) ) (complete 80) (startup "STCCGguide" (prompt #stccg_add_assign) (help #stccg_add_assign_help) (command ("assign >nil: STCCG: %s" install_dir)) ) (complete 90) (set install_show_script install_show_script_no) (if (exists "STCCG:show" (noreq)) (set install_show_script (askbool (prompt #stccg_install_show_script) (help #stccg_install_show_script_help) (default 0) ) ) (if (= install_mode install_mode_update) (if (exists "T:show" (noreq)) ( (set install_show_script (askbool (prompt #stccg_install_show_script) (help #stccg_install_show_script_help) (default 0) ) ) (if (= install_show_script install_show_script_yes) (copyfiles (source "T:show") (dest "STCCG:")) (delete ("T:show") (optional force)) ) ) (set install_show_script install_show_script_no) ) (set install_show_script install_show_script_no) ) ) (if (= install_show_script install_show_script_no) ( (if (exists "c:") (set viewer_default "c:") (set viewer_default "") ) (if (exists "c:vt") (set viewer_default "c:vt") (set viewer_default "") ) (if (exists "c_aminet:vt") (set viewer_default "c_aminet:vt") (set viewer_default "") ) (set #show_file (askfile (prompt #stccg_viewer) (help #stccg_viewer_help) (default viewer_default) ) ) (set stccg_show (".key pic\n%s &\n" #show_file)) (textfile (dest "STCCG:show") (append stccg_show)) ) ) (complete 100) (exit #stccg_complete)