Server Guide : Packaging server applications : Packaging a Smalltalk image : Example: Simple Single Module Packaging
Example: Simple Single Module Packaging
In this example illustrates the packaging of the Hello World configuration map (shipped with VA Smalltalk) into a single runtime image. The purpose of this example is to show the simplest possible use of the packager in the context of headless or cross platform development, including the initial generation of packaging instructions.
Hello World writes text to the console. It has no user interface to control what is written or where it is written.
The Packaging Steps start with a shipped image. Here the steps are repeated with links to how to accomplish each step. Steps unique to cross platform packaging appear in bold.
Launch a clean development image.
Load ‘ST: Server Workbench, Base’ feature.
Once the feature is loaded, the Transcript has a new pulldown menu named XD.
Create a new ENVY Application called HelloWorldPackagingInstructionsApp for Hello World’s packaging instructions.
Note
This ENVY Application must be an open edition in the development image BEFORE opening the packager in the passive image.
Create a new passive (XD) image for the Windows platform. (See how.)
Note: The XD pulldown menu has a new entry after the Development menu item.
Note
If you have a Linux installation as well as a Windows installation, you could choose to package for Linux. If you do, you must also test on Linux.
If the new passive image is not the current one, make it the current image. (See how.)
In the passive image:
Load the Hello World Configuration Map. (See how.) If it loads without error, continue packaging.
Save the image from the XD Transcript. This saves the passive image together with the development image.
Start the packager from the XD Transcript. (See how.)
Create XD Single Image instructions and modify them to
include the HelloWorld Application,
specify HelloWorld helloWorld as the startup code and
specify helloWorldXD.icx as the output file.
Observe the startup class isAbtStackDumpStartup. The packager chooses the startup class based on what is loaded in the passive image.
Reduce.
Save the new packaging instructions.
change the class for packaging instructions to HelloWorldPackagingInstructions and
change the application to HelloWorldPackagingInstructionsApp.
Leave the subclass alone.
Save the instructions
Output the reduced runtime image.
Close the packager.
Make the development image the current one. (See how.)
Close the image from the Transcript without saving.
 
The next activity is to manage the newly created packaging instructions.
Launch a clean development image.
Use the Application Manager to load HelloWorldPackagingInstructionsApp.
Find unloaded classes in HelloWorldPackagingInstructionsApp. One of these will be HelloWorldPackagingInstructions. Load it and then version it and release it into HelloWorldPackagingInstructionsApp.
Now you can use these instructions the next time you package Hello World.
Look at the directory in which you started the development image. You should see helloWorldXD.icx. This is the single packaging module, aka the runtime image. The packaging process also creates HELLOWORLD.SNP and several packaging statistics files (with ES extensions), which are useful in debugging but not required to run the reduced runtime image.
The next thing to do is run the reduced runtime image.
Last modified date: 09/11/2019