diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d3319a..956def0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - name: Setup dependencies run: | sudo apt-get update -y -qq - sudo apt-get install -y -qq libgtk-3-0 libgtk-3-dev gir1.2-gtk-3.0 wget tree libgirepository1.0-dev libfuse2 + sudo apt-get install -y -qq dpkg-dev libgtk-3-0 libgtk-3-dev gir1.2-gtk-3.0 wget tree libgirepository1.0-dev libfuse2 - name: Download external binairies run: | diff --git a/containers/gtk3/Dockerfile.debian b/containers/gtk3/Dockerfile.debian index 81221f0..9d91b36 100644 --- a/containers/gtk3/Dockerfile.debian +++ b/containers/gtk3/Dockerfile.debian @@ -6,8 +6,8 @@ ARG APPDIR=/AppDir ARG TZ=UTC RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone RUN apt-get update && \ - apt-get install -y wget librsvg2-dev file findutils pkg-config libgtk-3-0 \ - libgtk-3-dev gtk-3-examples gir1.2-gtk-3.0 + apt-get install -y dpkg-dev wget librsvg2-dev file findutils pkg-config libgtk-3-0 \ + libgtk-3-dev gtk-3-examples gir1.2-gtk-3.0 libgirepository1.0-dev COPY . . ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" . RUN chmod +x *.sh *.AppImage diff --git a/containers/gtk3/Dockerfile.ubuntu b/containers/gtk3/Dockerfile.ubuntu index af23025..a349020 100644 --- a/containers/gtk3/Dockerfile.ubuntu +++ b/containers/gtk3/Dockerfile.ubuntu @@ -6,8 +6,8 @@ ARG APPDIR=/AppDir ARG TZ=UTC RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone RUN apt-get update && \ - apt-get install -y wget librsvg2-dev file findutils pkg-config libgtk-3-0 \ - libgtk-3-dev gtk-3-examples gir1.2-gtk-3.0 libfuse2 + apt-get install -y dpkg-dev wget librsvg2-dev file findutils pkg-config libgtk-3-0 \ + libgtk-3-dev gtk-3-examples gir1.2-gtk-3.0 libgirepository1.0-dev libfuse2 COPY . . ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" . RUN chmod +x *.sh *.AppImage diff --git a/containers/gtk4/Dockerfile.debian b/containers/gtk4/Dockerfile.debian index 26f1e42..0b68d5d 100644 --- a/containers/gtk4/Dockerfile.debian +++ b/containers/gtk4/Dockerfile.debian @@ -1,5 +1,4 @@ -# GTK4 is not yet supported on Debian Stable -FROM docker.io/debian:experimental AS build-stage +FROM docker.io/debian:bookworm AS build-stage WORKDIR /linuxdeploy ENV APPIMAGE_EXTRACT_AND_RUN=1 ENV DEBIAN_FRONTEND=noninteractive @@ -7,8 +6,8 @@ ARG APPDIR=/AppDir ARG TZ=UTC RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone RUN apt-get update && \ - apt-get install -y wget librsvg2-dev file findutils pkg-config && \ - apt-get install -y -t experimental libgtk-4-1 libgtk-4-dev gtk-4-examples gir1.2-gtk-4.0 + apt-get install -y dpkg-dev wget librsvg2-dev file findutils pkg-config && \ + apt-get install -y libgtk-4-1 libgtk-4-dev gtk-4-examples gir1.2-gtk-4.0 libgirepository1.0-dev COPY . . ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" . RUN chmod +x *.sh *.AppImage @@ -20,7 +19,7 @@ RUN ./linuxdeploy-x86_64.AppImage \ --desktop-file /usr/share/applications/org.gtk.WidgetFactory4.desktop \ --icon-file /usr/share/icons/hicolor/scalable/apps/org.gtk.WidgetFactory4.svg -FROM docker.io/debian:experimental +FROM docker.io/debian:bookworm VOLUME ["/AppImage"] WORKDIR /AppImage ENV APPIMAGE_EXTRACT_AND_RUN=1 diff --git a/containers/gtk4/Dockerfile.ubuntu b/containers/gtk4/Dockerfile.ubuntu index 14b9589..936cea5 100644 --- a/containers/gtk4/Dockerfile.ubuntu +++ b/containers/gtk4/Dockerfile.ubuntu @@ -6,8 +6,8 @@ ARG APPDIR=/AppDir ARG TZ=UTC RUN ln -snf "/usr/share/zoneinfo/$TZ" "/etc/localtime" && echo "$TZ" > /etc/timezone RUN apt-get update && \ - apt-get install -y wget librsvg2-dev file findutils pkg-config libgtk-4-1 \ - libgtk-4-dev gtk-4-examples gir1.2-gtk-4.0 libfuse2 + apt-get install -y dpkg-dev wget librsvg2-dev file findutils pkg-config libgtk-4-1 \ + libgtk-4-dev gtk-4-examples gir1.2-gtk-4.0 libgirepository1.0-dev libfuse2 COPY . . ADD "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" . RUN chmod +x *.sh *.AppImage diff --git a/linuxdeploy-plugin-gtk.sh b/linuxdeploy-plugin-gtk.sh index 106ea3f..f5a5a20 100755 --- a/linuxdeploy-plugin-gtk.sh +++ b/linuxdeploy-plugin-gtk.sh @@ -77,9 +77,15 @@ copy_lib_tree() { done } +get_triplet() { + if command -v dpkg-architecture > /dev/null; then + dpkg-architecture -qDEB_HOST_MULTIARCH + fi +} + search_library_path() { PATH_ARRAY=( - "/usr/lib/$(uname -m)-linux-gnu" + "/usr/lib/$(get_triplet)" "/usr/lib64" "/usr/lib" ) @@ -101,7 +107,7 @@ search_tool() { fi PATH_ARRAY=( - "/usr/lib/$(uname -m)-linux-gnu/$directory/$tool" + "/usr/lib/$(get_triplet)/$directory/$tool" "/usr/lib64/$directory/$tool" "/usr/lib/$directory/$tool" "/usr/bin/$tool" @@ -152,6 +158,14 @@ fi APPDIR="$(realpath "$APPDIR")" mkdir -p "$APPDIR" +. /etc/os-release +if [ "$ID" = "debian" ] || [ "$ID" = "ubuntu" ]; then + if ! command -v dpkg-architecture &>/dev/null; then + echo -e "$0: dpkg-architecture not found.\nInstall dpkg-dev then re-run the plugin." + exit 1 + fi +fi + if command -v pkgconf > /dev/null; then PKG_CONFIG="pkgconf" elif command -v pkg-config > /dev/null; then