You've already forked OneDriveGUI
mirror of
https://github.com/bpozdena/OneDriveGUI.git
synced 2026-10-24 04:59:17 +03:00
Add Docker-based AppImage builder script based on @cielavenir 's suggestion in #286
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,6 +10,7 @@ OneDriveGUI.code-workspace
|
||||
|
||||
AppDir/
|
||||
appimage-builder-cache/
|
||||
appimage-build/
|
||||
*.AppImage
|
||||
*.md
|
||||
!readme.md
|
||||
@@ -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 $@"
|
||||
|
||||
|
||||
53
build_appimage_docker.sh
Executable file
53
build_appimage_docker.sh
Executable file
@@ -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"
|
||||
Reference in New Issue
Block a user