Best way to deploy GStreamer framework with a Mac OS X application?

Andoni Morales ylatuya at gmail.com
Tue Sep 23 11:18:12 PDT 2014


2014-09-23 13:05 GMT+02:00 Alex Kontos <ak935 at york.ac.uk>:

> Hi all,
>
> So, here's what I've done. I've built an application that calls upon
> GStreamer in */Library/GStreamer.Framework/ *during compile time (and
> therefore when the application runs, expects it there).
>
> 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!
>
> I've attempted to manually changed all the references using
> install_name_tool -id but I must be missing files because when I run the
> application whenever GStreamer is called it's never used. But when the
> GStreamer framework is located in /Library/Framework everything works
> beautifully.
>
> What's the best way I can have the GStreamer framework located in
> MyApp.app/Contents/Frameworks?
>

Hi Alex,

The osxrelocator.py tool is changing both the libraries paths and the
library id as in [1]

If you are not using XCode I could recommend you to use cerbero to bundle
the application and create the package,  that you can then upload to the
Store. I use it to package LongoMatch for Windows and OS X and it does all
the hard job for you. For that you will need:

1) A recipe for your project that can be used by cerbero to build it. [2]
2) A package that defines you application and list the packages you depend
on from the GStreamer framework [3]
3) A script that is use to launch your application, which takes care of
setting the environment variables to use the bundled GStreamer [4]

The packaging process works in the following way with a single command
"cerbero package longomatch":

1) It creates the directory structure needed by an OS X application,
creating the foo.app directory, with an Info.plist describing your app and
the init script in Contents/MacOS/foo
2) With the information provided in the package file, it lists the files
required by your application from the GStreamer framework
3) It copies these files to the prefix foo.app/Home
4) And relocates them (and also strip them if you need it)
5) Finally it uses productbuild to create a .pkg that you can distribute in
the App Store

You can donwload longomatch and inspect its structure here:
http://ftp.gnome.org/pub/GNOME/binaries/mac/longomatch/LongoMatch-0.20.7-x86.dmg


[1]
http://cgit.freedesktop.org/gstreamer/cerbero/tree/cerbero/tools/osxrelocator.py#n48
[2]
https://github.com/ylatuya/cerbero-extras/blob/master/recipes/longomatch/longomatch.recipe
[3]
https://github.com/ylatuya/cerbero-extras/blob/master/packages/longomatch/longomatch.package
[4]
https://github.com/ylatuya/cerbero-extras/blob/master/packages/longomatch/unix_wrapper

> Thanks in advance!
>
> Alex
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140923/a9423107/attachment-0001.html>


More information about the gstreamer-devel mailing list