To package your application into a shrink-wrapped executable file, do the
following:
- Create or find an empty directory on your workstation.
- In the VisualAge Organizer window, pick the application that you want to
package into the finished product.
- From the Applications menu, select Make
Executable.
- In the Windows to show at startup list, select the visual part
you want to appear first when your application starts. You can pick
more than one if you want, or you can select None.
If you select None, make sure that the application class has a
class method that provides startup logic. For information on startup
logic, refer to descriptions of the method runtimeStartUp in materials on
packaging in the IBM Smalltalk
User's Guide.
- Check the list of prerequisite applications. Ensure that the
application has all needed prerequisites and doesn't name edit-time
applications such as AbtBuildViewsApp. If the
Prerequisite applications list doesn't show the correct
prerequisites for your application, select Change and fix the
prerequisites in the displayed dialog.
You can only include as prerequisites applications that you make and
applications that IBM(R) permits you to redistribute. For a list of
redistributable applications, refer to the online .api file.
- Note:
- One way to see if your application names the correct prerequisites is to
check messages printed to the System Transcript. If you see the message
#<method>: should not reference <class>, the
application you are working with needs to add a prerequisite. The
application containing the class named in the message is what you should add
as the prerequisite.
- Select OK.
- After a prompter opens, saying that it might take 15 to 30 minutes to
package, select OK.
- In the displayed file dialog, select the empty directory, specify a file
name such as myapp, and select OK. VisualAge
starts the packaging and displays a window that gives you progress
messages.
If VisualAge finds methods that reference global variables or classes that
don't exist in your application, it informs you that it found "packaging
problems" and opens a Packager Reference control panel that lists the
problems. Later, you can come back to this browser, change your
application to resolve the problems, and try packaging again. If none
of the problems listed refer to methods in your application, packaging is
complete. Select Cancel.
- When VisualAge completes the packaging, the "empty" directory contains the
startup executable, the runtime image, and diagnostic .ES files.
So you can run the runtime image, copy the following files to the "empty"
directory:
Any .MPR, .DLL, or other files used by your
application. For OS/2 and Windows, you might need to copy
ESVM40.DLL, plus other DLL files, to the directory if your
system's environment variables cannot find the file.
- Run the runtime image and test it. To run the runtime image,
double-click on any icon for the startup executable or enter at a command
prompt:
<base .IMG and executable file name>
That is, if you specified MYAPP.ICX for the packaged image name and
the startup executable has MYAPP in its name, enter
myapp
on Windows or OS/2. On UNIX, enter
myapp&