The following Frequently Asked Questions (FAQ) focus on runtime, packaging,
and VisualAge for Smalltalk:
How do I remove source code from my application? |
The easiest way is through Hatteras Software's SmartExporter (TM) product.
You can also do it yourself: In order to have source removed from
methods as a side-effect of exporting you will need to set up the removeSourceStructure
for your applications. See the comments in SubApplication class>>
#removeSourceStructure for details. As far as I can tell, you can only get
the system to utilize this structure by using the Configuration Maps Browser -
so you will need to put the app into a dummy map. (Actually, you could write
harness code to use SubApplication class>>
#moveFrom:to:mapping:removeSource:removeComments:forgetStoredObjects:, but
why bother?)
Warning 1: Due to exporting optimizations which cannot be turned off,
your new library will contain source (or not) depending on what you did the
FIRST TIME you exported to that lib. After that, timestamps are compared and
changes (adding or removing source) will not occur.
Warning 2: Under
certain conditions your methods will need to be recompiled (under the covers) as
they are being loaded. If these methods have no source, then the application
will not load. Some of the conditions that require this recompilation are:
(a) compiletime constants - ##(Set new) (b) a new bytecode version
(This happened between V2 and V3 of VisualAge) (c) a class definition
change in the hierarchy of the class containing the method. (The bytecodes need
to be recompiled so that the -possibly changed- offsets of the instance
variables can be reestablished.)
Warning 3: Hide as little as
possible to prevent the problems just mentioned.
Note: Removing the
source does not alter timestamps and does not reduce library size - it merely
fills the source area (of the method in the library) with binary zeros.
Another option: If the new library is complete enough that you can
connect an image to it and run, then you can load the applications you wish to
hide and then send the #removeSource method to all of its compiled
methods. (Again - this is permanent. The method editions in the library connect
to the image at the time that you do this will never again have source. DO NOT
DO THIS IN A DEVELOPMENT IMAGE THAT IS CONNECTED TO YOUR WORKING MANAGER!) |
Can I use a name other than "image" for my image file? |
| Yes. There is a command line option -i, which can be used to
specify an image. For example "abt -imyimage Please visit our site to learn about Free Gift Cards offers " will use the
file "myimage" as the image file. |
How can I keep my runtime image size small? |
Tips:
- have a small image to run packaging from, only
containing the absolute minimum classes and methods (no other applications, no
samples, no unnecessary infrastructural support)
- do not use "standard"
method names, as the packager seems to determine class and method exclusion by
name, disregarding the class context for method names (e.g. calling a packaged
and needed method "doSomething" will package EVERY method called "doSomething"
that is found in your entire development image, which will include every class
...
- get the prerequisites right. Having unnecessary or wrong
prerequisites can be fatal |
How can I specify classes I want the packager to include? |
| Implementing the method #packagerIncludeClasses (on your
applications) to answer aCollection of classes that you want to force the
packager to package will solve this problem. Browse implementors of #packagerIncludeClasses
for more details. |
What does it mean if I get a "DLL cannot start" message at runtime
startup? |
| It usually means you haven't copied all the required files to the runtime
machine. Review your list of files with those found in the VisualAge User's
Guide. Pay particular attention to the list of files immediately below the "AIX
only" heading. Some folks take this to mean these files are just for AIX,
which is not true. Also, there are two potentially required files that may be
missing from the book: estko30.dll and estkp30.dll. |
How can I get runtime output normally written to the Transcript? |
| At runtime, the value of Transcript is the same as TranscriptTTY
default. The only way to see TranscriptTTY output is to specify the
-lfilename commandline switch (on Windows and OS/2). |
How do I strip down my development image when producing a runtime? |
| You can use the "one button" packager from the Organizer or you
can use the Packaged Images browser, which gives you more control. |
How do I find out what messages files I need at runtime? |
Use the following script to scan the messages generated during packaging
and show you what catalogs your code referenced. That's the "minimum set"
of *.cat files you need to distribute. BTW, most "non error" items
are bound to the image using the CAT entries from the development environment
(English). These files are needed if the locale changes because it is on a
non-US machine or a runtime error occurs.
To use this script, save
the window titled Packaging Applications "Your App Name". Execute the
script and point the file prompter to the file you saved in the previous step.
See EsPoolDictionary>>indexedMsg: for details.
| stream tokens file |
file := (CwFileSelectionPrompter new)
title: 'Packaging Messages'; prompt.
(file isNil) ifTrue: [^nil].
stream := CfsReadFileStream
open: file.
[stream atEnd] whileFalse: [
tokens := stream nextLine subStrings.
((tokens size > 0) and: [((tokens at: 1)
indexOfSubCollection: 'NlsCat' startingAt: 1) > 0]) ifTrue: [
Transcript cr; show: 'References messages in: ',
((Smalltalk at: (tokens at: 1) asGlobalKey)
at: ']CATALOGNAME')]].
stream close.
|
How can I use my own "splash" screen upon runtime startup? |
| If running VisualAge for Windows and you want to replace the splash screen
and/or the icon on the system menu's title bar: There is a DIALOG directory
created under the VisualAge product directory which includes a README file with
instructions and required parts to change the splash/icon. (For Pro users,
there may be a WIN-DIALOG directory.) This directory also includes a sample
.exe, NODIALOG.EXE, which will not display a splash screen. For runtime
applications, you can use this NODIALOG.EXE instead of the ABT.EXE. The
NODIALOG.EXE is the same thing except it does not display the splash screen. If
running VisualAge for OS/2 and you want to replace the splash screen and/or the
icon used for the system menu's title bar: Go to the DIALOG directory created
under the VisualAge product directory (for Pro users, the directory may be
OS2-DIALOG). Edit the ABT.RC file (changing the name(s) of the icon/bitmap
file(s)) and run the OS/2 resource compiler on ABT.EXE. You can also use the
OS/2 dialog editor to create the file. Note: The constants defined in ABTRC.H
are known in the Smalltalk image so you should not change them. To run the
resource compiler (can be found in OS/2 Toolkit), execute the following: Crc
abt.exe You can also use the NODIALOG.EXE in place of the ABT.EXE for OS/2 to
avoid displaying the splash screen at all. |
How does my VisualAge application start execution? |
| In the Smalltalk image the default packaging spec prompts you for "launch
code." This is text that is compiled into a method and called after the
runtime image is started just before dropping into the polling loop. In the
VisualAge image the default packaging spec doesn't prompt you for any launch
code, it sends #runtimeStartUp (don't forget the capital U) to all
resident applications instead. So you either need to supply launch code or a
runtimeStartUp method. If you are in a VisualAge image but your
application is not a VisualAge app then you can specify EpStandardRuntimeSpecification
which will prompt you for launch code and may end up with a smaller runtime
image. |
Are there runtime fees for VisualAge? |
| No. |
How much disk space and RAM are required for a VisualAge runtime? |
| Currently the runtime applications consume a minimum of 1.5M of disk space,
and depending on the size of the application and the objects being used, the
target system requirements vary from a 386 with 12M of RAM to a 486 with 16M of
RAM. Database operations and objects such as the notebook require more
resources. 33 MHz Intel 80386 IBM or IBM-compatible 8-12MB installed RAM for a
typical application; however, installed RAM and hard disk space depend on the
size and run-time requirements of the packaged application. |
What do I have to do when a new VisualAge release comes out? |
| One of the features of the IBM VisualAge development environment is the
ability to easily port existing VisualAge applications to other platforms and to
easily upgrade the runtime environment for a new release of VisualAge. Basically
all that is necessary is to repackage the application with the new runtimes and
DLL's and you're done. |
What do I have to do to change the splash screen? Where can I find
nmake.exe? |
The nmake.exe is an executable that accompanies a compiler such as
Microsoft's C/C++. The changing of the splash screen can be done in the
directory, d:\VISUALAG\DIALOG, where the header files, etc. can be found.
Backup the .rc and makefileand then alter them with your own bitmaps and icons.
Run the compiler with nmake to generate a new executable such as abt.exe or
ibmst.exe. A lot of this information assumes you are familiar with programming
in C or C++.
You are not limited to Microsoft's compiler. You can use
IBM's VisualAge C++ compiler and possibly, Borland's, etc. The product provides
the resource compiler, rc.exe to merge the graphic resources into the
executable.
If you do not want to buy a compiler, you need to use the
resource compiler that comes with your operating system. OS/2 has rc.exe
located in the d:\OS2 directory. I'm not sure if one comes with Windows 95 or
NT. If it does, then you can execute the commands from the makefile manually as
follows:
copy nodialog.exe abt.exe
rc.exe abt.rc abt.exe
where abt.rc is your modified resource list. If your OS does not
provide the resouce compiler free, then you'll need to find out from MS how to
get just the resource compiler. |