|
There are certain minimum requirements of an
EXE and these need to be provided to create an STMT EXE. Because an EXE is
a totally stand-alone component, it requires at least a message file to
allow it to print out certain messages.
This is the simplest way to get started.
1. Create a Project directory for your Smalltalk MT project (e.g.
MyProject). This directory will contain the project file or files(e.g
MyProject.sp or MyProject.spx)
2. Create the resources. Go into the GUI Builder and select File
menu->New->Resource script and point to your project directory. Select the
things you need (typically About Box, Application Icon, Message File,
Version resource). This will create a res folder in your project
directory.
3. Compile the resources. With a command window, go to the res folder
under your project. Type NMAKE. This will build a DLL with the same name
as your project (important!). This DLL contains the resources you
specified in step 2. This will
only work if you have C/C++ installed.
4. In your project folder, create a winmain.sm file which contains the
instructions to start your application. There are lots of examples of
these in the samples.
5. Load your project into STMT and build the exe. The winmain.sm will
be loaded and compiled, and all of the resources from the resource DLL (in
the res subdirectory) will also be loaded into your EXE.
The resulting EXE will be placed in your STMT image directory by
default.
What if you don't have C++? This means that you cannot use the NMAKE
command to create a resource DLL. In that case, you can use one of the
resource DLL's provided with STMT.
Look in <install dir>Smalltalk MT 4\Samples\Tutorial\Intro\GenApp\res
and you will find GenApp.DLL
This DLL contains 6 resources. Namely an About Dialog, Large and Small
Icon, a Message Table, a String Table and a Verion resource. Take this DLL
and place it into the res directory for your project. Then
rename the DLL to your project
name (e.g. MyProject.DLL). It must be the same name as the project
for the STMT project builder to find it.
Now do step 4 and 5 to create your EXE.
|