summaryrefslogtreecommitdiff
path: root/cscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-12-29 23:16:00 +0100
committerCarl Hetherington <cth@carlh.net>2021-12-29 23:46:48 +0100
commit056c4dd82342023636671b1afa333859eed7e32e (patch)
tree2ab434a568eabd2943e49ea6bd853d71eaa63a4a /cscript
parent8b5bfd3cea63a4d6aa48c11d5d56139d18bba080 (diff)
Fix AppImage on systems with glib version > 2.68 (#2129).v2.15.181
The approach here is to bundle more stuff, and most of the details are taken from the Inkscape packaging/appimage/generate.sh script.
Diffstat (limited to 'cscript')
-rw-r--r--cscript12
1 files changed, 11 insertions, 1 deletions
diff --git a/cscript b/cscript
index 69feeae14..7a76e133b 100644
--- a/cscript
+++ b/cscript
@@ -709,6 +709,14 @@ def make_appimage(target, nice_name, internal_name, version):
lib = 'usr/lib/x86_64-linux-gnu'
target.command(f'mkdir -p build/{nice_filename}.AppDir/{lib}/gdk-pixbuf-2.0/2.10.0')
target.command(f'cp -a /{lib}/gdk-pixbuf-2.0 build/{nice_filename}.AppDir/usr/lib/x86_64-linux-gnu/')
+ for package in ['libc6', 'libglib2.0-0', 'gnome-settings-daemon-schemas', 'librsvg2-common', 'libgdk-pixbuf2.0-0', 'libpango-1.0-0', 'libpangoft2-1.0-0', 'libpangocairo-1.0-0']:
+ target.command(f'apt download {package}')
+ target.command(f'dpkg-deb -x {package}*.deb {appdir}')
+ target.command(f'glib-compile-schemas {appdir}/usr/share/glib-2.0/schemas')
+ target.command(f'sed -i -e "s|/usr/lib/x86_64-linux-gnu/gdk-pixbuf-.*/.*/loaders/||g" {appdir}/usr/lib/x86_64-linux-gnu/gdk-pixbuf-*/*/loaders.cache')
+ # Stop anything loading from outside the AppImage
+ target.command(f'sed -i -e "s|/usr|/xxx|g" {appdir}/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2')
+
if internal_name == 'dcpomatic2_disk':
target.command(f'mkdir -p {appdir}/usr/share/polkit-1/actions')
target.command(f'cp {target.directory}/share/polkit-1/actions/com.dcpomatic.write-drive.policy {appdir}/usr/share/polkit-1/actions')
@@ -717,7 +725,9 @@ def make_appimage(target, nice_name, internal_name, version):
print('#!/bin/bash', file=f)
print('export PATH=$APPDIR/usr/bin:$PATH', file=f)
print('export XDG_DATA_DIRS="$APPDIR/usr/share/:/usr/share/:$XDG_DATA_DIRS"', file=f)
- print('export LD_LIBRARY_PATH=$APPDIR/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}', file=f)
+ print('export GDK_PIXBUF_MODULEDIR=$(readlink -f "$APPDIR"/usr/lib/x86_64-linux-gnu/gdk-pixbuf-*/*/loaders/ )', file=f)
+ print('export GDK_PIXBUF_MODULE_FILE=$(readlink -f "$APPDIR"/usr/lib/x86_64-linux-gnu/gdk-pixbuf-*/*/loaders.cache )', file=f)
+ print('export LD_LIBRARY_PATH=$GDK_PIXBUF_MODULEDIR:$APPDIR/usr/lib:$APPDIR/usr/lib/x86_64-linux-gnu', file=f)
print(f'"$APPDIR"/usr/bin/{internal_name} $@', file=f)
target.command(f'chmod a+rx {appdir}/AppRun')
with open(f'{appdir}/{internal_name}.desktop', 'w') as f: