 |
 |

As I told you before, you'll learn how to build a
simple Palm OS application that writes "Mac and Palm rock!"
on the screen using the tools you've just installed (however, as said
in the read section, you won't learn here how
to write/program that application since this is not a developer's site
that teaches you C/C++ language for Palm OS applications).
That sample application, which we'll call MacPalm, has also a menu bar
and an About box.
Step One: Prepare Project Builder
We will use Project Builder since it's a really nice and powerful product
with many cool features like syntax coloring, syntax-aware indentation,
cross-platform line ending compatibility (Unix-LF, Mac-CR, Windows-CRLF)
and finally it's FREE (included in Developer Tools).
Open the Project Builder application (in /Developer/Applications).
If this is the first time you launch the app, you'll be asked to choose
the window mode: Single Window, Some Windows or Many Windows, I recommend
you the Single Window mode (you can always change it in the Preferences).
Now choose "New Project..." from the File menu, select "Empty
Project", click the Next button and type "MacPalm" as Project
Name. Leave ~/ as location for your project folder and hit the Finish
button.
Step Two: Download the
source code

Unstuff the downloaded archive, open the
folder called "MacPalm source", select all the files inside
that folder and drag them to the left column of your Project Builder window
(under "Groups & Files"). A dialog box will come down, but
before clicking the Add button make sure you have
selected the check box called "Copy items into destination...".
Now you can quickly and easily access to your project's files and when
you need to edit them (not in this tutorial) you'll feel very comfortable
and productive.
Your Project Builder window should now look like this
one.
Step Three: Compile the
source
The source code you've just downloaded is complete and ready to be compiled,
so you basically don't need to edit and modify it. Of course, once you
are familiarized with it, you can amuse yourself and make changes, but
at this moment, please keep it simple and follow the instructions without
modifying it.
So, open the Terminal application (in /Applications/Utilities) and type
"cd ~/MacPalm/" to go to your project
folder.
To compile simply type "make".
(There's also a way to compile using the built-in buttons of Project Builder:
see this
tip in the forum).
If you open the MacPalm folder you'll notice that a lot of files have
been created but what you really need are the original source files and
the new MacPalm.prc which is finally your Palm application. So, go back
to the Terminal and type "make clean";
this will remove the unnecessary files in your MacPalm folder.
Look at this screenshot
to see the compiling process on the Terminal.
That's it! You have finally built your first Palm application using PRC-Tools
on Mac OS X!
Step Four: Test your application
You can now install your fresh new application directly into your Palm
handheld (simply double click the MacPalm.prc and perform a HotSync operation)
or you can test the application on POSE
(Palm OS Emulator) like shown in this
screenshot.
If you have any problem, question,
suggestion, remark or comment, please don't be shy: USE
THE FORUM!
|
 |
 |