So the GStreamer documentation for 1.0+ seems to be...lacking to say the least. The GStreamer SDK has some helpul tips, but unforutnately they fall short.
So, here's what I've done. I've built an application that calls upon GStreamer in /Library/GStreamer.Framework/
I build using command-line tools. This is the only way I can build this application. I can't use the XCode GUI.
I want to submit this app to the store, but to do so I can't submit it as a package (so I can bundle the GStreamer package installer) which means I'll have to bundle GStreamer.framework with my application.
In the GStreamer SDK docs above, you will notice a tool called osxrelocator.py. This is great, because it changes all refrences of /Library/GStreamer.Framework to @executable_path/../Frameworks/GStreamer.framework/
BUT
Unfortunately all of the GStreamer .dylibs have an issue... You need to use install_name_tool -id to change their paths because install_name_tool -change doesn't change the paths to themselves!
So, for example using otool:
$ otool -L Application.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib
Application.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib:
Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib (compatibility version 402.0.0, current version 402.0.0)
Library/Frameworks/Frameworks/GStreamer.framework/Versions/1.0/lib/libgobject-2.0.0.dylib (compatibility version 4001.0.0, current version 4001.0.0)
Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.1.0)
Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgmodule-2.0.0.dylib (compatibility version 4001.0.0, current version 4001.0.0)
Library/Frameworks/Frameworks/GStreamer.framework/Versions/1.0/lib/libglib-2.0.0.dylib (compatibility version 4001.0.0, current version 4001.0.0)
Library/Frameworks/Frameworks/GStreamer.framework/Versions/1.0/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
Library/Frameworks/Frameworks/GStreamer.framework/Versions/1.0/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
Then using osxrelocator.py (which invokes install_name_tool -change):
./osxrelocator.py Application.app/Contents/MacOS /Library/Frameworks/GStreamer.framework/Versions/Current/lib @executable_path/../Frameworks/GStreamer.framework/Versions/Current/lib -r
Gives:
$ otool -L Application.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib
Application.app/Contents/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib:
/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstreamer-1.0.0.dylib (compatibility version 402.0.0, current version 402.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libgobject-2.0.0.dylib (compatibility version 4001.0.0, current version 4001.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.1.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libgmodule-2.0.0.dylib (compatibility version 4001.0.0, current version 4001.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libglib-2.0.0.dylib (compatibility version 4001.0.0, current version 4001.0.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
Notice that first line where the .dylib references itself? That's doesn't change to @executable_path/../Frameworks/GStreamer.framework/ unless you invoke install_name_tool -id. And this happens with EVERY .dylib in the GStreamer framework! There are hundreds of them and I'm sure doing this manually is definitely going to cause errors.
Hopefully I've made my issue clear. Does anyone have any suggestions as to what to do?
Thanks!