SDK Programs

The WabaSDK contains two programs that are used to build and package Waba applications. Both are located in the "bin" subdirectory of the WabaSDK distribution.

The two programs are:

The warp program is used to package a group of files, such as classes and images, into a single file. The name warp is an acronym, short for "waba application resource package".

The exegen program is used to create a program that launches a Waba application.

The SDK does not contain a compiler or development environment because a Java compiler and IDE can be used to create Waba programs.

warp

The warp program is used to create warp files and list their contents. Conceptually, warp files are similar to ZIP, JAR or CAB files. They package a number of files into a single file.

There are two types of warp files. Warp files ending with .pdb are PDB warp files and are used with PalmOS devices. Warp files ending with .wrp are standard warp files and are used with Windows CE devices. When you run the warp command to create a warp file, it will create both .wrp and .pdb files.

The warp command has the following syntax:

> warp command [options] warpfile [files]
where "command" is one of
   c   Create new warp file
   l   List contents of a warp file
and the options are:
  /?   Displays usage text
  /c   Override and assign PDB database creator (e.g. /c CrTr)
  /q   Quiet mode (no output except for errors)
Here is an example showing the warp command being used to create helloApp warp files. Both a helloApp.pdb and helloApp.wrp file will be created by running this single command. All the class files in the current directory and all the class files in the util subdirectory will be added to both warp files.

> warp c helloApp *.class util\*.class
The .pdb file is a warp file that can be loaded onto a PalmOS device. A PDB database name and PDB creator is generated automatically from the name of the warp file.

The warp command can also be used to list the contents of a warp file. In the example above, we created two warp files. Here is an example showing how to list the contents of both the warp files that were created above:

> warp l helloApp.pdb
> warp l helloApp.wrp

exegen

The exegen program is used to create launch application for Waba programs. A launch application starts up the WabaVM on whatever machine it is running on and passes it various parameters telling it where the classes for the Waba program are, what size the main window should be and how much memory should be allocated to the program.

The exegen command has the following syntax:

> exegen [options] exefile main-window-class warpfile [warpfile2 ...]
where the options are:
  /?   Displays usage text
  /h   Assign height of application's main window
  /i   Assign PalmOS PRC icon (e.g. /i sample.bmp)
  /l   Assign size of class heap (e.g. /l 10000)
  /m   Assign size of object heap (e.g. /m 20000)
  /p   Full path to directory containing warp file under WindowsCE
  /s   Assign size of stack (e.g. /s 2000)
  /t   Assign size of native stack (e.g. /t 50)
  /w   Assign width of application's main window
As with warp, two files are generated when the exegen program is run. One is a .prc application for PalmOS and the other a .lnk file for Windows CE. File extensions are generated automatically. For example, if you specify myapp as the exefile, a myapp.lnk and myapp.prc will be created.

The /w and /h parameters define the default width and height of the Waba program's main window. Under PalmOS these width and height arguments are ignored and the main window always has a size of 160x160 (the full screen of the PalmOS device).

A value of 0 for either the width or height will cause the main window of the Waba program to appear at a default size which is different for each platform. Under Windows CE specifying values of 0 for width and height will cause the Waba program to run full-size with no title bar.

The /p parameter defines the full path to the directory which will contain the warp file under WindowsCE. This path is placed in the shortcut (.lnk) file so the application will know where to find its warp file.

For PalmOS, if no icon is defined, a black box is used. Any icon given must be in .bmp format. A PalmOS PRC creator and PRC name will be assigned based on the warpfile and exefile respectively. The exefile must be 30 characters or less.

The sizes specified are used by the WabaVM to determine how much memory to allocate for the app. The size of the class heap defaults to 14K. The size of the object heap defaults to 8K. The size of the program stack defaults to 1500 bytes. The size of the native stack defaults to 300 bytes.

Here is an example showing the exegen command being used to create launchers for a program called helloApp. In this example, the icon for the launch program will be the "hello.bmp" image, the WabaVM will allocate the default amount of memory for the program and the program's main window will appear at the default size.

> exegen /i hello.bmp Hello HelloApp helloApp
In this example, the exegen program is generating a launch program that will cause the main window of the application to be sized to 160x160. The object heap allocated by the WabaVM for the program is set to 20K.
> exegen /w 160 /h 160 /m 20000 Hello HelloApp helloApp
In both examples above, the name of the application is "Hello". The class for the main window of the application is "HelloApp" and the warp file for the program is named "helloApp".

A single program can be composed of multiple warp files. If a program is using multiple warp files, you need to specify the additional warp files the program is using on the exegen line.

For example, if the helloApp program was using math classes in a warp file called "mathlib", the exegen line might look like this:

> exegen /i hello.bmp Hello HelloApp helloApp mathlib