PilRC is a resource compiler for the Palm computing platform. It takes a resource script file and compiles it into a binary format suitable for inclusion in a Palm executable. It is free software copyright Wes Cherry and Aaron Ardiri and has been recenly released as GNU GPL.

When you write a program for the Palm you'll likely be using its GUI: your program will need forms, pop-up messages, text input boxes, etc. In order to have them displayed, you have to pass PalmOS specific data structures with all the information and the widgets that are to appear on screen, and PalmOS will draw it on the screen and take care of user input.

Writing C code to prepare and fill such data structures is a tedious and error-prone process, and if you think about it the GUI of most programs is rather statical - there is always a button of the same size and position and caption on the first page, most pull-down menus have a fixed set of actions and so on.

PilRC solves this problem by preparing simple resource scripts, i.e text files written in a specific format that compile to the exact binary format used by the Palm to display it. You can write these files easily without knowing much of the complexities involved, test them with a companion utility called PilRCUI and then compile them to binary when you're sure they will do.

A sample resource script might look as follows:

    ICON "logo.bmp"
    FORM ID 3000 AT (0 0 160 160)
        TITLE "This is a form"
        BUTTON "Hello" ID 4000 AT (30 30 AUTO AUTO)
This script generates:
  • A resource for the icon representing your program, where the icon is loaded from a 32x32 bitmap
  • A resource representing a form (a page, or a screen) with a single button on saying "Hello"
You can build fairly complex pages this way, and PilRC is very powerful. You can create and test such a scripts in a matter of seconds, and then add it to your program when it's done.

Please not how every element has an ID: this is the handle you program will use to send and receive message to the specific resource.

PilRC home page is located at http://www.ardiri.com/palm/pilrc/