Share

rsrc2rcp

File Release Notes and Changelog

Release Name: 0.8

Notes:
What is rsrc2rcp?
-----------------

rsrc2rcp is a Perl script that takes a Codewarrior Constructor .rsrc
file as input and generates a PilRC .rcp file, along with a C .h file
and bitmap files. The generated files can then be used to build a Palm
application using PilRC and PRC-Tools.


Using rsrc2rcp
--------------

You must have Perl 5.0 and later in order to use rsrc2rcp.

The syntax for using rsrc2rcp is:

    rsrc2rcp.pl [ -b | -p ] [ -F filename ] rsrc-file ...
    
where

    -b              Create bitmaps in Windows .bmp format
    -p              Create bitmaps in .pbitm text format (default)
    -F filename     Use "filename" to create .rcp and .h file instead
                    of resource filename.

Examples:

1.  rsrc2rcp.pl myApp.rsrc

    The following files are created:

      myApp.rcp
      myApp.h
      myAppIcon.pbitm
      myAppPict.pbitm
      
    The .pbitm files are created only if ICON, tAIB or PICT resources exist
    in myApp.rsrc

2.  rsrc2rcp.pl -b myApp.rsrc

    Same as above except myApp.bmp is created instead of myApp.pbitm
    
3.  rsrc2rcp.pl -F bigApp myApp1.rsrc myApp2.rsrc

    The following files are created:
    
      bigApp.rcp
      bigApp.h
      ...

4.  On Windows there are 2 rsrc files. There is a zero-byte file that should not be used.
    You need to use the actual rsrc file which resides in a subdirectory RESOURCE.FRK. If you
    use the zero-byte file, you will get a "Rsrc file is empty or not found" error.

5.  On Mac OS X you need to append "/rsrc" to the rsrc filename in order to access the resource
    fork. If you don't do this you will get a "Rsrc file is empty or not found error".
    
    Eg.  rsrc2rcp.pl myApp.rsrc/rsrc
      
    


Resources Handled by rsrc2rcp
-----------------------------

At the moment, only the following resource types are handled:

    ICON, tAIN, tver, tTTL, tFRM, MBAR, MENU, tLBL, tFLD, Talt,
    tSTR, tBTN, tPUL, tPUT, tLST, tCBX, tGSI, tPBN, tREP, tSCL,
    tTBL, tGDT, tSLT, tSTL, tAIS, PICT (partial)

Other resource types can be added easily.


Bug Reporting
-------------

rsrc2rcp is still a work in progress. Some resource handlers may not have
been tested completely. Please report any bugs to me at the following email:

    Alvin Koh
    <alvinkoh@mac.com>


References
----------

Inside Macintosh - More Macintosh Toolbox, Apple Computer. pg 1-121
   http://developer.apple.com/techpubs/mac/pdf/MoreMacintoshToolbox.pdf
Palm OS SDK Reference, Palm Computing.
PilRC v2.7b User Manual
Source for NETPBM picttoppm, George Phillips <phillips@cs.ubc.ca>



Changes: # Change Log: # # 14 Mar 2003 0.8 Alvin Koh <alvinkoh@mac.com> # Fixed MBAR processing. Pulldown menus were incorrect processed # as Menu Bars. Thanks to Edward Zadrozny and Russ Bernhardt for # pointing this out. # # 16 Feb 2003 0.7 Alvin Koh <alvinkoh@mac.com> # Print message if rsrc file is 0 bytes. # See Notes below for Windows and Mac OS X. # # 30 Mar 2002 0.6a2 Chris Ring <chris@ringthis.com> # Corrected format of tSCL structure. # # 15 Oct 2001 0.6a1 Alvin Koh <alvinkoh@mac.com> # Use HEX command for unknown resource types. # Fixed DEFAULTBUTTON in process_Talt. # # 17 May 2001 0.5a2 Alvin Koh <alvinkoh@mac.com> # Incorporate Olaf Dietsche's patches for -F bug where filePrefix # gets set to -F instead of the prefix value. # # 21 Mar 2001 0.5a1 Alvin Koh <alvinkoh@mac.com> # Support for PICT with packed bits. # # 10 Mar 2001 0.4a7 Alvin Koh <alvinkoh@mac.com> # Support for tgpb. # # 8 Mar 2001 0.4a6 Alvin Koh <alvinkoh@mac.com> # Support for PICT with uncompressed and unpacked # bits. Now we have an option of creating .bmp or # .pbitm bitmap files. # Added -b and -p options to create .bmp file. .pbitm # files are created by default. # Process multiple resource files. # Parsing of .rsrc file is now handled by the # process_RSRC_File routine. # Added handler for tAIS contributed by Olaf Dietsche # # 6 Mar 2001 0.4a5 Alvin Koh <alvinkoh@mac.com> # Fixed bug in tGDT and tSLT where resource count # was not decremented as they were processed. # Added back check for unhandled resources before # program exit. # # 5 Mar 2001 0.4a4 Alvin Koh <alvinkoh@mac.com> # Uncommented FORMBITMAP output command in tFBM. # (Bitmaps still not handled though) # Added check for " in strings and convert to \". # # 2 Mar 2001 0.4a3 Alvin Koh <alvinkoh@mac.com> # Change interpretation of 0x0d in strings to # '\r' instead of '\n'. # BITMAP keyword for tFBM was omitted. # Non-Boldframe was incorrectly handled. # Fixed bug in tGDT handler where USABLE was # always 0. # # 1 Mar 2001 0.4a2 Alvin Koh <alvinkoh@mac.com> # Fixed bug in tGDT handler where gadget ID was # used inadvertently used as top left origin. # Added support for String Lists (tSTL). # # 26 Feb 2001 0.4a1 Alvin Koh <alvinkoh@mac.com> # Implemented a process dispatcher by using the # AUTOLOAD subroutine to handle any undefined # process_XXXX routines. # Added support for tGDT and tSLT. # Added check for MacOS resource fork. # # 24 Feb 2001 0.3a1 Alvin Koh <alvinkoh@mac.com> # Modified code to provide more info about resources # that rsrc2rcp did not handle. # # 23 Feb 2001 0.2a1 Alvin Koh <alvinkoh@mac.com> # Added support for tBTN, tPUL, tPUT, tLST, tCBX, # tGSI, tPBN, tREP, tSCL, tTBL, tFBM. # # 22 Feb 2001 0.1a1 Alvin Koh <alvinkoh@mac.com> # Support for ICON, tAIN, tver, tTTL, tFRM, MBAR, # MENU, tLBL, tFLD, Talt, tSTR. #