Mac OS 9 Discussion > Development & Programming

Grabing resources off a program

(1/4) > >>

thirdbanana:
Long time ago, I wrote a program in Think C (hence my question in another thread), which I recently found, or at least some fragments. And a compiled version of the code. If I want to compile the code again, I will need the graphics and sound resources; can I fetch them off the executable file (i.e. program) using resedit or something like that?

Knezzen:
Yeah, that works for sure.

Bolkonskij:
If you added them via ResEdit before, you should be able to open up your resource file and get them out again. Also, while I don't remember any name, there's little applications that do that for you as well. You may want to check the Macintosh Garden for them, they're definitely there.

thirdbanana:

--- Quote from: Bolkonskij on October 11, 2024, 05:39:18 AM ---If you added them via ResEdit before, you should be able to open up your resource file and get them out again. Also, while I don't remember any name, there's little applications that do that for you as well. You may want to check the Macintosh Garden for them, they're definitely there.

--- End quote ---

I am not sure; I know I used Think C 5.0 (I actually wrote in the code when I bought it, as it required some changes). I do not remember how the resources were fed: I want to say they were in a separate file which was then added into the binary somehow. Being able to save the resources will help a lot: while I have the original image file (before the different bits were cropped and added as individual components), the floppy I found was not the one I used to build it, so it has some missing files namely the resource and the header file. There is also a programname.mac file which I have no idea of what it is supposed to do.

My plan now is to get it such that it will successfully compile in Think C 5 (which I hope runs in OS9). Then I can decide if I want to switch to codewarrior or whatever, and clean the code some.  :-[

Bolkonskij:
Traditionally, when programming the Mac, you would have created an empty resource file and then manually added your resources (pictures, sounds, windows, menu bars, constants etc.) to it which you'd later reference in code. So, in theory, you just need to fire up ResEdit and open the resource file located somewhere in the source folder. From there, you should be able to copy + paste stuff to where you need it. (provided the resource file actually IS in the sources folder)

As for other options, I've run into this application here on Garden:

http://macintoshgarden.org/apps/37thresex

It might do the trick for you, but I have no experience using it myself!

Navigation

[0] Message Index

[#] Next page

Go to full version