- From the Transcript or VisualAge Organizer, start the process by selecting
Browse Packaged Images or Packaged Images from the
Tools menu to open a Packager Control Panel.
When opened, the Packager Control Panel displays either the packaged
instructions saved in memory, if previous packaging instructions have been
saved, or the initial instruction chooser, from which you can select a new
packaging instruction. The active tab at the bottom of the Packager
Control Window is Choose Instructions. Packaged images are
created from packaging instructions and are maintained from the
Packager Control Panel. They do not disappear when the browser is
closed; they must be explicitly removed.
You can have several packaged images in progress at the same time.
Note, however, that packaged images are large objects, and your development
image could be significantly larger because of the packaged images you are
working on.
- On the Create New Instructions tab, select a packaged image
type. Each type contains instructions that form the basis for the new
packaged image. Alternatively, you can select an instruction that was
previously created and saved by selecting the Instructions In
Memory tab or instructions that have been saved to a database by
selecting the Instructions In Database tab.
- Packaging instructions
- Packaging instructions are classes that maintain the information to create
a particular type of packaged image. This information includes a base
set of applications, application launch code, packaging options, and
more. Packaging instructions are analogous to the packaging
specifications that were used in previous versions. Using a class to
store this information gives you the ability to maintain and version the
instruction.
- The instruction chooser
- The packaged instruction chooser lists all packaging instructions
currently defined in the system (all subclasses of
EpPackagingSpecification). You can either create new
instructions from a list of standard instructions that are supplied for you or
you can select a custom instruction you have saved in memory or in a
database.
If you are creating a new packaging instruction, select a type, which can
be either IBM Smalltalk reduced runtime image or VisualAge
reduced runtime image. You can also supply your own name for the
packaged image; this name is not required to be a Smalltalk class.
- The packaging instruction description
- The description normally holds information about the purpose of the
packaging instruction. It can also contain information about what steps
are required to produce the packaged image.
You can change the description string by editing the text in the
description pane. The description is saved when the packaging
instruction is saved (using the Save Instructions button).
- Select Modify Instructions to display the instruction
modification window. To add applications to the packaged image, use the
Applications and ICs tab. The tab has three panes: the
left pane lists the available applications that can be packaged; the
center pane lists the applications that have been selected to be
packaged; the right pane lists the available applications that the
packaged image can use. To add your application to the selected
applications, select it from the list of applications in the left pane and
press the >> button to move your application to the center
pane.
When you add an application, the packager adds the chosen application plus
its prerequisite applications to the list of applications to be
packaged.
- Supply your application launch code by selecting the Startup
Code tab. The launch code is a Smalltalk expression that launches
your application when the image starts. It is typically like the
following:
MyMainWindow new open.
In the Startup Code window, enter the launch code into the Application
Entry Point field. To rename the file name of the packaged image
from its default, epappl, specify a new file name in the
Output File field.
- You can modify the policies used in your packaging instruction by
selecting the Policies tab. On this tab, you can change the
reduction policy, statistics policy, dumper policy, problems policy, and the
rule policy. Enter a class name or accept the default policies
supplied. You can also alter the Options, which the system
applies when reducing the image size. Note, however, that it is not
usually necessary to modify these settings. You might change these,
however, if you are creating a new packaging instruction that you want to
save.
| The default is for any policy changes youmake to apply to packaged
executable files. That is, Runtime Reduction Policy is the
default. To specify policy changes for ICs (see Packaging with image components (ICs)), select Image Component Reduction Policy from
the Available Policies drop-down list.
|
- On the Packager Control Panel, select the Reduce button.
This step performs an analysis of the applications (including prerequisites)
being packaged. The packager uses the packaging instruction to
determine what is unused. As packaging problems are found, they are
listed in the window to be examined in the next step.
- Review the discovered problems by selecting the Examine & Fix
Problems button. The display now lists the potential packaging
problems detected.
Packaging problems are listed in the order they were encountered.
Common problems are prerequisite errors or references to methods that do not
exist in the packaged image. Use this browser to determine whether the
problems represent serious errors (for example, a class that was omitted), or
whether they represent warnings that can be safely ignored (for example, a
symbol that the packager assumes is the selector of an unimplemented method,
but is actually only used to represent state). All serious errors must
be corrected before your packaged image will function successfully.
- Fix any problems. Select each problem and examine the solutions
provided for you. You can choose to apply a solution or ignore the
problem, if it is not crucial for the application image to be packaged
correctly. Make sure your applications follow the packaging guidelines
(see Packaging guidelines). Define any additional methods required to make your
application more "packager friendly" (see Making applications packager friendly). When the problems have been fixed, return to the
Reduce button and, on the Reduce display, select the Reduce
Again button.
- Select Image Contents from the Browse menu to
display the Image Contents Browser window. In this window, you can
include or exclude applications, methods, classes, pool dictionaries, or
global variables from the packaged image. From the Options
menu, you can Collapse or Expand the lists of
applications, classes, pool dictionaries, and global variables. When a
list is expanded, you can see what selections have been included in the
packaged image and what selections have been excluded.
To include a method in the packaged image that has been excluded, select
Show from the Show menu and ensure that
Excluded is selected. Then, in the Image Contents Browser,
expand the Classes and expand the specific class in which the
method exists. Select the method and then, from the pop-up menu, select
include. In this way you can modify the objects packaged
with your application image.
- Save the modified packaging instruction. Select the Save
Instructions button, and make one of the following choices:
- If you select the Save these instructions radio button and the
Keep these instructions in memory radio button, the packaging
instructions will be saved as part of the packaged image and will be available
to you on the Instructions In Memory tab. This increases the
size of your image by making the instruction part of your image.
- If you select the Save these instructions radio button and the
Don't keep these instructions in memory radio button, the
packaging instructions will be saved to the database and will be available to
you on the Instructions In Database tab. This helps you keep
the size of your image smaller by saving the instructions outside of the
packaged image.
- If you select the Don't save these instructions radio
button and the Keep these instructions in memory radio button, the
packaging instruction will not be saved but will be available to you on the
Instructions In Memory tab.
- If you select the Don't save these instructions radio
button and the Don't keep these instructions in memory radio
button, the packaging instruction will be lost when you close the Packager
Control Panel window.
If you choose to save the instruction, provide a class name in the as
class input area and an application in the in application
input area. It is recommended that you not modify the subclass
of input area. If you choose an existing instruction class, the
packaged image information is saved to that class, overwriting any previous
instruction. If you choose to create a new instruction, provide a
unique class name.
- Select the Output Image tab to produce the packaged
image. During this process, the packager shows status messages.
- Version your packaging instruction class and its containing
application.