Rez and ResMerger on Catalina

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

How I can accesss these?
Image

Post

I get failed to find AudioUnit/AudioUnit.r
Image

Post

Are you using the CFM? As far as I remember, that was 32-bit Carbon only and would be gone with Catalina. Otherwise, monolithic resource files are not the thing anymore. Just package everything into the Resource folder.

You will need to delve deep into the Xcode package to see if Rez is even there anymore. My computer I had earmarked for Catalina, my dad spilled water on it and killed the PMU, so it's on the workbench waiting for when I feel like a complete (yes, the logic board comes out last...) teardown to inspect it and pray it's only a dead cap or something. So, no Catalina for me for a awhile.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better? :(

Post


Post

Unless they changed the definition/purpose of Rez and old compiled resource files, apple had been trying to make them as difficult possible to continue using for years before I gave up in disgust circa 2012. Can't imagine the difficulties nowadays.

I mean, sure start putting the new stuff as separate tiny files in a resource folder.

Sure it's yer own dam fault for continuing to expand the same program for many many years. But damn if you happen to have a couple of hundred dialog windows, zillions of picts and icons and string lists and menus.

It is scary to think about all the time which was expended over years setting all those things up to begin with, and even scarier considering having to redo them all from scratch just to get exactly the same thing you had before except it is done the new way and not the old way. Cross fingers apple will wait at least a few weeks before coming out with some NEW new way and you have to start from scratch once again

I vaguely recall writing code to semi automatic convert some of the old stuff to new stuff but it was the worst kind of monkey work. Oh I forgot about all the foreign language versions that needed the same treatment.

And that isn't even writing code. It is just making sure controls are lined up in dialog boxes, buttons have the right pictures, hierarchical menus are stacked right, etc.

Post

Rez and ResMerger are readily accessible - I just get the error AudioUnit/AudioUnit.r not found.
Image

Post

Xcode 11 gave that error to me, using Xcode 10 solved the issue.

Post

We had the same issue on Mojave (10.14) using Xcode 11. Reverting to Xcode 10.x didn't help, either.

Adding $SDKROOT/System/Library/Frameworks/AudioUnit.framework/Headers to the Rez search paths helped to resolve the discussed Rez issues, but the subsequent ResMerger step failed outputting a weird "ResMerger - ERROR: errFSBadFSRef" message. The proper rsrc file was generated in the intermediate folder, but since there is no way to skip the ResMerger stage which is automatically invoked once you add one or more .r scripts to your Xcode target, we had to come up with a different workaround, which involved manually compiling our r-script.

NOTE:
1. This only works if you have a single .r script input, which probably holds true for typical AU implementations.
2. Another workaround would be to simply remove the .r script from your AU targets if your implementation implements the AUv2 or AUv3 protocols. Exposing your plugin's entry points via a rsrc fork is only required in the AUv1 protocol (e.g. Logic 9 or older).
3. Running Xcode 11 on Catalina (10.15) doesn't seem to involve this issue at all.

So here is the shell script we added to get this going via an additional run script phase. It relies heavily on Xcode's environment variables. Maybe it'll help someone :tu:

Code: Select all

#!/bin/sh -e

INPUT_REZ_SCRIPT=path-of-your-r-script-relative-to-the-project-dir
REZ_SCRIPT_NAME=/tmp/$TARGET_NAME.sh
REZ_TARGET_PATH=$CODESIGNING_FOLDER_PATH/Contents/Resources

echo Compiling $INPUT_REZ_SCRIPT...

if [ ! -d $REZ_TARGET_PATH ] ; then
	mkdir $REZ_TARGET_PATH
fi

echo cd $PROJECT_DIR >$REZ_SCRIPT_NAME
printf "%s -o %s/%s.rsrc -d SystemSevenOrLater=1 -useDF -script Roman -arch x86_64" $DEVELOPER_BIN_DIR/Rez $REZ_TARGET_PATH $PRODUCT_NAME >>$REZ_SCRIPT_NAME

for item in $HEADER_SEARCH_PATHS
do
	printf " -i %s" $item >>$REZ_SCRIPT_NAME
done

for item in $HEADER_SEARCH_PATHS
do
	printf " -i %s" $REZ_SEARCH_PATHS >>$REZ_SCRIPT_NAME
done

printf " -isysroot %s " $SDKROOT >>$REZ_SCRIPT_NAME

printf $INPUT_REZ_SCRIPT >>$REZ_SCRIPT_NAME

sh $REZ_SCRIPT_NAME
rm $REZ_SCRIPT_NAME

Post

Just changing AudioUnit/AudioUnit.r to AudioUnit.r worked for me.

Post Reply

Return to “DSP and Plugin Development”