After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788234 - gst: fix portability of executable path lookup.
gst: fix portability of executable path lookup.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 788233 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-27 11:09 UTC by Mathieu Duponchelle
Modified: 2017-10-11 15:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst: Fix typo in windows function name. (728 bytes, patch)
2017-09-27 11:10 UTC, Mathieu Duponchelle
committed Details | Review
gst: Do not try to determine executable path on iOS. (763 bytes, patch)
2017-09-27 11:10 UTC, Mathieu Duponchelle
none Details | Review
gst: Do not try to determine executable path on iOS. (1.19 KB, patch)
2017-09-27 11:35 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2017-09-27 11:09:56 UTC
There was a typon in the windows codepath, and the apple codepath
only works on OSX
Comment 1 Mathieu Duponchelle 2017-09-27 11:10:00 UTC
Created attachment 360523 [details] [review]
gst: Fix typo in windows function name.

GetModuleFilename -> GetModuleFileName
Comment 2 Mathieu Duponchelle 2017-09-27 11:10:05 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2017-09-27 11:14:07 UTC
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
Comment 4 Sebastian Dröge (slomo) 2017-09-27 11:14:59 UTC
Those TARGET_ defines are always defined IIRC, and defined to 1 and 0.
Comment 5 Mathieu Duponchelle 2017-09-27 11:35:23 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2017-09-27 11:44:00 UTC
Review of attachment 360526 [details] [review]:

Go ahead :)
Comment 7 Mathieu Duponchelle 2017-09-27 11:56:29 UTC
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.
Comment 8 Mathieu Duponchelle 2017-10-11 15:29:23 UTC
*** Bug 788233 has been marked as a duplicate of this bug. ***