Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix search_library_path() on Debian i386 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions containers/gtk3/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions containers/gtk3/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions containers/gtk4/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# 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
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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions containers/gtk4/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 16 additions & 2 deletions linuxdeploy-plugin-gtk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down