|
Application Note |
|
AltiaÒ
Design 2.3 for Windows 3.1/95/NTHuman Interface Design Software
Creating Custom Altia Runtime Applications
This Application Note describes the steps necessary for creating a custom Altia Runtime application. A floppy labeled Altia Runtime Demonstration normally accompanies this application note. It serves as a working demonstration for developers.
Files Required for a Custom Runtime
Several files supplied with the standard Altia Design installation must be part of the custom runtime. For Microsoft Windows operating systems (3.1, 95, and NT), the following files from the Altia
bin directory must be included: altiart.exe - The Altia Runtime executable fonts.ali - The font name alias file which translates generic font specifications into specificPC font specifications
colors.ali - The colors name alias file which translates color names into specific RGB color valuesIn this application note, it is assumed that the custom runtime will be installed on a floppy so the files listed above would simply be copied to a floppy disk from a system containing the full Altia Design installation. The end-user would have the choice of executing directly off of the floppy or copying the files on the floppy to a hard disk directory and executing from there.
If your design uses the sound capabilities provided by Altia Design, you will need to include the sound files for the sounds you use. All standard sound files are found in the Altia
sound directory. Copy the sound files you use to the same directory containing the other runtime files; or, you can copy them into a sub-directory named sound.If the runtime includes a Visual Basic application program that interfaces to Altia (see the Using Microsoft Visual Basic with Altia Design Application Note for more details), copy
altiadde.dll (for a 16-bit VB app) or altdde32.dll (for a 32-bit VB app) from the Altia lib directory to the floppy.The other files which go on the same floppy must be supplied by the developer. They would include the actual design file (e.g.,
demo.dsn), the associated runtime configuration file (e.g., demo.rtm), and an application program to control the design (e.g., demo.exe) if appropriate. With Altia Design 2.3, no code word is required to execute Altia Runtime. If you have purchased Altia Design 2.3 development software or you have received new software while under a software support agreement, you are automatically licensed to create an unlimited number of runtime applications for distribution to customers or colleagues.For Windows 3.1 and Windows for Workgroups users, two floppies containing the WIN32s operating system extensions must accompany a custom runtime floppy. The WIN32s floppies should be an exact copy of the WIN32s floppies supplied with the Altia Design 2.3 product. Each WIN32s floppy contains only a single directory hierarchy so they are easily duplicated by first copying all files to two hard disk directories (e.g.,
copy a:*.* c:\WIN32S.1 for floppy #1 and copy a:*.* c:\WIN32S.2 for floppy #2) and then recopying the hard disk directories to new floppies as needed (e.g., copy c:\WIN32S.1\*.* a: to duplicate floppy #1 and copy c:\WIN32S.2\*.* a: to duplicate floppy #2). The end-user must install WIN32s by executing the setup.exe command found on floppy #1.Executing a Custom Runtime
In order for a complete design to execute,
altiart.exe must be executed and passed the design file name using the option pair -file DESIGN_FILE (e.g., altiart.exe -file demo.dsn). If the design includes an application program (e.g., demo.exe), the application program must also be executed. On Windows 3.1 and Windows for Workgroups, specifying command line options and executing an application program cannot be accomplished easily without an icon item.If your custom runtime has no application program, you can take advantage of the special
demo.exe application program on the Altia Runtime Demonstration floppy to simplify runtime execution. This program, when executed, automatically starts the Altia Runtime executable altiart.exe and supplies it with a design file. The name of the design file is determined by taking the base name for the application program and adding the extension .dsn to it. For example, if you rename the supplied demo.exe file to auto.exe and execute it, the program will start altiart.exe with the design file auto.dsn if it exists. Using this approach, it is only necessary for the end-user to double-click on the special application program from a File Manager directory list to execute the custom runtime.If your custom runtime has an application program, the program can start
altiart.exe with the appropriate design file. This is accomplished very easily with the AtStartInterface() function supplied with the Altia Design Application Programming Interface (API) library. For example, an application program can start altiart.exe and load the design file auto.dsn by adding the following C source lines near the beginning of the main(int argc, char **argv) function:if (AtStartInterface("auto.dsn", 0L, 0, argc, argv) < 0)
exit(1);
Upon successful return from AtStartInterface(), the application is ready to execute as always. If AtOpenConnection() is already being used, then simply replace it with a call to AtStartInterface() and make the necessary parameter changes (note: both of these functions are documented in Section 2 of the Altia Design Reference Manual). Using this approach, it is only necessary for the end-user to double-click on the application program from a File Manager directory list to execute the custom runtime.
If the runtime is only being developed for execution on Windows/NT or Windows 95 systems, a .bat command script can initiate the execution of
altiart.exe and the application program. For example, a go.bat file for executing a design named stress.dsn with an application program stress.exe might contain:altiart.exe -file stress.dsn -exec "stress.exe -retry 1"
A Working Demonstration
A floppy labeled Altia Runtime Demonstration normally accompanies this application note to serve as a working demonstration for developers. It is an automotive climate control demo installed on a floppy for runtime-only execution. To execute the demo, simply display the files on the floppy in a File Manager window and double-click on
demo.exe. The demo.exe program is a special application program that you may wish to reuse for your own custom runtime. It was described in more detail under Executing a Custom Runtime.
In addition to the minimum files required for runtime execution (for this example, they are
altiart.exe, fonts.ali, colors.ali, demo.dsn, demo.rtm, demo.exe), the source file for demo.exe (demo.c) and make files for recompiling it as a 16-bit or 32-bit application are also included on the floppy.