[gtk-mac-bundler] Place immodules.cache in the default location for Gtk3.



commit 26d1537bb8f48723bdd592ca06729f558ea9cd5f
Author: John Ralls <jralls ceridwen us>
Date:   Sat Jun 30 17:35:23 2018 -0700

    Place immodules.cache in the default location for Gtk3.

 bundler/bundler.py | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/bundler/bundler.py b/bundler/bundler.py
index 1fd8359..c2b4709 100644
--- a/bundler/bundler.py
+++ b/bundler/bundler.py
@@ -161,11 +161,20 @@ class Bundler(object):
         env_var = "GTK_EXE_PREFIX"
         exe_name = 'gtk-query-immodules-' + self.project.get_gtk_version()
         f = self.run_module_catalog(env_var, path, exe_name)
-
-        path = self.project.get_bundle_path("Contents/Resources/etc/",
-                                            self.project.get_gtk_dir())
+        if self.meta.gtk == 'gtk+-2.0':
+            path = self.project.get_bundle_path("Contents/Resources/etc/",
+                                                self.project.get_gtk_dir())
+            file = 'gtk.immodules'
+        else:
+            gtkdir = self.project.evaluate_path('${pkg:'+
+                                                self.meta.gtk +
+                                                ':gtk_binary_version}')
+            path = self.project.get_bundle_path("Contents/Resources/lib/",
+                                                self.project.get_gtk_dir(),
+                                                gtkdir)
+            file = 'immodules.cache'
         utils.makedirs(path)
-        fout = open(os.path.join(path, "gtk.immodules"), "w")
+        fout = open(os.path.join(path, file), "w")
 
         prefix = "\"" + self.project.get_bundle_path("Contents/Resources")
 


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