You've already forked OneDriveGUI
mirror of
https://github.com/bpozdena/OneDriveGUI.git
synced 2026-10-24 04:59:17 +03:00
59 lines
1.9 KiB
Bash
Executable File
59 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Docker-based AppImage builder for OneDriveGUI
|
|
# Allows building AppImages on non-Debian systems (e.g. Arch Linux)
|
|
# using an Ubuntu Jammy container with appimage-builder.
|
|
#
|
|
# Must stay on Jammy (22.04), not Noble (24.04): Noble's glibc package uses a
|
|
# merged-/usr layout that appimage-builder v1.1.0's glibc-compatibility runtime
|
|
# does not handle, breaking the AppImage on hosts with an older glibc than the
|
|
# build machine (APPRUN_ERROR / linker SIGSEGV). See AppImageBuilder.yml.
|
|
|
|
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 Jammy container
|
|
docker run \
|
|
--cap-add SYS_ADMIN \
|
|
--device /dev/fuse \
|
|
--security-opt apparmor:unconfined \
|
|
--rm \
|
|
-v "$SCRIPT_DIR:/OneDriveGUI" \
|
|
ubuntu:jammy \
|
|
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"
|