Packaging, unloading, and analyzing code : Advanced packaging : Advanced packaging: The process : Running your packaged image

Running your packaged image
The basics of running your packaged image are described under Simple Packaging. In the example, nodialog was used to launch the example and the .ini file from the development was used along with the packaged image as parameters. It was run within the same VA Smalltalk installation which generated the packaged image.
Now is the time to describe how to design a target environment in which to run your packaged image.
First, review the components of a command such as nodialog –iepappl –ini:abt.ini. in addition to the packaged image itself specified in the –i parameter.
Choosehow to start your packaged image.
you want a splash screen
you want a splash screen
you do not want a splash screen
you do not want a splash screen
you do not want a splash screen
you do not want a splash screen
In order to run your packaged image, you need an .ini file in addition to this image file.
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\tips.gif
If the packaged image is to be run in the development environment, the abt.ini in the same directory as that packaged image could be copied and renamed to match. This would have all the changes to the .ini file which were needed to run the user application in the development environment, but it would also have entries specific to software development.
Setting up to run
Where can you choose to run your packaged image? There are at least two choices:
1.
2.
Running the packaged image from the development environment is suitable for quick level testing. The best place to extensively test your runtime image is in a target environment within a separate context such as the Server Runtime (available on the Instantiations download page) which uses a preconfigured directory tree of needed files. It is the better context for testing
because it separates the development environment from the target enviroment.
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\tips.gif
Pick the Server Runtime with the same VA Smalltalk version and bitness as that of the VA Smalltalk Development Image which produced the reduced runtime image.
If you choose to run in the Server Runtime, you must move the packaged image to the root of the decompressed Server Runtime tree. The ini file you choose will be under the Server Runtime directory, not in the VA Smalltalk installation.
Once you locate the proper .ini file, copy it to the same directory as your packaged image, and then rename it to match the packaged image file.
Open a command terminal and change directory to the directory with the packaged image.
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\windows.gif
To run in the development environment, the command terminal must be a VAST command terminal, which is available through a shortcut on the Start menu or through Environments ‘open command window’ menu item in the context menu any selected environment.
Running a packaged image with a User Interface
You run your newly packaged application by starting the executable from a command terminal with your packaged image file name as the image parameter:
e.g.: Development Environment nodialog -iepappl
e.g.: Server Runtime
The use of nodialog indicates the packaged image has a user interface. The parameter -i tells the executable to use the named image rather than the default image name abt.icx. The lack of -ini on the command line indicates the presence of an .ini file named epappl.ini.
Running a headless packaged image
If your application has no user interface, you run your packaged image by starting the executable esvio.exe (or esnx on UNIX) with your packaged application file name as the image parameter.
The Hello World example is such a headless application. It outputs a string “Hello world from Smalltalk” to the console. If hello.icx is the reduced runtime image generated by the packager, and hello.ini is the .ini file from the newimage directory, the command line is as follows
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\windows.gif
C:\Users\documentation\Documents\vastePublisher\stable\VAS Documentation Word\images\aixicon.gif
For more information on packaging and running the Hello World example and other headless user applications, see Server Guide.