[Bug 679115] Windows: Make the GStreamer DLLs/data relocatable

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 8 05:29:49 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=679115
  GStreamer | gstreamer (core) | git

--- Comment #11 from Andoni Morales <ylatuya at gmail.com> 2014-01-08 13:29:46 UTC ---
Something like:

static gchar *
get_prefix_dir (void)
{
  gchar *prefix_dir = NULL;

#if defined(HAVE_OS_WINDOWS)
   prefix_dir = g_win32_get_package_installation_directory_of_module (NULL);
#elif defined (HAVE_OS_DARWIN)
   char pathbuf[PATH_MAX + 1];
   uint32_t  bufsize = sizeof(pathbuf);
   gchar *bin_dir;

   _NSGetExecutablePath(pathbuf, &bufsize);
   bin_dir = g_dirname(pathbuf);
   prefix_dir = g_build_path (G_DIR_SEPARATOR_S, bin_dir, "..",
       NULL);
   g_free (bin_dir);
#elif defined (HAVE_OS_LINUX)
   gchar *exe_path, *bin_dir;

   exe_path = g_file_read_link ("/proc/self/exe", NULL);
   bin_dir = g_dirname(exe_path);
   prefix_dir = g_build_path (G_DIR_SEPARATOR_S, bin_dir, "..",
       NULL);
   g_free (exe_path);
   g_free (bin_dir);
#endif
  return prerix_dir;
}

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gstreamer-bugs mailing list