ShrinkWrapDoc.tioga
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Michael Plass, July 21, 1992 3:03 pm PDT
Foote, October 7, 1992 10:36 am PDT
Introduction
Definition: A shrink-wrapped Cedar world is an executable that does not depend on (non-standard) contents of the file system. A shrink-wrapped world should be runnable on a vanilla workstation, disconnected from the net.
To accomplish this, the data files that are normally needed are compiled into the executable, and the prefix-map facility of PFS is used to make it appear to the applications that the files are there.
The easiest way to find out what files are needed is to simply start up a world in the normal fashion, with a special logger in place to record the appropriate PFS events; this information may be used to construct the approprate list of files. It is normally a good idea to examine and edit the file list, since there are often things there that are really not needed in the final, packaged world.
So here are the steps ("say" means "type to a Cedar Commander"):
1. In any Cedar10.1 world, make a clean directory and say "ShrinkWrapSetup <xxx>", where <xxx> is the name that you want the final package to be.
2. Start up a CedarCommander, and cd to your new directory.
3. Say (to this new Commander) "ShrinkWrapStart <xxx>".
4. Start up the rest of the world as you want it to be. Take care to use the files you think you will want to be included; here "use" means that a call on PFS.Open, PFS.FileInfo, or PFS.Copy needs to happen. In particular, notice that an enumeration is not enough. The command "UseFiles", provided as part of ShrinkWrap, may be used to touch those files that you want.
5. Get back to your ShrinkWrap directory, and say "
ShrinkWrapStop <xxx> <initialCommand>".
This will invoke PackageIt, and write some files for step 7.
Alternately, say "ShrinkWrapDF <xxx>". This will generate <xxx>.df which can be used to control a trickle charge of the files referenced by this ShrinkWrap world.
6. Edit the <xxx>.files file as appropriate. This will probably mean removing the .o and .require files, which are placed at the end of the listing so they are easy to delete all at once.
7. Say "
MakeDo <xxx>".
This may be done in a different world, if desired. If so, you may exit your CedarCommander world first. Also, MakeDo may take a long time to do this build - you mak want to do these steps instead:
Mako <xxx>Files.c.MakeIt; Mako -~o <xxx>Files.c; Mako <xxx>.MakeIt
8. Test your newly-created package.
If you decide you need to add some files, you may repeat steps 6 through 8.
When the shrink-wrapped world comes up, it will be running from its builtin files; to switch back to the network, say "NetwiseCedar", and to revert to the builtin files, say "BuiltinCedar".
It's useful to make up a script that touches all the pieces of the world that you want to include in your shrink-wrapped file; the "PreRegister" command is particularly useful for this. Also, the file "oooo.tioga" manages to touch most of the screen fonts that you are likely to encounter in typical tioga documents, so it is a good file to Open if you are creating a world that uses Viewers and Tioga.
Example
Here is an example script for making a RawViewers world with a lot of things in it that might be useful at home (remember to say "ShrinkWrapSetup HomeCedar" before you do any of this):
-- HomeCedarSetup.cm
-- Invoke this from a CommandTool of a viewers world started like this:
-- unix% enable cedar10.1
-- unix% CedarCommander
-- Commander% ShrinkWrapStart HomeCedar
-- Commander% RawViewers
PMA -t /Cedar /Cedar
Gargoyle
EditTool
PreRegister TelnetViewer Bridge Man QFind
ReadTo EOF >xx.mesa
xx: PROGRAM = {x:INT=0;}.
EOF
mako xx.mesa
ReadTo EOF >yy.config
yy: CONFIGURATION = {xx}.
EOF
mako yy.config
IconColor on
TerminalByViewer
TiogaToInterpress xx.mesa
InterpressToPostscript xx.interpress
Preview xx.interpress
Open oooo.tioga
ReadTo EOF >xxx.mx
EOF
MixMaster xxx
Scheme (load "Tendrils")
del sun4/*
MakeDo sun4/yy.c2c.o
Preregister qbo DFPort Tenize
CommandMesa xx
Open /Cedar/ShrinkWrap/ShrinkWrapDoc
ReadTo EOF >HomeCedar.pcroptions
-msgs 0 -vp 2 -slaveiop 1 -striop 1 -stdiop 2 -thread 90 -mem 524288 -stack 90000 -tmp /tmp -nodbxscript -shmtype sv
EOF
UseFiles /Cedar/Forms/*!h
UseFiles /Cedar/Styles/*!h
ReadTo EOF | PrefixLines "UseFiles " | Commander
/Cedar/Commands/Bridge.command
/Cedar/Commands/cc-M.command
/Cedar/Commands/chgrp.command
/Cedar/Commands/chmod.command
/Cedar/Commands/chown.command
/Cedar/Commands/Cind.command
/Cedar/Commands/Clock.command
/Cedar/Commands/CommandMesa.command
/Cedar/Commands/CommandsFromProfile.command
/Cedar/Commands/ComplexCc.command
/Cedar/Commands/del~.command
/Cedar/Commands/df.command
/Cedar/Commands/DFPort.command
/Cedar/Commands/du.command
/Cedar/Commands/EditTool.command
/Cedar/Commands/env.command
/Cedar/Commands/Gargoyle.command
/Cedar/Commands/GenerateCedarScript.command
/Cedar/Commands/IconColor.command
/Cedar/Commands/InterpressToPostscript.command
/Cedar/Commands/MakeDo.command
/Cedar/Commands/mako.command
/Cedar/Commands/man.command
/Cedar/Commands/Mimosa.command
/Cedar/Commands/MixMaster.command
/Cedar/Commands/mkdir.command
/Cedar/Commands/MMCCMesa.command
/Cedar/Commands/PackageIt.cm
/Cedar/Commands/Preview.command
/Cedar/Commands/ps.command
/Cedar/Commands/pstat.command
/Cedar/Commands/qbo.command
/Cedar/Commands/RawViewers.command
/Cedar/Commands/RedoButton.command
/Cedar/Commands/Repeat.command
/Cedar/Commands/rmdir.command
/Cedar/Commands/Scheme.command
/Cedar/Commands/sh.command
/Cedar/Commands/sh1.command
/Cedar/Commands/TelnetViewer.command
/Cedar/Commands/TerminalByViewer.command
/Cedar/Commands/TiogaToInterpress.command
/Cedar/Commands/TransTioga.command
/Cedar/Commands/UnixCommand.command
/Cedar/Gargoyle/GGHelp.tioga
EOF
ShrinkWrapStop HomeCedar RawViewers
After you have done this, edit HomeCedar.files to clean it up. You will want to delete most of the lines that don't start with /Cedar (or /cedar) or /imagerfonts; also, take out the version maps (they are big and won't do a lot of good at home) and the pressfonts. You should add one spline font:
/imagerfonts/xerox/xc1-2-2/
/imagerfonts/xerox/internal/xc1-3-3/modern.icfk
so that there will be a substitute font available. For example, your HomeCedar.files might end up looking like this:
/Cedar/AtomButtons/
/Cedar/AtomButtons/GraphicsButton.tip!1
/Cedar/BiScrollers/
/Cedar/BiScrollers/Knob.tip!1
/Cedar/Bridge/
/Cedar/Bridge/Rtty.icons!1
/Cedar/Bridge/Rtty.tip!1
/Cedar/ButtonClasses/
/Cedar/ButtonClasses/ButtonClasses.tip!2
/Cedar/ButtonClasses/ButtonClassesCommon.tip!2
/Cedar/Commands/
/Cedar/Commands/Bridge.command!1
/Cedar/Commands/cc-M.command!1
/Cedar/Commands/chgrp.command!1
/Cedar/Commands/chmod.command!1
/Cedar/Commands/chown.command!1
/Cedar/Commands/Cind.command!1
/Cedar/Commands/Clock.command!1
/Cedar/Commands/CommandMesa.command!1
/Cedar/Commands/CommandsFromProfile.command!1
/Cedar/Commands/ComplexCc.command!1
/Cedar/Commands/del~.command!1
/Cedar/Commands/df.command!1
/Cedar/Commands/DFPort.command!1
/Cedar/Commands/du.command!1
/Cedar/Commands/EditTool.command!1
/Cedar/Commands/env.command!1
/Cedar/Commands/Gargoyle.command!1
/Cedar/Commands/Gargoyle.command!2
/Cedar/Commands/GenerateCedarScript.command!1
/Cedar/Commands/IconColor.command!1
/Cedar/Commands/InterpressToPostscript.command!1
/Cedar/Commands/MakeDo.command!1
/Cedar/Commands/Mako.command!1
/Cedar/Commands/mako.command!1
/Cedar/Commands/Man.command!1
/Cedar/Commands/man.command!1
/Cedar/Commands/Mimosa.command!1
/Cedar/Commands/MixMaster.command!1
/Cedar/Commands/mkdir.command!1
/Cedar/Commands/MMCCMesa.command!1
/Cedar/Commands/MMCcMesa.command!1
/Cedar/Commands/PackageIt.cm!1
/Cedar/Commands/PackageIt.cm!2
/Cedar/Commands/PackageIt.cm!3
/Cedar/Commands/PreView.command!1
/Cedar/Commands/Preview.command!1
/Cedar/Commands/ps.command!1
/Cedar/Commands/pstat.command!1
/Cedar/Commands/QBO.command!1
/Cedar/Commands/qbo.command!1
/Cedar/Commands/QFind.command!1
/Cedar/Commands/RawViewers.command!1
/Cedar/Commands/RedoButton.command!1
/Cedar/Commands/Repeat.command!1
/Cedar/Commands/rmdir.command!1
/Cedar/Commands/Scheme.command!1
/Cedar/Commands/sh.command!1
/Cedar/Commands/sh1.command!1
/Cedar/Commands/TelnetViewer.command!1
/Cedar/Commands/TerminalByViewer.command!1
/Cedar/Commands/TerminalByViewer.command!2
/Cedar/Commands/TiogaToInterpress.command!1
/Cedar/Commands/TransTioga.command!1
/Cedar/Commands/UnixCommand.command!1
/Cedar/Forms/
/Cedar/Forms/CedarDF.form!1
/Cedar/Forms/CedarDoc.form!1
/Cedar/Forms/CedarMsg.form!3
/Cedar/Forms/CommandMesa.form!2
/Cedar/Forms/EP90.form!1
/Cedar/Forms/InventionProposalForm-1.ip!1
/Cedar/Forms/InventionProposalForm-2.ip!1
/Cedar/Forms/InventionProposalForm-3.ip!1
/Cedar/Forms/InventionProposalForm-4.ip!1
/Cedar/Forms/SeminarMsg.form!1
/Cedar/Forms/SiggraphReview.form!1
/Cedar/Forms/TOGReview.form!1
/Cedar/Gargoyle/
/Cedar/Gargoyle/Gargoyle.icons!1
/Cedar/Gargoyle/Gargoyle.tip!2
/Cedar/Gargoyle/GargoyleControlPanel.gargoyle!2
/Cedar/Gargoyle/GGHelp.tioga!2
/Cedar/Histograms/
/Cedar/Histograms/Histograms.icons!1
/Cedar/Histograms/Histograms.tip!2
/Cedar/MakeDo/
/Cedar/MakeDo/MakeDo-MTV.icons!1
/Cedar/PopUpButtons/
/Cedar/PopUpButtons/PopUpButton.tip!1
/Cedar/PopUpButtons/PopUpSelection2.tip!1
/Cedar/PreView/
/Cedar/PreView/PreView.icons!1
/Cedar/PreView/PreView.tip!1
/Cedar/SchemeLib/
/Cedar/SchemeLib/Imager.$cheme!2
/Cedar/SchemeLib/InterpressUtil.$cheme!1
/Cedar/SchemeLib/MExp.$cheme!1
/Cedar/SchemeLib/MixMaster.$cheme!1
/Cedar/SchemeLib/Paint.$cheme!1
/Cedar/SchemeLib/Scheme.$cheme!1
/Cedar/SchemeLib/Tendrils.$cheme!1
/Cedar/ShrinkWrap/
/Cedar/ShrinkWrap/ShrinkWrapDoc.tioga!2
/Cedar/Styles/
/Cedar/Styles/35mmSlide.style!1
/Cedar/Styles/35mmSlideEdit.style!1
/Cedar/Styles/4050.style!1
/Cedar/Styles/AnacapaBusinessLetter.style!1
/Cedar/Styles/AnacapaCedar.style!1
/Cedar/Styles/AnacapaSlides.style!1
/Cedar/Styles/Ascii.style!1
/Cedar/Styles/BlueAndWhite.style!1
/Cedar/Styles/BlueAndWhiteTwoColumn.style!1
/Cedar/Styles/BookletCedar.style!1
/Cedar/Styles/C.style!1
/Cedar/Styles/Cedar.abbreviations!1
/Cedar/Styles/Cedar.style!1
/Cedar/Styles/
/Cedar/Styles/CedarACM.style!1
/Cedar/Styles/CedarACM2Column.style!1
/Cedar/Styles/CedarACMDoubleSpaced.style!1
/Cedar/Styles/CedarACMNoReduction.style!1
/Cedar/Styles/CedarCode.abbreviations!1
/Cedar/Styles/CedarCode.style!1
/Cedar/Styles/
/Cedar/Styles/CedarDoc.style!1
/Cedar/Styles/
/Cedar/Styles/CedarIEEENoReduction.style!1
/Cedar/Styles/Default.style!1
/Cedar/Styles/DragonDoc.style!1
/Cedar/Styles/EP88.style!1
/Cedar/Styles/EP90.style!1
/Cedar/Styles/EP90ModernFonts.style!1
/Cedar/Styles/LaTex.style!1
/Cedar/Styles/Mail.style!1
/Cedar/Styles/Mesa.style!1
/Cedar/Styles/MixMaster.style!1
/Cedar/Styles/NewBlueAndWhite.style!1
/Cedar/Styles/PCedarDoc.style!1
/Cedar/Styles/PSlides.style!1
/Cedar/Styles/Scheme.style!1
/Cedar/Styles/Simple.style!1
/Cedar/Styles/Slides.style!1
/Cedar/Styles/Style.style!1
/Cedar/Styles/Tex.style!1
/Cedar/Styles/VoiceProfile.style!1
/Cedar/Styles/XCC.style!1
/Cedar/Styles/XCC1.style!1
/Cedar/Styles/xeroxc.style!1
/Cedar/TEdit/
/Cedar/TEdit/EditTypeScript.tip!2
/Cedar/TEdit/ReadonlyTioga.tip!1
/Cedar/TEdit/Tioga.tip!1
/Cedar/TelnetViewer/
/Cedar/TelnetViewer/TelnetViewer.tip!1
/Cedar/TFormat/
/Cedar/TFormat/TiogaUtils.jam!1
/Cedar/ViewerContexts/
/Cedar/ViewerContexts/ContextViewer.icons!1
/Cedar/ViewerContexts/ContextViewer.tip!1
/Cedar/Viewers/
/Cedar/Viewers/Button.tip!1
/Cedar/Viewers/Icons.tip!1
/Cedar/Viewers/MessageWindow.tip!1
/Cedar/Viewers/Slider.tip!1
/Cedar/Viewers/Standard.icons!1
/Cedar/Viewers/ViewerAdjust.tip!1
/Cedar/Viewers/WindowMgr.tip!1
/imagerfonts/xerox/xc1-2-2/
/imagerfonts/xerox/internal/xc1-3-3/modern.icfk
/imagerfonts/xerox/tiogafonts/
/imagerfonts/xerox/tiogafonts/amtex10.ks
/imagerfonts/xerox/tiogafonts/cream10b.ks
/imagerfonts/xerox/tiogafonts/gacha10.ks
/imagerfonts/xerox/tiogafonts/gacha10b.ks
/imagerfonts/xerox/tiogafonts/gacha10bi.ks
/imagerfonts/xerox/tiogafonts/gacha10i.ks
/imagerfonts/xerox/tiogafonts/gacha12.ks
/imagerfonts/xerox/tiogafonts/gacha12b.ks
/imagerfonts/xerox/tiogafonts/gacha12i.ks
/imagerfonts/xerox/tiogafonts/helvetica10.ks
/imagerfonts/xerox/tiogafonts/helvetica10b.ks
/imagerfonts/xerox/tiogafonts/helvetica10bi.ks
/imagerfonts/xerox/tiogafonts/helvetica10i.ks
/imagerfonts/xerox/tiogafonts/helvetica12.ks
/imagerfonts/xerox/tiogafonts/helvetica12b.ks
/imagerfonts/xerox/tiogafonts/helvetica12bi.ks
/imagerfonts/xerox/tiogafonts/helvetica12i.ks
/imagerfonts/xerox/tiogafonts/helvetica14.ks
/imagerfonts/xerox/tiogafonts/helvetica14b.ks
/imagerfonts/xerox/tiogafonts/helvetica14bi.ks
/imagerfonts/xerox/tiogafonts/helvetica14i.ks
/imagerfonts/xerox/tiogafonts/helvetica16.ks
/imagerfonts/xerox/tiogafonts/helvetica16b.ks
/imagerfonts/xerox/tiogafonts/helvetica16bi.ks
/imagerfonts/xerox/tiogafonts/helvetica16i.ks
/imagerfonts/xerox/tiogafonts/helvetica18b.ks
/imagerfonts/xerox/tiogafonts/helvetica6.ks
/imagerfonts/xerox/tiogafonts/helvetica6b.ks
/imagerfonts/xerox/tiogafonts/helvetica6bi.ks
/imagerfonts/xerox/tiogafonts/helvetica6i.ks
/imagerfonts/xerox/tiogafonts/helvetica7.ks
/imagerfonts/xerox/tiogafonts/helvetica8.ks
/imagerfonts/xerox/tiogafonts/helvetica8b.ks
/imagerfonts/xerox/tiogafonts/helvetica8bi.ks
/imagerfonts/xerox/tiogafonts/helvetica8i.ks
/imagerfonts/xerox/tiogafonts/hippo10.ks
/imagerfonts/xerox/tiogafonts/hippo12.ks
/imagerfonts/xerox/tiogafonts/hippo8.ks
/imagerfonts/xerox/tiogafonts/logo24.ks
/imagerfonts/xerox/tiogafonts/math10.ks
/imagerfonts/xerox/tiogafonts/math12.ks
/imagerfonts/xerox/tiogafonts/math8.ks
/imagerfonts/xerox/tiogafonts/timesroman10.ks
/imagerfonts/xerox/tiogafonts/timesroman10b.ks
/imagerfonts/xerox/tiogafonts/timesroman10bi.ks
/imagerfonts/xerox/tiogafonts/timesroman10i.ks
/imagerfonts/xerox/tiogafonts/timesroman12.ks
/imagerfonts/xerox/tiogafonts/timesroman12b.ks
/imagerfonts/xerox/tiogafonts/timesroman12bi.ks
/imagerfonts/xerox/tiogafonts/timesroman12i.ks
/imagerfonts/xerox/tiogafonts/timesroman14.ks
/imagerfonts/xerox/tiogafonts/timesroman14b.ks
/imagerfonts/xerox/tiogafonts/timesroman14bi.ks
/imagerfonts/xerox/tiogafonts/timesroman14i.ks
/imagerfonts/xerox/tiogafonts/timesroman16.ks
/imagerfonts/xerox/tiogafonts/timesroman16b.ks
/imagerfonts/xerox/tiogafonts/timesroman16bi.ks
/imagerfonts/xerox/tiogafonts/timesroman16i.ks
/imagerfonts/xerox/tiogafonts/timesroman18.ks
/imagerfonts/xerox/tiogafonts/timesroman6.ks
/imagerfonts/xerox/tiogafonts/timesroman8.ks
/imagerfonts/xerox/tiogafonts/timesroman8b.ks
/imagerfonts/xerox/tiogafonts/timesroman8bi.ks
/imagerfonts/xerox/tiogafonts/timesroman8i.ks
/imagerfonts/xerox/tiogafonts/tioga10.ks
/imagerfonts/xerox/tiogafonts/tioga10b.ks
/imagerfonts/xerox/tiogafonts/tioga10bi.ks
/imagerfonts/xerox/tiogafonts/tioga10i.ks
Finally do
Mako HomeCedarFiles.c.MakeIt; Mako -~o HomeCedarFiles.c; Mako HomeCedar.MakeIt