1/13/2024 0 Comments Gitify resources![]() Being able to use TMPL resources to define your own resource types and then have them be graphically editable.Once I started to develop for the Mac, I appreciated even more things: I have a lot of fond memories of using ResEdit to peek around almost every app on my Mac (and cheat by modifying saved tank configs in SpectreVR). Meanwhile some structured formats that we have today can be so primitive as to not allow Norway or comments. It’s pretty incredible to think of what Bruce Horn was able to do with 3K of assembly in 1982. civilized age.Īll of this thinking of resource forks made me a bit nostalgic. On the other hand, Apple keeps shipping the Rez and DeRez tools (and even provided native ARM binaries in Big Sur), thus implying that there is still some value in them, more than two decades after they stopped being a part of Mac development. I’m guessing that the number of people who would find this tool useful is near zero. The repo also includes a couple of sample files with resource forks, and as you can see, the diffs are quite nice, even for graphical resources like icons: I briefly looked to see if I could use clean and smudge filters to implement this in a more transparent way, but those are only passed in the file contents (the data fork), and thus can't read or write to the resource fork. r files for each file that has a resource fork, and combining it back on-disk. Putting all of this together I have created git-resource-fork-hooks, a collection of Python scripts that can be used as pre-commit and post-checkout hooks. $"6C69 6B65 2069 7427 7320 3139 3931" /* like it's 1991 */Īnd here it is with the system resource definitions (the combination of parameters that works was found via this commit): $ DeRez -isysroot `xcrun -sdk macosx -show-sdk-path` file.rsrc Carbon.r Here’s the output for a DITL (dialog) resource without resource definitions: $ DeRez file.rsrc Xcode still ships with resource definitions, and they make a big difference. The other benefit of Rez is that it can be given resource definitions in header files, so that it produces even more structured output. That seemed like a good starting point, it was mostly a matter of removing the -only flag. I searched for any Git hooks that used Rez and found git-xattr-hooks, which is a more specialized subset that only looks at icns resources (incidentally a resource I am very familiar with). This MacTech article from 1998 has more details on Rez, and even mentions source control as a reason to use it. r files) which could be “compiled” with the Rez tool (and resource forks could be turned back into. I remembered that there was a textual format for resource forks (. While it can be stored in a Git repository, it does not lend itself to diffing, which would ruin the “time machine” aspect of the archiving project. The resource fork file is generated is an opaque binary blob.The tools that those hooks use ( SplitForks and FixupResourceForks) do not work on APFS volumes, only HFS+ ones.However, there are two limitations of this approach: I looked around to see if others had run into this, and found git-resource-fork-hooks, which is a collection of pre-commit and post-checkout Git hooks that convert resource forks into AppleDouble files, allowing them to be tracked. Such software relies on resource forks, which sadly Git does not support. For a (still in-progress) digital archiving project I wanted to create a Git repository with some classic Mac OS era software.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |