| Installing SuperWaba 3.x on Mac OS X to develop for PalmOS |
Installing SuperWaba 3.x on Mac OS X to develop for PalmOS
OVERVIEW Installing the Waba SDK or the SuperWaba SDK allows you to develop software for the PalmOS using a subset of the Java language. The instructions on this page are based on my install of SuperWaba 3.2.1 on OS X 10.2, and assumes that you are using the tsch shell (default for OS X). This page is greatly informed by Christopher C. Stump's 'SuperWaba for the Linux Newbie'. Please if there is something wrong with these instructions, or if there is a better way to have accomplished any of this, or if you have any questions. [disclaimer] You can not hold me responsible for anything that might go wrong due to you having visited this web page. - John Murden INSTALLING SUPERWABA
COMPILING USING SUPERWABA With the SuperWaba SDK in place and the classpath properly defined, one can begin developing SuperWaba applications. [ HellowWorld.java ] In order to test/run this program either on a Palm OS/WinCE device or Palm OS Emulator (POSE), we must transform the .java source code into a Palm OS executable .prc file. This can be accomplished in a few easy steps:
Exegen is a java program that can also be found in same directory as Warp. Exegen's purpose is to create the .prc file, which is the SuperWaba program in Palm OS executable form. The first argument to Exegen is the name of the to-be-created .prc file. The second argument is the name of the main source code file. The third argument is the name of the .wrp file. If the above steps were successful, a ready-to-use/test Palm OS application should be in the current directory. There should be files called <name<.prc and <name<.pdb (the example above would create HelloWorld.prc and HelloWorld.pdb). Both of these files, along with the SuperWaba virtual machine files, must be installed on a Palm unit or POSE in order to run the application. The SuperWaba virtual machine files can be found in /Library/Java/Extensions/superwaba/bin/palm/ /Library/Java/Extensions/superwaba/bin/xplat/Libraries/ . NOTE: You might get the error File Stub.prc not found in classpath when running Exegen. To fix it, open superwaba/bin/PrcFile.java and look for a file path that uses a Windows \\ instead of the / that a *nix system would expect. In my current version, around line # 83 there is the line: fis = new FileInputStream(newFile(InputFile.classPath[i],"..\\vm\\palm\\Stub\\Stub.prc")); Change it to: fis = new FileInputStream(new File(InputFile.classPath[i],"../vm/palm/Stub/Stub.prc")); and recompile. Everything should then be fine. RUN PALM APPS AS APPLETS LOCALLY
You should now be able to run your new Palm app as an applet on your Mac. In Terminal, cd to the directory of your .class file, and type:[command prompt]% java waba.applet.Applet classname This should cause the Applet runner to open and display your application. NOTE Mac OS X 10.2 has hardware acceleration for graphics on by default which can cause display issues with some java programs. To run a SuperWaba applet on the desktop in OS X 10.2, you may need to use: [command prompt]% java -Dcom.apple.hwaccel=false waba.applet.Applet classname OTHER INFO The above command line arguments can be tedious to type repeatedly while developing. Therefore, it is much nicer to place all of the commands in a simple shell script so everything can be easily run in sequence with a single command. To do this:
You'll have to log out and back in to be able to use swm. In Terminal, cd to the the same directory as your HelloWorld.java and do the following to automatically compile the HelloWorld.class, run Warp and Exegen, and launch the app as an applet: #Invoke shell script to handle SuperWaba app creation [command prompt]% swm HelloWorld LINKS SuperWaba Home http://www.superwaba.com.br/ Waba Home http://www.wabasoft.com/ Waba on SourceForge http://waba.sourceforge.net/ Waba/SuperWaba discussion news://news.falch.net/pilot.programmer.waba Apple Developer Connection - Java http://developer.apple.com/java/ http://developer.apple.com/techpubs/macosx/Java/java.html SuperWaba for the Linux Newbie - Christopher C. Stump http://www.parmly.luc.edu/cstump/www/other/waba-howtos/intro-howto.htm http://www.parmly.luc.edu/cstump/www/other/waba-howtos/superwaba-howto.htm Example - SuperWaba 2.x Application as an Applet http://www.lestercat.net/dev/palm/scribble/ Using SuperWaba on Mac OS X to develop for PalmOS (SW 2.x on OS X 10.1) http://www.lestercat.net/dev/superwaba/index_2.1.php4 Updated 2002/10/18 |
|
.
|
|
lestercat.net
|