Re: [gtk-osx-devel] app bundled with gtk-mac-bundler fails to load pixbuf loadders




On Dec 30, 2014, at 1:52 PM, Q (Igor Mammedov) <niallain gmail com> wrote:

App bundled with help of gtk-mac-bundler (today's master 36aaa644a)

fails to load pixbuf loaders cache looking for it only at:


Contents/Resources/etc/gtk-2.0/gdk-pixbuf.loaders


but gtk-mac-bundler: create_gdk_pixbuf_loaders_setup() sets cache only
at "Contents/Resources/lib/gdk-pixbuf-2.0/..." if "lib/gdk-pixbuf-2.0"
is present at gtx-osx prefix.

Right, because it depends upon the version of gdk-pixbuf.



I'm not sure if it's gtk-mac-bundler or gtk-osx issue and where it
should be fixed, but following patch fixes the problem for me:

diff --git a/bundler/bundler.py b/bundler/bundler.py

index 8061ac1..a9dc4a0 100644

--- a/bundler/bundler.py

+++ b/bundler/bundler.py

@@ -169,10 +169,9 @@ class Bundler:

                                                     "gdk-pixbuf-2.0",


"${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}",

                                                     "loaders")

-            cachepath = self.project.get_bundle_path("Contents/Resources/lib/",
-                                                     "gdk-pixbuf-2.0",
-                                                     "${pkg:gdk-pixbuf-2.0:gdk_pixbuf_binary_version}",
-                                                     "loaders.cache")
+            cachepath = self.project.get_bundle_path("Contents/Resources/etc/",
+                                                      self.project.get_gtk_dir(),
+                                                     "gdk-pixbuf.loaders")

        elif os.path.exists(os.path.join(self.project.get_prefix(), "lib",
                                         "gdk-pixbuf-3.0")):
            modulespath = self.project.get_bundle_path("Contents/Resources/lib/",

Not the best way to fix it. The part you changed is protected by
   if os.path.exists(os.path.join(self.project.get_prefix(), "lib", 
                                       "gdk-pixbuf-2.0")):
and what you changed it to is the “else” block on that if statement.

Better to change the “GDK_PIXBUF_LOADERS” setting in your launcher script. Roger, the example launcher 
scripts still referred to the old location. I’ve just pushed a change fixing that.

Regards,
John Ralls



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]