Files
VoxVera/packaging/build_appimage.sh
T
thePR0M3TH3AN dff82c6abd Robust CI/CD and Packaging Fixes
- Fixed hardcoded paths in build_appimage.sh and build_flatpak.sh to honor command-line arguments.
- Enhanced ci/test-e2e.sh to stop system Tor and manage a fresh instance on default ports for consistent testing.
- Explicitly configured OnionShare to use unmanaged Tor mode and specific ports in E2E script and tests.
- Improved Tor bootstrapping and reachability verification in CI.
2026-03-14 22:28:53 -04:00

53 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
# Ensure we are in project root
cd "$(dirname "$0")/.."
ARCH=$(uname -m)
BINARY=${1:-"voxvera/resources/bin/voxvera-linux-$ARCH"}
if [ ! -f "$BINARY" ]; then
echo "Binary not found: $BINARY. Run scripts/build_binaries.sh first." >&2
exit 1
fi
APPDIR=build/AppDir
mkdir -p "$APPDIR/usr/bin"
cp "$BINARY" "$APPDIR/usr/bin/voxvera"
chmod +x "$APPDIR/usr/bin/voxvera"
# AppRun symlink (Crucial for AppImage to launch)
ln -sf usr/bin/voxvera "$APPDIR/AppRun"
chmod +x "$APPDIR/AppRun"
# Desktop file
cat > "$APPDIR/voxvera.desktop" <<EOD
[Desktop Entry]
Type=Application
Name=VoxVera
Exec=voxvera
Icon=voxvera
Categories=Utility;
Terminal=true
EOD
# Use a generic icon since we don't have one
# (AppImageTool requires an icon file to exist)
# We will copy a qrcode as a placeholder if nothing else exists
cp site/qrcode-content.png "$APPDIR/voxvera.png"
# Download appimagetool
echo "Downloading appimagetool..."
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
# Run appimagetool
echo "Running appimagetool..."
export ARCH
mkdir -p voxvera/resources/bin
./appimagetool --appimage-extract-and-run "$APPDIR" voxvera/resources/bin/VoxVera-x86_64.AppImage
rm appimagetool
echo "AppImage created at voxvera/resources/bin/VoxVera-x86_64.AppImage"