diff --git a/.gitignore b/.gitignore index aaece48..1722dae 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ OneDriveGUI.code-workspace AppDir/ appimage-builder-cache/ +appimage-build/ *.AppImage *.md !readme.md \ No newline at end of file diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index 4185bee..bcce68e 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -23,7 +23,7 @@ AppDir: id: io.github.bpozdena.OneDriveGUI name: OneDriveGUI icon: OneDriveGUI - version: 1.2.0 + version: 1.3.1 exec: usr/bin/python3 exec_args: "$APPDIR/usr/src/OneDriveGUI.py $@" diff --git a/build_appimage_docker.sh b/build_appimage_docker.sh new file mode 100755 index 0000000..36cf595 --- /dev/null +++ b/build_appimage_docker.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# Docker-based AppImage builder for OneDriveGUI +# Allows building AppImages on non-Debian systems (e.g. Arch Linux) +# using an Ubuntu Noble container with appimage-builder. + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +echo "=== OneDriveGUI Docker AppImage Builder ===" +echo "" + +# Check Docker is available +if ! command -v docker &> /dev/null; then + echo "Error: docker not found. Please install Docker first." + exit 1 +fi + +# Build the AppImage inside an Ubuntu Noble container +docker run \ + --cap-add SYS_ADMIN \ + --device /dev/fuse \ + --security-opt apparmor:unconfined \ + --rm \ + -v "$SCRIPT_DIR:/OneDriveGUI" \ + ubuntu:noble \ + bash -c ' +set -e +echo "Installing dependencies..." +apt update +apt install -y wget python3 python3-pip fuse gtk-update-icon-cache + +echo "Installing appimage-builder..." +wget -q -O /tmp/appimage-builder.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage +chmod +x /tmp/appimage-builder.AppImage +mv /tmp/appimage-builder.AppImage /usr/local/bin/appimage-builder + +echo "" +echo "Building AppImage..." +cd /OneDriveGUI/ +./build_appimage.sh + +echo "" +echo "Fixing ownership of build artifacts..." +chown -R '"$(id -u)"':'"$(id -g)"' /OneDriveGUI/AppDir 2>/dev/null || true +# Fix ownership of the generated AppImage +chown '"$(id -u)"':'"$(id -g)"' /OneDriveGUI/OneDriveGUI-*.AppImage 2>/dev/null || true +' + +echo "" +echo "=== Build complete ===" +ls -lh "$SCRIPT_DIR"/OneDriveGUI-*.AppImage 2>/dev/null || echo "No AppImage found in $SCRIPT_DIR"