Interfaces

I know there are .nib files in applications, and they are the most common, but once in a while you come across a .rsrc. What is that? How do you edit it? To get one, go to applescript, make a simple little script and save it as a app bundle. In the resources folder, there is it: applet.rsrc. Just want to know how to edit one (It's also in the iTunes app). 🙂

Posted on Oct 15, 2005 12:39 PM

Reply
2 replies

Oct 16, 2005 8:00 AM in response to Craig Cabrey

In addition to a GUI editor like Resorcerer, in the /Developer/Tools folder installed with Xcode Tools are some command line utilities for working with resources. The "DeRez" tool will convert a resource file into it's text equivalent (a ".r" file) while the "Rez" tool will convert a textual ".r" file back to a resource file. So, you can use DeRez to convert your .rsrc file into a text file, tinker with it in a text editor, then use Rez to convert your modified data back to a .rsrc file.

There are a ton of options for these tools, but they both have man pages.

I've only used these tools a few times in OS X, but there were pre-OS X versions that came with the MPW development environment that were fairly widely used. I believe Xcode probably contains rules for "compiling" .r files during it's build process because some of the example code contains .r files.

One problem with using these tools is that the format of the various resource types can differ pretty widely and you might have some trouble finding or understanding the formats. Search for .r files on your system and you'll likely be able to track down some of the system related resource format descriptions.

Steve

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Interfaces

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.