diff --git a/utils/scripts/docker/package_appimages.bash b/utils/scripts/docker/package_appimages.bash index c05b942700cd88b26449783eb185905a239267dc..a045024b1e3c33471cdbc6d2cd0f61e46586c95c 100755 --- a/utils/scripts/docker/package_appimages.bash +++ b/utils/scripts/docker/package_appimages.bash @@ -4,6 +4,10 @@ set -xe echo "The appimage folder is not mounted in the docker" exit 1 } +[ ! -f /src/.gitignore ] && { + echo "The source folder is not mounted in the docker" + exit 1 +} [ ! -d squashfs-root ] && { echo "The appimage utilities where not deployed..." exit 1 @@ -14,6 +18,10 @@ export PATH="$PWD/squashfs-root/usr/bin:$PATH" export LD_LIBRARY_PATH="$PWD/squashfs-root/usr/lib:$LD_LIBRARY_PATH" export QMAKE=/usr/lib/qt6/bin/qmake6 +# NOTE: Don't package the wayland things, rely on xwayland for now... see later if the wayland thing +# is fixed upstream: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/pull/25 +# export EXTRA_PLATFORM_PLUGINS="libqxcb.so;libqwayland-egl.so;libqwayland-generic.so;" + function join_by() { local d=${1-} f=${2-} if shift 2; then @@ -21,42 +29,27 @@ function join_by() { fi } +EXCLUDE_LIBS="libgdk_pixbuf libpango libcairo libgio libglib libgmodule libgobject libgthread libX11-xcb libxcb-" +EXCLUDE_LIBS="-name *$(join_by "* -or -name *" $EXCLUDE_LIBS)*" + function deploy() { local EXEC=${1,,} - local WITHQTPLUGIN="$2" - - local EXTRA_PLATFORM_PLUGINS="libqxcb.so;libqwayland-egl.so;libqwayland-generic.so;" - export EXTRA_PLATFORM_PLUGINS + local PLUGINS=() + while [ $# -gt 1 ]; do + shift 1 + case $@ in + *--qt*) PLUGINS+=(--plugin qt);; + *);; + esac + done - local EXCLUDE_LIBS="libgdk_pixbuf libpango libcairo libgio libglib libgmodule libgobject libgthread libX11-xcb libxcb-" - local EXCLUDE_LIBS="-name *$(join_by "* -or -name *" $EXCLUDE_LIBS)*" + linuxdeploy -v1 --appdir ${EXEC^} -e target/release/${EXEC} -i ${EXEC}/${EXEC}.png -d ${EXEC}/${EXEC}.desktop ${PLUGINS[@]} - local qtPlugin=() - if [[ "x$WITHQTPLUGIN" == "x1" ]]; then - qtPlugin+=(--plugin qt) - fi - - # Will do most of the work - linuxdeploy -v1 --appdir ${EXEC^} -e target/release/${EXEC} \ - -i ${EXEC}/${EXEC}.png -d ${EXEC}/${EXEC}.desktop "${qtPlugin[@]}" - - # Handle aftermath things here, we force copy the qt plugins for wayland and remove unwanted - # libs... NOTE: For now we force the xcb platform because of troubles with wayland... - mkdir -p ${EXEC^}/apprun-hooks/ - find ${EXEC^}/usr/lib/ -type f -and \( ${EXCLUDE_LIBS} \) -delete - cp LICENSE CHANGELOG.md CONTRIBUTING.md ${EXEC^}/ + mkdir -p ${EXEC^}/apprun-hooks/ + find ${EXEC^}/usr/ -type f -and \( ${EXCLUDE_LIBS} \) -delete + cp LICENSE CHANGELOG.md CONTRIBUTING.md ${EXEC^}/ install -Dm644 ${EXEC}/${EXEC}.appdata.xml ${EXEC^}/usr/share/metainfo/${EXEC}.appdata.xml - case ${*:2} in - *qt*) - cp -rf /usr/lib/x86_64-linux-gnu/qt6/plugins/wayland-shell-integration ${EXEC^}/usr/plugins/wayland-shell-integration - for SHELL in ${EXEC^}/usr/plugins/wayland-shell-integration/*; do - patchelf --force-rpath --set-rpath \$ORIGIN/../../lib:\$ORIGIN ${SHELL} - done - ;; - *);; - esac - # Custom AppRun script! unlink ${EXEC^}/AppRun \ && touch ${EXEC^}/AppRun \ && chmod +x ${EXEC^}/AppRun @@ -66,20 +59,15 @@ set -e this_dir="\$(readlink -f "\$(dirname "\$0")")" [ ! -n "\$(find "\$this_dir"/apprun-hooks/ -maxdepth 0 -type d -empty 2>/dev/null)" ] \ && [ -d "\$this_dir"/apprun-hooks/ ] \ - && { - for HOOK in "\$this_dir"/apprun-hooks/*; do - source "\$HOOK" - done -} + && { for HOOK in "\$this_dir"/apprun-hooks/*; do source "\$HOOK"; done } exec "\$this_dir/usr/bin/${EXEC}" \$@ EOF - # Pack the AppImage appimagetool -v --comp xz ${EXEC^} mv ${EXEC^}-$(arch).AppImage /build/ } deploy lkt deploy amadeus -deploy lektord 1 +deploy lektord --qt diff --git a/utils/scripts/docker/setup_base.bash b/utils/scripts/docker/setup_base.bash index 031e4094b3f6905842f182b5b03c5bb69175ff44..c404a13f03745710c00ebabae53d2f09dc95102f 100755 --- a/utils/scripts/docker/setup_base.bash +++ b/utils/scripts/docker/setup_base.bash @@ -2,7 +2,7 @@ set -e ARCH=$(arch) -PKG_BASE="make libmpv-dev cmake clang clang-format manpages man-db chrpath patchelf" +PKG_BASE="make libmpv-dev cmake clang clang-format manpages man-db patchelf" PKG_BACKPORT="" PKG_BACKPORT+=" qt6-base-dev qt6-declarative-dev qt6-multimedia-dev qt6-tools-private-dev" @@ -11,9 +11,7 @@ PKG_BACKPORT+=" qt6-image-formats-plugins qt6-gtk-platformtheme qt6-base-abi lib PKG_BACKPORT+=" libqt6multimedia6 libqt6concurrent6 libqt6multimediawidgets6 " PKG_BACKPORT+=" libqt6opengl6 libqt6openglwidgets6 libqt6widgets6" PKG_BACKPORT+=" qt6-translations-l10n qt6-l10n-tools" - PKG_BACKPORT+=" qt6-wayland-dev qt6-wayland qt6-wayland-dev-tools libqt6waylandclient6 libqt6wlshellintegration6" - PKG_BACKPORT+=" qt6-qpa-plugins" function appimage_setup() {