home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-17 | 13.7 KB | 366 lines | [TEXT/MPS ] |
- #
- # Build the installer and disk set for English Text-to-Speech.
- # This is for development testing only; this script is not used by
- # SCM for actual builds.
- #
- # There is an option, -s, to just rebuild the installer script without
- # processing all the files to be installed. This option can only be used
- # if you have run this script previously without the -s option. If you
- # make a change that affects anything besides the installer script (e.g.
- # change, add, delete, or move a file to be installed) you need to run
- # this build script without the -s option.
- #
- # Assumes that the files to be installed have all been built, and that
- # the installer source pieces have all been checked out into the
- # current directory.
- #
- # This script could be more parameterized but it doesn't seem worth the
- # effort and complexity. For example, the fact that there are three
- # disks generated is explicit in several places in the script, instead
- # of just in the definitions.
- #
- # This script could be done over as a MakeFile so that it's easy to only
- # redo the steps that are actually needed.
-
-
- # -------------------------------------------------------------------------------------------
- # Definitions
- # -------------------------------------------------------------------------------------------
-
- Set Here "`Directory`" # Main directory.
-
- Set ExternalPiecesDir "{Here}ExternalPieces:" # Location of files we didn't build.
-
- Set AssemblyDir "{Here}EnglishTTSAssembly:" # Holds intermediate working files.
-
- Set NetInstallDir "{Here}English TTS:" # Where the results go.
-
- Set ScriptName "English TTS Install Script" # Result installer script.
-
- Set Commands "{Commands},{ExternalPiecesDir}" # There are some tools we use.
-
-
- # The names of the folder corresponding to each result floppy.
- # These names must match those in a .r file as well.
-
- Set Disk1Dir "{NetInstallDir}English TTS 1:" # Folders for each result disk.
- Set Disk2Dir "{NetInstallDir}English TTS 2:"
- Set Disk3Dir "{NetInstallDir}English TTS 3:"
- Set Disk4Dir "{NetInstallDir}English TTS 4:"
- Set Disk5Dir "{NetInstallDir}English TTS 5:"
-
-
- # The names of the files (which have been copied to the assembly area) to include
- # in each compressed package.
- # These names must match those in a .r file as well.
-
- Set Tome1Files "∂"{AssemblyDir}MacinTalk 3∂" ∂
- ∂"{AssemblyDir}Voices:Ben∂" ∂
- ∂"{AssemblyDir}Voices:Boris∂" ∂
- ∂"{AssemblyDir}Voices:Brenda∂" ∂
- ∂"{AssemblyDir}Voices:Mariel∂" ∂
- ∂"{AssemblyDir}Voices:Marvin∂" ∂
- ∂"{AssemblyDir}Voices:Mr. Hughes∂" ∂
- ∂"{AssemblyDir}Voices:Otis∂" ∂
- ∂"{AssemblyDir}Voices:RoboVox∂" ∂
- ∂"{AssemblyDir}Voices:Xero∂" ∂
- ∂"{AssemblyDir}Voices:Deranged∂" ∂
- ∂"{AssemblyDir}Voices:Pipe Organ∂" ∂
- ∂"{AssemblyDir}Voices:Princess∂" ∂
- ∂"{AssemblyDir}Voices:Ralph∂" ∂
- ∂"{AssemblyDir}Voices:Zarvox∂" "
-
- Set Tome2Files "∂"{AssemblyDir}Bruce∂" ∂
- ∂"{AssemblyDir}MacinTalk 2∂" "
-
- # Agnes.rsrc2 and Victoria.rsrc2 are added separately to Tome3.
- Set Tome3Files "∂"{AssemblyDir}MacinTalk Pro∂" ∂
- ∂"{AssemblyDir}Speech∂" ∂
- ∂"{AssemblyDir}Speech Manager∂" ∂
- ∂"{AssemblyDir}Voices:Votron∂" ∂
- ∂"{AssemblyDir}Voices:Albert∂" ∂
- ∂"{AssemblyDir}Voices:Bad News∂" ∂
- ∂"{AssemblyDir}Voices:Bahh∂" ∂
- ∂"{AssemblyDir}Voices:Bells∂" ∂
- ∂"{AssemblyDir}Voices:Boing∂" ∂
- ∂"{AssemblyDir}Voices:Bubbles∂" ∂
- ∂"{AssemblyDir}Voices:Cellos∂" ∂
- ∂"{AssemblyDir}Voices:Fred∂" ∂
- ∂"{AssemblyDir}Voices:Good News∂" ∂
- ∂"{AssemblyDir}Voices:Hysterical∂" ∂
- ∂"{AssemblyDir}Voices:Junior∂" ∂
- ∂"{AssemblyDir}Voices:Kathy∂" ∂
- ∂"{AssemblyDir}Voices:Trinoids∂" ∂
- ∂"{AssemblyDir}Voices:Whisper∂" "
-
- # Tome 4 has Agnes.rsrc1, done specially.
-
- # Tome 5 has Victoria.rsrc1, done specially.
-
-
- # The names of the compressed packages; these appear on the result disks.
- # These names must match those in a .r file as well.
-
- Set Tome1Name "English TTS Tome 1"
- Set Tome2Name "English TTS Tome 2"
- Set Tome3Name "English TTS Tome 3"
- Set Tome4Name "English TTS Tome 4"
- Set Tome5Name "English TTS Tome 5"
-
-
- Set ScriptOnly 0 # Assume build everything.
-
-
- # -------------------------------------------------------------------------------------------
- # Arguments
- # -------------------------------------------------------------------------------------------
-
- If {#} >= 1 && "{1}" == "-s"
- Set ScriptOnly 1
- Shift
- End
-
- If {#} != 1
- Echo "### Argument error. Syntax: {0} [-s] <files directory>"
- Echo "### -s Rebuild script only (don't rebuild files)"
- Echo "### <files directory> Location of files to be installed"
- Exit 1
- End
-
-
- # Convert the already built pieces directory to a full path name. The standard format
- # makes using the variable much easier.
-
- Set BuiltPiecesDir `Files -f -o -d -i "{1}"`
-
-
- # -------------------------------------------------------------------------------------------
- # Build the script
- # -------------------------------------------------------------------------------------------
-
- Make -f "Installer Script.make" "{ScriptName}" -d For800K=1 > Make.out
- Execute Make.out
-
-
- # -------------------------------------------------------------------------------------------
- # Set up folder structure
- #
- # We really need to start with a clean slate because various tools will add to existing
- # files which really messes things up.
- # -------------------------------------------------------------------------------------------
-
- If ! {ScriptOnly}
- For dir in "{AssemblyDir}" "{NetInstallDir}" "{Disk1Dir}" "{Disk2Dir}" "{Disk3Dir}" ∂
- "{Disk4Dir}" "{Disk5Dir}"
- Delete -i -y "{dir}"
- NewFolder "{dir}"
- End
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Copy built pieces to assembly area
- # -------------------------------------------------------------------------------------------
-
- Duplicate -y "{ScriptName}" "{AssemblyDir}"
-
- If ! {ScriptOnly}
- Duplicate -y "{BuiltPiecesDir}MacinTalk 2" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}MacinTalk 3" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}MacinTalk Pro" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}Agnes" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}Bruce" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}Victoria" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}Speech Manager" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}Speech" "{AssemblyDir}"
- Duplicate -y "{BuiltPiecesDir}Voices:" "{AssemblyDir}Voices"
- Duplicate -y "{BuiltPiecesDir}Using English Text-to-Speech" "{AssemblyDir}"
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Copy non-built pieces to assembly area
- # -------------------------------------------------------------------------------------------
-
- If ! {ScriptOnly}
- Duplicate -y "{ExternalPiecesDir}SimpleText" "{AssemblyDir}"
- Duplicate -y "{ExternalPiecesDir}Installer" "{AssemblyDir}"
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Set versions and dates
- # -------------------------------------------------------------------------------------------
-
- # Hack for now. Really need to use the SCM tools to do this.
-
- If ! {ScriptOnly}
- Echo "Include ∂"{AssemblyDir}Speech Manager∂" ∂'vers∂';" ∂
- | Rez -o EnglishTTSVersions.rsrc -t 'rsrc' -c 'RSED' # Must be in different directory.
-
- For file in `Files -f -o -s -r "{AssemblyDir}"`
- Echo "Include ∂"EnglishTTSVersions.rsrc∂";" ∂
- | Rez -a -o "{file}"
- SetFile -d . -m . "{file}"
- End
- End
-
- If {ScriptOnly}
- Echo "Include ∂"EnglishTTSVersions.rsrc∂";" ∂
- | Rez -a -o "{AssemblyDir}{ScriptName}"
- SetFile -d . -m . "{AssemblyDir}{ScriptName}"
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Split files
- #
- # The split size needs to be hand tuned for each file to make maximum use of the
- # space on a floppy. This is because the file is compressed after splitting, so
- # you have to guess what the compressed size will be.
- #
- # We need to set the file type and creator of the split pieces back to the
- # the original file's type and creator to get around a problem when
- # running ScriptCheck. When ScriptCheck tries to get the version of the
- # file to fill in in the 'infa' it (or the atom extender) thinks it can't find
- # the file because the type and creator or wrong. Oddly, there is no problem
- # getting the file's size though. Also, we have to copy the 'vers' 1 resource
- # to the split pieces so that there is a version for ScriptCheck to find.
- # -------------------------------------------------------------------------------------------
-
- If ! {ScriptOnly}
- FileAndRsrcSplitterTool "{AssemblyDir}Agnes" -s 810000
- SetFile -t 'ttvf' -c 'gala' "{AssemblyDir}Agnes.rsrc1"
- SetFile -t 'ttvf' -c 'gala' "{AssemblyDir}Agnes.rsrc2"
- Echo "Include ∂"{AssemblyDir}Agnes∂" 'vers' (1);" ∂
- | Rez -a -o "{AssemblyDir}Agnes.rsrc1"
- Echo "Include ∂"{AssemblyDir}Agnes∂" 'vers' (1);" ∂
- | Rez -a -o "{AssemblyDir}Agnes.rsrc2"
-
- FileAndRsrcSplitterTool "{AssemblyDir}Victoria" -s 830000
- SetFile -t 'ttvf' -c 'gala' "{AssemblyDir}Victoria.rsrc1"
- SetFile -t 'ttvf' -c 'gala' "{AssemblyDir}Victoria.rsrc2"
- Echo "Include ∂"{AssemblyDir}Victoria∂" 'vers' (1);" ∂
- | Rez -a -o "{AssemblyDir}Victoria.rsrc1"
- Echo "Include ∂"{AssemblyDir}Victoria∂" 'vers' (1);" ∂
- | Rez -a -o "{AssemblyDir}Victoria.rsrc2"
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Build Tomes
- # -------------------------------------------------------------------------------------------
-
- If ! {ScriptOnly}
-
- # Tome 1
-
- Delete -i "{AssemblyDir}{Tome1Name}"
- For file in {Tome1Files}
- Echo "# Compressing ∂"{file}∂"…"
- InstaCompOneTool "{file}" -o "{AssemblyDir}{Tome1Name}"
- End
- Echo "Include ∂"{ExternalPiecesDir}Tome Resources∂" not 'ckid';" ∂
- | Rez -a -o "{AssemblyDir}{Tome1Name}" # Error message for double-click on tome.
- SetFile -a C -c kakc -t idcp "{AssemblyDir}{Tome1Name}"
-
-
- # Tome 2
-
- Delete -i "{AssemblyDir}{Tome2Name}"
- For file in {Tome2Files}
- Echo "# Compressing ∂"{file}∂"…"
- InstaCompOneTool "{file}" -o "{AssemblyDir}{Tome2Name}"
- End
- Echo "Include ∂"{ExternalPiecesDir}Tome Resources∂" not 'ckid';" ∂
- | Rez -a -o "{AssemblyDir}{Tome2Name}" # Error message for double-click on tome.
- SetFile -a C -c kakc -t idcp "{AssemblyDir}{Tome2Name}"
-
-
- # Tome 3
-
- Delete -i "{AssemblyDir}{Tome3Name}"
- For file in {Tome3Files}
- Echo "# Compressing ∂"{file}∂"…"
- InstaCompOneTool "{file}" -o "{AssemblyDir}{Tome3Name}"
- End
-
- Echo "# Compressing ∂"{AssemblyDir}Agnes.rsrc2∂"…"
- InstaCompOneTool -e -f "Agnes" "{AssemblyDir}Agnes.rsrc2" -o "{AssemblyDir}{Tome3Name}"
-
- Echo "# Compressing ∂"{AssemblyDir}Victoria.rsrc2∂"…"
- InstaCompOneTool -e -f "Victoria" "{AssemblyDir}Victoria.rsrc2" -o "{AssemblyDir}{Tome3Name}"
-
- Echo "Include ∂"{ExternalPiecesDir}Tome Resources∂" not 'ckid';" ∂
- | Rez -a -o "{AssemblyDir}{Tome3Name}" # Error message for double-click on tome.
- SetFile -a C -c kakc -t idcp "{AssemblyDir}{Tome3Name}"
-
- Echo "Include ∂"{AssemblyDir}MacinTalk 2∂" 'ttsp' (1) AS 'ttsp' (2); ∂
- Include ∂"{AssemblyDir}MacinTalk 3∂" 'ttsp' (1) AS 'ttsp' (3);" ∂
- | Rez -a -o "{AssemblyDir}{Tome3Name}"
-
-
- # Tome 4
-
- Delete -i "{AssemblyDir}{Tome4Name}"
- Echo "# Compressing ∂"{AssemblyDir}Agnes.rsrc1∂"…"
- InstaCompOneTool -e -f "Agnes" "{AssemblyDir}Agnes.rsrc1" -o "{AssemblyDir}{Tome4Name}"
- Echo "Include ∂"{ExternalPiecesDir}Tome Resources∂" not 'ckid';" ∂
- | Rez -a -o "{AssemblyDir}{Tome4Name}" # Error message for double-click on tome.
- SetFile -a C -c kakc -t idcp "{AssemblyDir}{Tome4Name}"
-
-
- # Tome 5
-
- Delete -i "{AssemblyDir}{Tome5Name}"
- Echo "# Compressing ∂"{AssemblyDir}Victoria.rsrc1∂"…"
- InstaCompOneTool -e -f "Victoria" "{AssemblyDir}Victoria.rsrc1" -o "{AssemblyDir}{Tome5Name}"
- Echo "Include ∂"{ExternalPiecesDir}Tome Resources∂" not 'ckid';" ∂
- | Rez -a -o "{AssemblyDir}{Tome5Name}" # Error message for double-click on tome.
- SetFile -a C -c kakc -t idcp "{AssemblyDir}{Tome5Name}"
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Create net install
- # -------------------------------------------------------------------------------------------
-
- Duplicate -y "{AssemblyDir}{ScriptName}" "{NetInstallDir}"
- #Duplicate -y "{AssemblyDir}{ScriptName}" "{Disk1Dir}"
-
- If ! {ScriptOnly}
- Duplicate -y "{AssemblyDir}Installer" "{NetInstallDir}"
- Duplicate -y "{AssemblyDir}Using English Text-to-Speech" "{NetInstallDir}"
-
- Duplicate -y "{AssemblyDir}Installer" "{Disk1Dir}"
- Duplicate -y "{AssemblyDir}{Tome1Name}" "{Disk1Dir}"
- Duplicate -y "{AssemblyDir}SimpleText" "{Disk1Dir}"
- Duplicate -y "{AssemblyDir}Using English Text-to-Speech" "{Disk1Dir}"
-
- Duplicate -y "{AssemblyDir}{Tome2Name}" "{Disk2Dir}"
-
- Duplicate -y "{AssemblyDir}{Tome3Name}" "{Disk3Dir}"
-
- Duplicate -y "{AssemblyDir}{Tome4Name}" "{Disk4Dir}"
-
- Duplicate -y "{AssemblyDir}{Tome5Name}" "{Disk5Dir}"
- End
-
-
- # -------------------------------------------------------------------------------------------
- # Run ScriptCheck
- #
- # Besides checking the script and files also fills in some info in the script and so is an
- # essential step.
- #
- # Ignore the error messages about the 'icmt's not being referenced; the messages
- # are spurious.
- # -------------------------------------------------------------------------------------------
-
- Duplicate -y "{ExternalPiecesDir}InstaCompOneSCExt.rsrc" "{NetInstallDir}{ScriptName}.scx"
- Directory "{NetInstallDir}" # ScriptCheck can't take long names.
- ScriptCheck -h -a -d "{ScriptName}"
- Directory "{Here}"
- Duplicate -y "{NetInstallDir}{ScriptName}" "{Disk1Dir}"
- Delete "{NetInstallDir}{ScriptName}.scx"
-