let's say, not entirely hypothetically, that we have a ResEdit TMPL. We want to convert it to an MPW Rez types file, so we can DeRez resources instead of mess with the GUI editor. Anyone got a tool handy for this?
let's say, not entirely hypothetically, that we have a ResEdit TMPL. We want to convert it to an MPW Rez types file, so we can DeRez resources instead of mess with the GUI editor. Anyone got a tool handy for this?
@atax1a that is a thing that I wanted to build for fun at one point, but I stopped after finishing most of the required groundwork (as you do). I wrote some Kaitai Struct specs for parsing resource forks and the TMPL resource format, but never got around to writing an actual TMPL converter. idk if this is in any way useful for what you're trying to do
https://formats.kaitai.io/resource_fork/
https://github.com/dgelessus/resource_fork.ksy/blob/master/src/resources/resedit_template_resource.ksy
@atax1a Do you have some kind of workflow that you want to integrate this into, or do you just have a couple of TMPLs that you want to convert once?
Depending on how many TMPLs you have and how complex they are, it might be easier to do the conversion manually... I also vaguely remember that some of ResEdit's TMPL data types don't map straightforwardly onto anything in the Rez language, so an automated conversion might not even always work well
@atax1a ah. I never looked at how ResCompare stores its patches - I assume it's a custom format that stores which parts of which resource have changed, so the patch application doesn't contain full patched resources?
In that case it might indeed be easier to just run the patch, DeRez the before and after version, and diff those
@atax1a well I had a peek at the "Patch File Format" documentation that's distributed with ResCompare, and it does not look like a fun time. At least it gives C struct definitions for the resources, which I guess is easier to hand-transcribe to Rez syntax than TMPLs are?
But apparently even a single resource's patch info is split across multiple resources in the patch application? Feels like the DeRez output for that still wouldn't be very readable, even if you have a good .r file for it...