Skip to content

Instantly share code, notes, and snippets.

@rgaudin
Last active August 13, 2020 15:55
Show Gist options
  • Save rgaudin/5f027d0621e5a7639cb42f8ba753a259 to your computer and use it in GitHub Desktop.
Save rgaudin/5f027d0621e5a7639cb42f8ba753a259 to your computer and use it in GitHub Desktop.
Pyinstaller develop branch (currently #42ab9db) patch for GdkPixbuf so it can be signed by codesign (folder structure invalid)
diff --git i/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py w/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py
index f61d9380..8ef7a4af 100644
--- i/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py
+++ w/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py
@@ -23,8 +23,8 @@ from PyInstaller.utils.hooks import (
loaders_path = os.path.join('gdk-pixbuf-2.0', '2.10.0', 'loaders')
-destpath = "lib/gdk-pixbuf-2.0/2.10.0/loaders"
-cachedest = "lib/gdk-pixbuf-2.0/2.10.0"
+destpath = "lib/gdk-pixbuf/loaders"
+cachedest = "lib/gdk-pixbuf"
# If the "gdk-pixbuf-query-loaders" command is not in the current ${PATH}, GDK
# and thus GdkPixbuf is unavailable. Return with a non-fatal warning.
diff --git i/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py w/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py
index cf84101d..272cabd1 100644
--- i/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py
+++ w/PyInstaller/hooks/rthooks/pyi_rth_gdkpixbuf.py
@@ -12,8 +12,7 @@ import os
import tempfile
import sys
-pixbuf_file = os.path.join(sys._MEIPASS, 'lib', 'gdk-pixbuf-2.0', '2.10.0',
- 'loaders.cache')
+pixbuf_file = os.path.join(sys._MEIPASS, 'lib', 'gdk-pixbuf', 'loaders.cache')
# If we're not on Windows we need to rewrite the cache
# -> we rewrite on OSX to support --onefile mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment