GNOME Bugzilla – Bug 788234
gst: fix portability of executable path lookup.
Last modified: 2017-10-11 15:29:23 UTC
There was a typon in the windows codepath, and the apple codepath only works on OSX
Created attachment 360523 [details] [review] gst: Fix typo in windows function name. GetModuleFilename -> GetModuleFileName
Created attachment 360524 [details] [review] gst: Do not try to determine executable path on iOS. The method used relies on "libproc.h", which is only available on OSX.
Review of attachment 360524 [details] [review]: ::: gst/gst.c @@ +346,3 @@ _gst_executable_path = g_strdup (buffer); } +#elif defined(__APPLE__) && defined (__MACH__) /* OSX only */ There is another way to distinguish iOS. Technically, iOS is MACH too AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-]) is what we use in gst-plugins-bad. Or you do #if defined(__APPLE__) #include "TargetConditionals.h" And then you have TARGET_IPHONE_SIMULATOR, TARGET_OS_IPHONE & TARGET_OS_MAC
Those TARGET_ defines are always defined IIRC, and defined to 1 and 0.
Created attachment 360526 [details] [review] gst: Do not try to determine executable path on iOS. The method used relies on "libproc.h", which is only available on OSX.
Review of attachment 360526 [details] [review]: Go ahead :)
Attachment 360523 [details] pushed as c981595 - gst: Fix typo in windows function name. Attachment 360526 [details] pushed as 49e230a - gst: Do not try to determine executable path on iOS.
*** Bug 788233 has been marked as a duplicate of this bug. ***