Bundle Poncho Wonky (Patchwork 5.4.0) for x86_64 and aarch64 on the 24.08 freedesktop runtime with the Electron BaseApp. Launcher forces Wayland when a socket is present so the app starts from terminals outside the desktop session. Pinned versions and checksums live in versions.sh and are validated by check-versions.sh.
38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
source "$(dirname "$0")/versions.sh"
|
|
|
|
RUNTIME="org.freedesktop.Platform"
|
|
SDK="org.freedesktop.Sdk"
|
|
BASEAPP="org.electronjs.Electron2.BaseApp"
|
|
APP_ID="nz.scuttlebutt.Patchwork"
|
|
MANIFEST="nz.scuttlebutt.Patchwork.yaml"
|
|
REPO="repo"
|
|
BUILD_DIR="build-dir"
|
|
|
|
# 1. Install build dependencies (runtime, SDK and Electron base app)
|
|
flatpak install -y flathub \
|
|
"${RUNTIME}//${RUNTIME_VERSION}" \
|
|
"${SDK}//${RUNTIME_VERSION}" \
|
|
"${BASEAPP}//${RUNTIME_VERSION}"
|
|
|
|
# 2. Build the bundle
|
|
if ! command -v flatpak-builder >/dev/null 2>&1; then
|
|
echo "flatpak-builder is not installed." >&2
|
|
echo "Install it with one of:" >&2
|
|
echo " sudo apt install flatpak-builder" >&2
|
|
echo " flatpak install flathub org.flatpak.Builder" >&2
|
|
echo "If you used org.flatpak.Builder, run:" >&2
|
|
echo " flatpak run --command=flatpak-builder org.flatpak.Builder --repo=${REPO} --force-clean ${BUILD_DIR} ${MANIFEST}" >&2
|
|
exit 1
|
|
fi
|
|
flatpak-builder --repo="${REPO}" --force-clean "${BUILD_DIR}" "${MANIFEST}"
|
|
|
|
# 3. Install it into the current user
|
|
flatpak --user remote-add --if-not-exists --no-gpg-verify patchwork-repo "${REPO}"
|
|
flatpak --user install -y patchwork-repo "${APP_ID}"
|
|
|
|
echo
|
|
echo "Done. Run it with: flatpak run ${APP_ID}"
|