home *** CD-ROM | disk | FTP | other *** search
- ;;
- ;; $Final Writer Lite Cover Disk Hard Drive Installation Script British (UK) Version $
- ;; $Date: 1995/12/18 15:27:32 $
- ;; $Revision: 1.2 $
- ;;
-
- (set is_update 0)
- (set @user-level 1) ; force to use average mode
- (complete 0)
-
-
- ;
- ; Installation Disk Names
- ;
- (set #install_disk_1 "Disk 1")
-
- ;
- ; File/drawer names that change with different language versions.
- ;
- (set #fw_drawer "FinalWriter_Lite_B")
-
- ;
- ; LHex file
- ;
- (set #lhex_program
- (cat #install_disk_1
- ":lhex"
- ))
-
- ; -------------------------------------------------------------------
- ; TEXT TRANSLATION SHOULD BEGIN HERE - Translate everything in quotes.
- ;
-
- (set #which_drawer_prompt
- (cat "In which disk or drawer should the Final Writer Lite drawer be "
- "created in?"
- ))
-
- (set #which_drawer_help
- (cat "The installation utility will create a drawer named \""
- #fw_drawer
- "\" on the selected disk or in the selected drawer. All \"Final Writer\" "
- "files will be placed inside this new drawer.\n\n"
- @askdir-help
- ))
-
- (set #disk_space_prompt
- (cat "There may not be enough room available on this drive to install \""
- #fw_drawer
- "\". Do you wish to continue?"
- ))
-
- (set #disk_space_help
- (cat #fw_drawer
- " needs approximately 2.5 megabytes of disk space for a "
- "complete installation. If Final Writer LIte is already installed on this "
- "partition, you may wish to continue. Otherwise, press ABORT or NO now and "
- "either free some space on this partition or select a different partition "
- "for the installation."
- ))
-
- (set #disk_space_abort
- (cat #fw_drawer
- " installation cancelled. Not enough disk space on Volume \""
- ))
-
- (set #update_options_prompt
- (cat "What parts would you like to update?"
- ))
-
- (set #update_choice_0 "Final Writer Lite Program")
- (set #update_choice_1 "System Data Files")
- (set #update_choice_2 "System Libraries")
- (set #update_choice_3 "System Fonts")
- (set #update_choice_4 "Sample Documents")
-
- (set #ask_disk_prompt
- (cat "\n\nPlease insert \"%s\" in any drive."
- ))
-
- (set #ask_disk1_help
- (cat "\"%s\" contains the Final Writer program, libraries, system fonts, and data files to be installed.\n\n"
- @askdisk-help
- ))
-
-
- (set #install_program "Installing Final Writer program from \"%s\".")
- (set #install_program_icon "Installing Final Writer program and icon from \"%s\".")
- (set #install_datafiles "Installing Data Files from \"%s\".")
- (set #install_libs "Installing Libraries from \"%s\".")
- (set #install_sysfonts "Installing System Fonts from \"%s\".")
- (set #install_sampledocs "Installing Sample Documents from \"%s\".")
-
- (set #install_program_err "Error installing Final Writer Program.")
- (set #install_datafiles_err "Error installing Data Files.")
- (set #install_libs_err "Error installing Libraries.")
- (set #install_sysfonts_err "Error installing System Fonts.")
- (set #install_ssmpledocs_err "Error installing Sample Documents.")
-
- (set #kickstart_err
- (cat "You must have Workbench 2.04 or greater to install Final Writer! "
- "(Workbench version 37.67 and Kickstart 37.175 or greater.)"
- ))
-
- ;
- ; TEXT TRANSLATION SHOULD END HERE - nothing below needs translation.
- ; -------------------------------------------------------------------
-
- ;
- ; make sure we are running under V37 or higher...
- ;
- (if (< (/ (getversion) 65536) 37)
- (
- (abort #kickstart_err)
- )
- )
-
- ;
- ; Ask where to install Final Writer.
- ;
- (set FW_dest
- (askdir
- (prompt #which_drawer_prompt)
- (help #which_drawer_help @askdir-help)
- (default @default-dest)
- )
- )
-
- ;
- ; Check if this is an update
- ; the FWLibs directory is a tell-tale sign
- ; that FW is already installed here
- ;
- (if (exists (tackon FW_dest "FWLibs"))
- (set is_update 1)
- ( (if (exists (tackon FW_dest #fw_drawer))
- (set is_update 1)
- (makedir (tackon FW_dest #fw_drawer) (infos))
- )
- (set FW_dest (tackon FW_dest #fw_drawer))
- )
- )
-
- (set @default-dest FW_dest)
- (set disk_space (getdiskspace FW_dest))
-
-
- ;
- ; If first time installation, install all
- ;
- (if (NOT is_update)
- (
- (set install_all 1)
- (set disk_space_needed 2810183) ; 2.68 Megs
- )
- )
-
-
- ;
- ;Check if enough disk space is available.
- ;
- (if (AND (< disk_space disk_space_needed) (NOT is_update))
- (
- (set answer1
- (askbool
- (prompt #disk_space_prompt)
- (help #disk_space_help)
- )
- )
- (if (NOT answer1)
- (abort #disk_space_abort
- (getdevice @default-dest)
- "\"."
- )
- )
- )
- )
-
-
- ;
- ; Allow updating user to select what they want updated.
- ;
- (if is_update
- (set install_options
- (askoptions
- (prompt #update_options_prompt)
- (help @askoptions-help)
- (choices
- #update_choice_0 ; Program
- #update_choice_1 ; System Data Files
- #update_choice_2 ; System Libraries
- #update_choice_3 ; System Fonts
- #update_choice_4) ; Sample Documents
- (default 31) ; default to Program, Files, Libs, Fonts, Docs
- )
- )
-
- ; First time install
- (if install_all
- (set install_options 31) ; hex 1F - all options on
- )
- )
-
- ;
- ; Copy the extraction utility over and remember where it is
- ;
- (copyfiles
- (source #lhex_program)
- (dest FW_dest)
- )
- (set DeArcher (tackon FW_dest "lhex"))
- (set error 0)
-
- ;
- ; Installing Files on Disk 1?
- ;
- (if (IN install_options 0 1 2)
- (
- ; Get Disk 1
- (askdisk
- (prompt (#ask_disk_prompt #install_disk_1))
- (help (#ask_disk1_help #install_disk_1))
- (dest #install_disk_1)
- )
-
- ;
- ; If installing/updating the program
- ;
- (if (IN install_options 0)
- (
- ; Make installer cd into FW_dest when it executes the run statement
- (set @execute-dir FW_dest)
-
- ; copy the Final Writer program over if the program
- ; icon doesn't exists copy it over too.
- ( if (exists (tackon FW_dest "FinalWriter.info"))
- ; This DOES NOT copy the icon, in case the user
- ; has modified the tool-types
- (
- (working (#install_program #install_disk_1))
- (set error
- (run
- ("\"%s\" -f x \"Disk 1:FinalWriter.lha\" FinalWriter >NIL:" DeArcher)
- )
- )
- )
- ; This DOES copy the icon
- (
- (working (#install_program_icon #install_disk_1))
- (set error
- (run
- ("\"%s\" -f x \"Disk 1:FinalWriter.lha\" >NIL:" DeArcher)
- )
- )
- )
- )
- )
- )
-
- (if error
- (abort #install_program_err)
- )
-
- (complete 25)
-
- ; Installing FWFiles
- (if (IN install_options 1)
- (
- ; If FWFiles doesn't exist, create it.
- (if (NOT (exists (tackon FW_dest "FWFiles")))
- (
- (makedir (tackon FW_dest "FWFiles") (infos))
- )
- )
-
- ; Make installer cd into FWFiles when it executes the run statement
- (set @execute-dir (tackon FW_dest "FWFiles"))
-
- ; Extract the files
- (working (#install_datafiles #install_disk_1))
- (set error
- (run
- ("\"%s\" -f x \"Disk 1:FWFiles.lha\" >NIL:" DeArcher)
- )
- )
-
- ; Abort if any errors
- (if error
- (abort #install_datafiles_err)
- )
- )
- )
-
- (complete 50)
-
- ; Installing FWLibs
- (if (IN install_options 2)
- (
- ; If FWLibs doesn't exist, create it.
- (if (NOT (exists (tackon FW_dest "FWLibs")))
- (
- (makedir (tackon FW_dest "FWLibs"))
- )
- )
-
- ; Make installer cd into FWLibs when it executes the run statement
- (set @execute-dir (tackon FW_dest "FWLibs"))
-
- (working (#install_libs #install_disk_1))
- (set error
- (run
- ("\"%s\" -f x \"Disk 1:FWLibs.lha\" >NIL:" DeArcher)
- )
- )
-
- ; Abort if any errors
- (if error
- (abort #install_libs_err)
- )
-
- (run ("Avail FLUSH"))
- )
- )
- )
- )
-
- (complete 75)
-
- ; Installing System Fonts
- (if (IN install_options 3)
- (
- ; Get Disk 1
- (askdisk
- (prompt (#ask_disk_prompt #install_disk_1))
- (help (#ask_disk1_help #install_disk_1))
- (dest #install_disk_1)
- )
-
- ; Installing FWFonts
- (if (IN install_options 3)
- (
- ; If FWFonts doesn't exist, create it.
- (if (NOT (exists (tackon FW_dest "FWFonts")))
- (
- (makedir (tackon FW_dest "FWFonts") (infos))
- )
- )
-
- ; Make installer cd into FWFonts when it executes the run statement
- (set @execute-dir (tackon FW_dest "FWFonts"))
-
- (working (#install_sysfonts #install_disk_1))
- (set error
- (run
- ("\"%s\" -f x \"Disk 1:FWFonts.lha\" >NIL:" DeArcher)
- )
- )
-
- ; Abort if any errors
- (if error
- (abort #install_sysfonts_err)
- )
- )
- )
- )
- )
-
- ; Installing Sample Documents
- (if (IN install_options 4)
- (
- ; Get Disk 1
- (askdisk
- (prompt (#ask_disk_prompt #install_disk_1))
- (help (#ask_disk1_help #install_disk_1))
- (dest #install_disk_1)
- )
-
- ; Installing FWDocs
- (if (IN install_options 4)
- (
- ; If FWDocs doesn't exist, create it.
- (if (NOT (exists (tackon FW_dest "FWDocs")))
- (
- (makedir (tackon FW_dest "FWDocs") (infos))
- )
- )
-
- ; Make installer cd into FWDocs when it executes the run statement
- (set @execute-dir (tackon FW_dest "FWDocs"))
-
- (working (#install_sampledocs #install_disk_1))
- (set error
- (run
- ("\"%s\" -f x \"Disk 1:FWDocs.lha\" >NIL:" DeArcher)
- )
- )
-
- ; Abort if any errors
- (if error
- (abort #install_sampledocs_err)
- )
- )
- )
- )
- )
-
- ; If FWClipArt doesn't exist, create it.
- (if (NOT (exists (tackon FW_dest "FWClipArt")))
- (
- (makedir (tackon FW_dest "FWClipArt") (infos))
- )
- )
-
- ; If FWTextClips doesn't exist, create it.
- (if (NOT (exists (tackon FW_dest "FWTextClips")))
- (
- (makedir (tackon FW_dest "FWTextClips") (infos))
- )
- )
-
- (delete DeArcher)
-
- (complete 100)
-
- (exit)
-
-