Skip to content

Commit 2a27d2a

Browse files
committed
build appimage with static runtime
This allows the user to run the appimage on non fuse2 systems (all moderns systems use fuse3). This is achieved by using the static appimage runtime. Since linuxdeploy doesn't support changing the runtime I only use it to create the appdir directory. Then I use the original appimagetool to package the appimage using the static runtime. This should also make it possible to run the appimage on a non glibc system but I don't have access to one so I can't test it. fixes: #485
1 parent 1ceac8a commit 2a27d2a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

scripts/appimage/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ RUN sed -i 's#enabled=1#enabled=0#' /etc/yum/pluginconf.d/fastestmirror.conf &&
4343
# kgraphviewer
4444
boost boost-devel graphviz-devel \
4545
# appimages
46-
fuse fuse-libs bzip2 && \
46+
fuse fuse-libs bzip2 desktop-file-utils && \
4747
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
4848
rm -Rf /var/cache/yum && \
4949
. /opt/rh/devtoolset-11/enable
@@ -66,7 +66,12 @@ RUN wget https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/q
6666

6767
# appimage build tools
6868
RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20230713-1/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage && \
69-
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage && chmod +x linuxdeploy-plugin-qt-x86_64.AppImage && mv linuxdeploy* /usr/bin/
69+
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage && chmod +x linuxdeploy-plugin-qt-x86_64.AppImage && mv linuxdeploy* /usr/bin/ && \
70+
wget https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-x86_64 && \
71+
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage && \
72+
chmod +x appimagetool-x86_64.AppImage && mv appimagetool-x86_64.AppImage /usr/bin/ && \
73+
mv runtime-x86_64 /opt/
74+
7075

7176
# qcustomplot
7277
RUN cd /opt && mkdir qcustomplot && cd qcustomplot && \

scripts/appimage/build_appimage.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,7 @@ linuxdeploy-x86_64.AppImage --appdir appdir --plugin qt \
7474
-d "./appdir/usr/share/applications/com.kdab.hotspot.desktop" \
7575
--output appimage
7676

77-
mv Hotspot*x86_64.AppImage "/output/hotspot-$gitversion-x86_64.AppImage"
77+
# package appdir with type 2 runtime so we don't depend on glibc and fuse2
78+
appimagetool-x86_64.AppImage --runtime-file /opt/runtime-x86_64 appdir
79+
80+
mv Hotspot-x86_64.AppImage "/output/hotspot-$gitversion-x86_64.AppImage"

0 commit comments

Comments
 (0)