fix: GTK assertions when running AppImage on some distros

This commit is contained in:
WerWolv 2025-07-27 15:10:48 +02:00
parent 9554889964
commit 72501edc9a
3 changed files with 21 additions and 6 deletions

View File

@ -27,16 +27,18 @@ chmod +x imhex-*.AppImage
./imhex-*.AppImage ./imhex-*.AppImage
``` ```
If you're experiencing glib / libgtk assertion failures, you might need to setup your `XDG_DATA_DIRS` env var correctly. In this case, run the following command before executing the AppImage. (See issue [ImHex/#2038](https://github.com/WerWolv/ImHex/issues/2038))
```bash
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
```
#### Flatpak #### Flatpak
To install the Flatpak, make sure you have the Flathub repository added to your system. Then simply run the following command: To install the Flatpak, make sure you have the Flathub repository added to your system. Then simply run the following command:
```bash ```bash
flatpak install flathub net.werwolv.ImHex flatpak install flathub net.werwolv.ImHex
# or install the file directly
flatpak install ./imhex-*.flatpak
```
#### Snap
```bash
snap install ./imhex-*.snap
``` ```
#### Ubuntu DEB Package #### Ubuntu DEB Package

View File

@ -11,12 +11,16 @@ AppDir:
exec_args: $@ exec_args: $@
apt: apt:
arch: arch:
- all
- "{{ARCHITECTURE_PACKAGE}}" - "{{ARCHITECTURE_PACKAGE}}"
allow_unauthenticated: true allow_unauthenticated: true
sources: sources:
- sourceline: 'deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ oracular main restricted universe multiverse' - sourceline: 'deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ oracular main restricted universe multiverse'
- sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ oracular main restricted universe multiverse' - sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ oracular main restricted universe multiverse'
include: include:
- libgdk-pixbuf2.0-0
- libgdk-pixbuf2.0-common
- shared-mime-info
- librsvg2-common - librsvg2-common
- libbz2-1.0 - libbz2-1.0
- libcap2 - libcap2
@ -123,6 +127,15 @@ AppDir:
- usr/share/doc/*/changelog.* - usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.* - usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.* - usr/share/doc/*/TODO.*
runtime:
env:
APPDIR_LIBRARY_PATH: '$APPDIR/usr/lib/{{ARCHITECTURE_APPIMAGE_BUILDER}}-linux-gnu:$APPDIR/lib/{{ARCHITECTURE_APPIMAGE_BUILDER}}-linux-gnu:$APPDIR/usr/lib:$APPDIR/usr/lib/{{ARCHITECTURE_APPIMAGE_BUILDER}}-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders'
GTK_EXE_PREFIX: $APPDIR/usr
GTK_DATA_PREFIX: $APPDIR
XDG_DATA_DIRS: '/usr/local/share:/usr/share:$APPDIR/usr/share:$XDG_DATA_DIRS:$APPDIR/usr/local/share:$APPDIR/usr/local/lib:$APPDIR/usr/local/share'
XDG_CONFIG_DIRS: '$XDG_CONFIG_DIRS:$APPDIR/usr/local/share'
AppImage: AppImage:
arch: "{{ARCHITECTURE_APPIMAGE_BUILDER}}" arch: "{{ARCHITECTURE_APPIMAGE_BUILDER}}"
comp: zstd comp: zstd

View File

@ -75,7 +75,7 @@ chmod +x /cache/bin/appimagetool
python3 -m venv venv python3 -m venv venv
. venv/bin/activate . venv/bin/activate
pip3 install git+https://github.com/WerWolv/appimage-builder@e4dc770 pip3 install git+https://github.com/AppImageCrafters/appimage-builder@e995e8e
# Package ImHex as AppImage # Package ImHex as AppImage
export VERSION=$(cat /imhex/VERSION) export VERSION=$(cat /imhex/VERSION)