Rez and ResMerger on Catalina
- KVRAF
- Topic Starter
- 4021 posts since 7 Sep, 2002
- KVRAF
- Topic Starter
- 4021 posts since 7 Sep, 2002
- KVRAF
- 2249 posts since 25 Sep, 2014 from Specific Northwest
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.
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?
- KVRist
- 160 posts since 26 Sep, 2001 from Paris, France
Have a look here https://forum.juce.com/t/au-on-xcode-10 ... r/35074/21
Lorcan | lmdsp audio plug-ins
-
- KVRAF
- 3080 posts since 17 Apr, 2005 from S.E. TN
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.
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.
- KVRAF
- Topic Starter
- 4021 posts since 7 Sep, 2002
-
jussi_neuraldsp jussi_neuraldsp https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=428471
- KVRer
- 14 posts since 24 Oct, 2018
Xcode 11 gave that error to me, using Xcode 10 solved the issue.
- KVRist
- 190 posts since 13 Jan, 2018 from Duesseldorf, Germany
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
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
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
- KVRist
- 186 posts since 28 Jan, 2013 from Oakland