• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Invoking Rez Automatically

Dennis Nedry

Well-known member
I'm working on a Kaleidoscope Scheme to Appearance Theme converter. I am able to read a resource fork via a roll-my-own technique, but to write to a resource fork, I write to a text file and pass it through Rez. This is done in Xcode using C++.

Does anybody know how I could make the Rez step automatic, or import a library that lets me write direct to a resource fork? I'd like the program to spit out a real resource fork file instead of having to manually run Rez in a terminal window. I've tried the system() method to run commands, and that doesn't work for some reason. I've gone as far as to write a shell script and call that script with system(), and that STILL doesn't work. Calling the script directly form a terminal window works fine. Rez runs and all, but it reports an error while parsing well into the file.

Also, after running through Rez, I also need to change the type/creator code for it to be recognized as a theme. Is there an option in Rez for this, or is there some other automatic way to do that? I want to avoid AppleScript and just do everything in the binary.

 
Top