updated Februrary 12, 2002
For Mac, unstuff, and then put PilRC into {Compiler}:CodeWarrior Plugins:Compilers
For Windows, unzip, and then put PilRC.DLL into {Compiler}\Bin\Plugins\Compiler
Make sure you have the Palm OS 3.5 or Palm OS 4.0 SDK downloaded—you'll need it for the UIResDefs.r file.
In File Mappings panel, add a .rcp entry that compiles with PilRC plugin. Make sure that all the checkmarks in the flags popup are off and the File type is TEXT.
Here's an example Command.rcp file:
pilrc -LANGUAGE FRENCH myrealpilrcfile.rcp
A .r file will be added to your project that contains Rez source for your .rcp resources.
No lines, frames or rectangles in a form.
Menu item IDs must be consecutive within a menu.
The -H flag (that generates constant values for unknown identifiers) is supported, but the file to be generated must already exist (it will be overwritten).
All form object IDs must be unique (even across forms). This is a limitation shared with Constructor.
In a list, the number of visible items can't exceed the number of items in the list. This is a limitation shared with Constructor.
In your .rcp file, your menubar IDs must be separated by at least the number of menus within the menubar. For example, if you've got:
MENU ID 1000 BEGIN PULLDOWN "Record" BEGIN MENUITEM "Foo" 1000 END PULLDOWN "Record" BEGIN MENUITEM "Bar" 2000 MENUITEM "Baz" 2001 END ENDThen you can't have another MENU with ID 1000 or with ID 1001; it'd have to start at 1002 or higher.
You can't easily use multiple .rcp files, because the plugin must generate unique IDs for temporary form objects and menus, and has no way of ensuring they are unique across multiple .rcp files. If anyone updates the command-line pilrc to compile more than one .rcp file at a time, the plugin can easily be modified to also support multiple .rcp files.
The PalmRez PostLinker translates characters into the Palm character set. Make sure you choose the correct transliteration in the PalmRez PostLinker panel: if you're targetting Palm OS 3.1 and beyond, choose "Palm OS 3.1 and later"; if targetting earlier devices, choose "Palm OS 3.0.x and earlier). If you get a menu item that should be "foo..." where the ... shows up as a box, you've got the wrong transliteration
Occassionally, it'll crash the IDE. Reproducible cases are welcome.
Cancelling the plugin (Command-. on Mac) doesn't work.
The PilRC plugin is implemented as a CodeWarrior preprocessor plugin. The plugin SDK provides facilities for allocating memory, finding files (using the access paths), reporting errors, and adding files to the project.
Constructor generates Mac resource files directly (on Windows, the resource fork is stored as a separate file in a RESOURCE.FRK directory).There's no support for creating resource files on Windows (I believe Constructor licensed a third-party porting library).
On the other hand, if I can't generate .prc files directly, I'd have to duplicate what PalmRez does.
Instead, I take advantage of the Rez compiler, which takes a .r text file and compiles it to a Mac resource file (see Apple's documentation for a description of the language).
Thus, the PilRC plugin takes a .rcp text file and generates a .r text file. That .r file is compiled by Rez to a Mac resource file. The resource file is processed by PalmRez (just as a Constructor Mac resouce file is) to produce a .prc file.
Copy the CW Plugin SDK to the {Compiler} directory.
Use CodeWarrior Release 6.
Open PilRC_Plugin.mcp and Make.
Please report bugs to neil@pobox.com.