Skip to content

Commit

Permalink
Merge pull request #1364 from gaphor/fix/appimage-fixes
Browse files Browse the repository at this point in the history
Fix AppImage Crashes on Save Command
  • Loading branch information
amolenaar committed Mar 13, 2022
2 parents f3c4fe8 + 2c70fbd commit 762cd17
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/appimage-docker.yml
Expand Up @@ -36,5 +36,5 @@ jobs:
python -m venv .venv
source .venv/bin/activate
python -m pip install poethepoet
poe appimage-docker-build
poe appimage-docker-build-clean
poe appimage-docker-push
1 change: 1 addition & 0 deletions .github/workflows/full-build.yml
Expand Up @@ -66,6 +66,7 @@ jobs:
path: dist/gaphor-${{ steps.setup_and_test.outputs.version }}-py3-none-any.whl
- name: Build AppImage
run: |
jhbuild shell
poetry run poe package
cd _packaging/appimage
make dist
Expand Down
18 changes: 15 additions & 3 deletions _packaging/appimage/Dockerfile
Expand Up @@ -70,6 +70,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python-gi-dev \
python3 \
python3-dbus \
python3-docutils \
python3-dev \
python3-flake8 \
python3-pytest \
Expand Down Expand Up @@ -111,10 +112,21 @@ RUN wget -q https://www.freedesktop.org/software/fontconfig/release/fontconfig-$
`# Make Deadsnakes Python the default python3` \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python$PY_VERSION 1

# Newer rust is needed by librsvg
RUN apt-get update \
&& apt-get remove -y rustc cargo \
&& apt-get install -y --no-install-recommends curl \
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& apt-get remove -y curl \
&& rm -rf /var/lib/apt/lists/*

# librsvg needs gi-docgen
RUN pip install gi-docgen

ENV CHECKOUT=/root/jhbuild/checkout \
LD_LIBRARY_PATH="/root/jhbuild/install/lib" \
PKG_CONFIG_PATH="/root/jhbuild/install/lib/pkgconfig" \
PATH="/root/jhbuild/install/bin:/root/.local/bin:$PATH" \
PATH="/root/jhbuild/install/bin:/root/.local/bin:/root/.cargo/bin:$PATH" \
JHBUILD_RUN_AS_ROOT=""

# Install jhbuild
Expand All @@ -131,8 +143,8 @@ COPY jhbuildrc /root/.config/jhbuildrc

# Build GTK, GtkSourceView, and gobject-introspection
RUN jhbuild build \
&& rm -r /root/jhbuild/checkout \
&& rm -r /root/.local \
&& rm -r /root/.config \
&& rm -r /root/.cache

# Environmental variable needed to run GTK for gsettings schema
ENV XDG_DATA_DIRS="/root/jhbuild/install/share:/usr/share"
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -125,6 +125,7 @@ pyinstall = { "script" = "_packaging.make-script:make_pyinstaller" }
package = ["install-pyinstall", "gaphor-script", "version-file", "pyinstall"]
win-installer = { "script" = "_packaging.windows.build-win-installer:main" }
appimage-docker-build = "docker build -t ghcr.io/gaphor/gaphor-appimage _packaging/appimage"
appimage-docker-build-clean = "docker build --no-cache -t ghcr.io/gaphor/gaphor-appimage _packaging/appimage"
appimage-docker-push = "docker push ghcr.io/gaphor/gaphor-appimage:latest"
appimage-docker-run = "docker run --rm -it --volume $PWD:/gaphor ghcr.io/gaphor/gaphor-appimage"
gettext-pot = "pybabel extract -o po/gaphor.pot -F po/babel.ini gaphor"
Expand Down

0 comments on commit 762cd17

Please sign in to comment.