Skip to content

Commit

Permalink
build appimage with static runtime
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lievenhey committed Feb 5, 2024
1 parent e398f8c commit 2d41c79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
9 changes: 7 additions & 2 deletions scripts/appimage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN sed -i 's#enabled=1#enabled=0#' /etc/yum/pluginconf.d/fastestmirror.conf &&
# kgraphviewer
boost boost-devel graphviz-devel \
# appimages
fuse fuse-libs bzip2 && \
fuse fuse-libs bzip2 desktop-file-utils && \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
rm -Rf /var/cache/yum && \
. /opt/rh/devtoolset-11/enable
Expand All @@ -66,7 +66,12 @@ RUN wget https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/q

# appimage build tools
RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20230713-1/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage && \
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/
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/ && \
wget https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-x86_64 && \
wget https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage && \
chmod +x appimagetool-x86_64.AppImage && mv appimagetool-x86_64.AppImage /usr/bin/ && \
mv runtime-x86_64 /opt/


# qcustomplot
RUN cd /opt && mkdir qcustomplot && cd qcustomplot && \
Expand Down
5 changes: 4 additions & 1 deletion scripts/appimage/build_appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,7 @@ linuxdeploy-x86_64.AppImage --appdir appdir --plugin qt \
-d "./appdir/usr/share/applications/com.kdab.hotspot.desktop" \
--output appimage

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

mv Hotspot-x86_64.AppImage "/output/hotspot-$gitversion-x86_64.AppImage"

0 comments on commit 2d41c79

Please sign in to comment.