mirror of
https://github.com/Heretek-AI/heretek-flathub.git
synced 2026-07-01 15:39:27 -04:00
Remove gsd-pi-config, add drop-app
This commit is contained in:
@@ -1,108 +0,0 @@
|
||||
name: Build Flatpak
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Nightly at 04:00 UTC
|
||||
- cron: '0 4 * * *'
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'gsd-pi-config/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:gnome-48
|
||||
options: --privileged
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check upstream changes
|
||||
id: check
|
||||
run: |
|
||||
# Get latest commit from upstream
|
||||
UPSTREAM_COMMIT=$(git ls-remote https://github.com/open-gsd/gsd-pi-config.git HEAD | cut -f1)
|
||||
echo "upstream_commit=$UPSTREAM_COMMIT" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Read the commit in our manifest
|
||||
CURRENT_COMMIT=$(grep 'commit:' gsd-pi-config/com.opengsd.pi.yaml | awk '{print $2}')
|
||||
echo "current_commit=$CURRENT_COMMIT" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [ "$UPSTREAM_COMMIT" = "$CURRENT_COMMIT" ]; then
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
echo "No upstream changes detected."
|
||||
else
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Upstream changed: $CURRENT_COMMIT -> $UPSTREAM_COMMIT"
|
||||
fi
|
||||
|
||||
- name: Update manifest commit
|
||||
if: steps.check.outputs.changed == 'true'
|
||||
run: |
|
||||
cd gsd-pi-config
|
||||
sed -i "s/commit: .*/commit: ${{ steps.check.outputs.upstream_commit }}/" com.opengsd.pi.yaml
|
||||
echo "Updated manifest to commit ${{ steps.check.outputs.upstream_commit }}"
|
||||
|
||||
- name: Vendor dependencies
|
||||
if: steps.check.outputs.changed == 'true'
|
||||
run: |
|
||||
cd gsd-pi-config
|
||||
|
||||
# Clone upstream at the target commit
|
||||
git clone --depth 1 https://github.com/open-gsd/gsd-pi-config.git gsd-pi-config-src
|
||||
cd gsd-pi-config-src
|
||||
git fetch --depth 1 origin ${{ steps.check.outputs.upstream_commit }}
|
||||
git checkout ${{ steps.check.outputs.upstream_commit }}
|
||||
cd ..
|
||||
|
||||
# Vendor npm
|
||||
cd gsd-pi-config-src
|
||||
npm ci
|
||||
cd ..
|
||||
|
||||
# Vendor cargo
|
||||
cargo vendor --versioned-dirs --manifest-path gsd-pi-config-src/src-tauri/Cargo.toml gsd-pi-config/cargo-vendor
|
||||
|
||||
# Cleanup source clone
|
||||
rm -rf gsd-pi-config/gsd-pi-config-src
|
||||
|
||||
- name: Build Flatpak
|
||||
if: steps.check.outputs.changed == 'true'
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||
with:
|
||||
manifest-path: gsd-pi-config/com.opengsd.pi.yaml
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
|
||||
- name: Upload repo artifact
|
||||
if: steps.check.outputs.changed == 'true'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: flatpak-repo
|
||||
path: repo/
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
if: needs.build.result == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Download repo artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: flatpak-repo
|
||||
path: repo/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: repo/
|
||||
@@ -1,67 +0,0 @@
|
||||
# Flatpak for GSD Pi Config
|
||||
|
||||
Flatpak packaging for [GSD Pi Config](https://github.com/open-gsd/gsd-pi-config), a Tauri v2 desktop app.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
gsd-pi-config/
|
||||
com.opengsd.pi.yaml Flatpak manifest
|
||||
com.opengsd.pi.desktop Desktop entry
|
||||
com.opengsd.pi.metainfo.xml AppStream metadata
|
||||
com.opengsd.pi.svg App icon
|
||||
cargo-config.toml Cargo config for vendored deps
|
||||
build.sh Build script (vendors deps + builds)
|
||||
create-bundle.sh Creates .flatpak bundle for distribution
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
```bash
|
||||
# Flatpak + builder
|
||||
sudo apt install flatpak flatpak-builder
|
||||
|
||||
# Flathub remote
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
# GNOME SDK (includes webkit2gtk-4.1)
|
||||
flatpak install flathub org.gnome.Sdk//48 org.gnome.Platform//48
|
||||
```
|
||||
|
||||
## Build & Install
|
||||
|
||||
```bash
|
||||
./build.sh # Uses cached clone if available
|
||||
./build.sh --clone # Fresh clone + build
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
flatpak run com.opengsd.pi
|
||||
```
|
||||
|
||||
## Create Bundle
|
||||
|
||||
```bash
|
||||
./create-bundle.sh
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
The build script clones the app repo, vendors npm + Cargo dependencies
|
||||
on the host (where DNS works), then `flatpak-builder` builds inside the
|
||||
sandbox fully offline.
|
||||
|
||||
Key details:
|
||||
- **`npx tauri build`** (not `cargo build`) is used so Tauri properly
|
||||
embeds frontend assets into the binary
|
||||
- **`tauri-plugin-localhost`** serves bundled assets via HTTP since the
|
||||
`tauri://` custom protocol doesn't work in WebKit2GTK inside Flatpak
|
||||
- **`WEBKIT_DISABLE_DMABUF_RENDERER=1`** fixes a Wayland protocol crash
|
||||
in the sandbox
|
||||
|
||||
## Updating
|
||||
|
||||
1. Update `APP_COMMIT` in `build.sh` to the new commit hash
|
||||
2. Run `./build.sh --clone`
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Build script for Flatpak
|
||||
#
|
||||
# Vendors npm + Cargo deps from the app repo, then builds inside
|
||||
# the Flatpak sandbox (no network needed).
|
||||
#
|
||||
# Usage: ./build.sh [--clone]
|
||||
# --clone Clone the repo fresh before building
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
APP_REPO="$SCRIPT_DIR/gsd-pi-config-src"
|
||||
APP_URL="https://github.com/open-gsd/gsd-pi-config.git"
|
||||
APP_COMMIT="b40e19f"
|
||||
|
||||
# Optionally clone fresh
|
||||
if [ "$1" = "--clone" ] || [ ! -d "$APP_REPO" ]; then
|
||||
echo "=== Cloning app repo ==="
|
||||
rm -rf "$APP_REPO"
|
||||
git clone --depth 1 "$APP_URL" "$APP_REPO"
|
||||
cd "$APP_REPO"
|
||||
git fetch --depth 1 origin "$APP_COMMIT"
|
||||
git checkout "$APP_COMMIT"
|
||||
cd "$SCRIPT_DIR"
|
||||
fi
|
||||
|
||||
echo "=== Vendoring npm dependencies ==="
|
||||
cd "$APP_REPO"
|
||||
rm -rf node_modules
|
||||
npm ci 2>&1 | tail -5
|
||||
|
||||
echo ""
|
||||
echo "=== Vendoring Cargo crates ==="
|
||||
rm -rf "$SCRIPT_DIR/cargo-vendor"
|
||||
cargo vendor --versioned-dirs --manifest-path src-tauri/Cargo.toml "$SCRIPT_DIR/cargo-vendor" 2>&1 | tail -3
|
||||
|
||||
echo ""
|
||||
echo "=== Building Flatpak ==="
|
||||
cd "$SCRIPT_DIR"
|
||||
rm -rf .flatpak-builder build-dir
|
||||
flatpak-builder --user --install --force-clean build-dir com.opengsd.pi.yaml
|
||||
|
||||
echo ""
|
||||
echo "Done! Run with: flatpak run com.opengsd.pi"
|
||||
@@ -1,7 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Pi
|
||||
Exec=pi
|
||||
Icon=com.opengsd.pi
|
||||
Type=Application
|
||||
Categories=Development;Utility;
|
||||
Keywords=tauri;desktop;config;
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>com.opengsd.pi</id>
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
<name>Pi</name>
|
||||
<summary>A Tauri v2 desktop application</summary>
|
||||
<description>
|
||||
<p>
|
||||
Pi is a desktop application built with Tauri v2.
|
||||
It provides a modern, secure interface for configuration and management.
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">https://github.com/open-gsd/gsd-pi-config</url>
|
||||
<url type="bugtracker">https://github.com/open-gsd/gsd-pi-config/issues</url>
|
||||
<provides>
|
||||
<binary>pi</binary>
|
||||
</provides>
|
||||
<content_rating type="oars-1.1" />
|
||||
<releases>
|
||||
<release version="0.1.0" date="2026-06-02">
|
||||
<description>
|
||||
<p>Initial release with basic functionality.</p>
|
||||
</description>
|
||||
</release>
|
||||
</releases>
|
||||
</component>
|
||||
@@ -1,50 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||
<defs>
|
||||
<!-- Background gradient: deep black with subtle cyan tint at top -->
|
||||
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" stop-color="#0a1420"/>
|
||||
<stop offset="40%" stop-color="#000000"/>
|
||||
<stop offset="100%" stop-color="#000000"/>
|
||||
</linearGradient>
|
||||
|
||||
<!-- Cyan glow filter -->
|
||||
<filter id="cyanGlow" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feGaussianBlur stdDeviation="28" result="blur"/>
|
||||
<feFlood flood-color="#7dcfff" flood-opacity="0.6"/>
|
||||
<feComposite in2="blur" operator="in" result="glow"/>
|
||||
<feMerge>
|
||||
<feMergeNode in="glow"/>
|
||||
<feMergeNode in="SourceGraphic"/>
|
||||
</feMerge>
|
||||
</filter>
|
||||
|
||||
<!-- Inner stroke highlight -->
|
||||
<linearGradient id="strokeGrad" x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" stop-color="rgba(125, 207, 255, 0.3)"/>
|
||||
<stop offset="100%" stop-color="rgba(125, 207, 255, 0.05)"/>
|
||||
</linearGradient>
|
||||
|
||||
<style>
|
||||
.wordmark {
|
||||
font-family: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Menlo', monospace;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.04em;
|
||||
fill: #7dcfff;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
|
||||
<!-- Rounded square background (macOS convention ~22% corner radius) -->
|
||||
<rect x="0" y="0" width="1024" height="1024" rx="224" ry="224" fill="url(#bgGrad)"/>
|
||||
|
||||
<!-- Inner stroke for depth -->
|
||||
<rect x="4" y="4" width="1016" height="1016" rx="220" ry="220"
|
||||
fill="none" stroke="url(#strokeGrad)" stroke-width="2"/>
|
||||
|
||||
<!-- Giant "2" with glow, perfectly centered -->
|
||||
<g filter="url(#cyanGlow)">
|
||||
<text class="wordmark" x="512" y="720" font-size="760" text-anchor="middle">
|
||||
2
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
@@ -1,78 +0,0 @@
|
||||
app-id: com.opengsd.pi
|
||||
runtime: org.gnome.Platform
|
||||
runtime-version: '48'
|
||||
sdk: org.gnome.Sdk
|
||||
command: pi
|
||||
|
||||
finish-args:
|
||||
- --share=ipc
|
||||
- --socket=fallback-x11
|
||||
- --socket=wayland
|
||||
- --socket=pulseaudio
|
||||
- --device=dri
|
||||
- --filesystem=xdg-run/keyring
|
||||
- --share=network
|
||||
- --env=WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||
|
||||
build-options:
|
||||
env:
|
||||
CARGO_HOME: /run/build/pi/cargo
|
||||
|
||||
modules:
|
||||
# Node.js runtime
|
||||
- name: nodejs
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- mkdir -p /app/share/nodejs
|
||||
- mv * /app/share/nodejs/
|
||||
- mkdir -p /app/bin
|
||||
- ln -s /app/share/nodejs/bin/node /app/bin/node
|
||||
- ln -s /app/share/nodejs/bin/npm /app/bin/npm
|
||||
- ln -s /app/share/nodejs/bin/npx /app/bin/npx
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://nodejs.org/dist/v22.16.0/node-v22.16.0-linux-x64.tar.xz
|
||||
sha256: f4cb75bb036f0d0eddf6b79d9596df1aaab9ddccd6a20bf489be5abe9467e84e
|
||||
|
||||
# Build frontend + Tauri binary
|
||||
- name: pi
|
||||
buildsystem: simple
|
||||
build-options:
|
||||
append-path: /app/share/nodejs/bin:/usr/lib/sdk/rust-stable/bin
|
||||
build-commands:
|
||||
# Build frontend
|
||||
- npm run build
|
||||
# Set up vendored cargo deps
|
||||
- mkdir -p src-tauri/.cargo
|
||||
- cp cargo-config.toml src-tauri/.cargo/config.toml
|
||||
# Build with tauri (embeds frontend assets into binary)
|
||||
- CARGO_NET_OFFLINE=true npx tauri build --no-bundle
|
||||
# Install binary
|
||||
- mkdir -p ${FLATPAK_DEST}/bin
|
||||
- cp src-tauri/target/release/gsd-pi-config ${FLATPAK_DEST}/bin/pi
|
||||
# Install desktop entry, icon, and metadata (from local sources)
|
||||
- mkdir -p ${FLATPAK_DEST}/share/applications
|
||||
- cp com.opengsd.pi.desktop ${FLATPAK_DEST}/share/applications/
|
||||
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps
|
||||
- cp com.opengsd.pi.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/
|
||||
- mkdir -p ${FLATPAK_DEST}/share/metainfo
|
||||
- cp com.opengsd.pi.metainfo.xml ${FLATPAK_DEST}/share/metainfo/
|
||||
sources:
|
||||
# App source from git
|
||||
- type: git
|
||||
url: https://github.com/open-gsd/gsd-pi-config.git
|
||||
commit: b40e19f
|
||||
# Vendored cargo crates
|
||||
- type: dir
|
||||
path: cargo-vendor
|
||||
dest: src-tauri/vendor
|
||||
# Cargo config for vendored deps
|
||||
- type: file
|
||||
path: cargo-config.toml
|
||||
# Flatpak metadata (local)
|
||||
- type: file
|
||||
path: com.opengsd.pi.desktop
|
||||
- type: file
|
||||
path: com.opengsd.pi.svg
|
||||
- type: file
|
||||
path: com.opengsd.pi.metainfo.xml
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Create a release bundle for Flathub submission
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
flatpak-builder --repo=repo --force-clean build-dir com.opengsd.pi.yaml
|
||||
flatpak build-bundle repo com.opengsd.pi.flatpak com.opengsd.pi
|
||||
|
||||
echo "Bundle created: com.opengsd.pi.flatpak"
|
||||
echo "Upload to Flathub or host on your own repo."
|
||||
@@ -0,0 +1,96 @@
|
||||
# Drop Desktop Flatpak
|
||||
|
||||
Flatpak packaging for [Drop Desktop](https://github.com/Drop-OSS/drop-app), a Tauri v2 desktop client for the open-source, self-hosted game distribution platform.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
drop-app/
|
||||
org.droposs.client.yaml Flatpak manifest
|
||||
org.droposs.client.desktop Desktop entry
|
||||
org.droposs.client.metainfo.xml AppStream metadata
|
||||
org.droposs.client.svg App icon (scalable)
|
||||
cargo-config.toml Cargo config for vendored deps
|
||||
build.sh Build script (vendors deps + builds)
|
||||
create-bundle.sh Creates .flatpak bundle for distribution
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
```bash
|
||||
# Flatpak + builder
|
||||
sudo apt install flatpak flatpak-builder
|
||||
# Fedora: sudo dnf install flatpak flatpak-builder
|
||||
|
||||
# Flathub remote
|
||||
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
# GNOME SDK (includes webkit2gtk-4.1)
|
||||
flatpak install flathub org.gnome.Sdk//48 org.gnome.Platform//48
|
||||
|
||||
# Rust nightly SDK extension (app requires nightly features)
|
||||
flatpak install flathub org.freedesktop.Sdk.Extension.rust-nightly//24.08
|
||||
|
||||
# System tray indicator libraries (for tray icon bundling)
|
||||
# Fedora:
|
||||
sudo dnf install libayatana-appindicator-gtk3-devel libdbusmenu-gtk3-devel
|
||||
# Ubuntu:
|
||||
sudo apt install libayatana-appindicator3-dev libdbusmenu-gtk3-dev
|
||||
|
||||
# Build tools
|
||||
# Fedora: sudo dnf install pnpm cargo
|
||||
# Ubuntu: install pnpm via corepack or npm
|
||||
```
|
||||
|
||||
## Build & Install
|
||||
|
||||
```bash
|
||||
./build.sh # Uses cached clone if available
|
||||
./build.sh --clone # Fresh clone + build
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
flatpak run org.droposs.client
|
||||
```
|
||||
|
||||
## Create Bundle
|
||||
|
||||
```bash
|
||||
./create-bundle.sh
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
The build script clones the app repo, installs frontend dependencies with pnpm,
|
||||
builds the frontend, vendors Cargo dependencies, then `flatpak-builder` builds
|
||||
everything from source inside the sandbox.
|
||||
|
||||
Key details:
|
||||
- **pnpm build** runs inside the sandbox (node.js + pnpm bundled as modules)
|
||||
- **`npx tauri build --no-bundle`** builds the Rust binary with embedded frontend
|
||||
- **Vendored Cargo deps** via `cargo vendor --versioned-dirs` — builds offline
|
||||
- **Nightly Rust** via `org.freedesktop.Sdk.Extension.rust-nightly` — the app
|
||||
requires nightly features (nonpoison_rwlock, fn_traits, etc.)
|
||||
- **System tray libs** bundled from the host (`libayatana-appindicator3`, etc.)
|
||||
since the GNOME Platform runtime does not include them
|
||||
- **`tauri-plugin-localhost`** serves bundled assets via HTTP since the
|
||||
`tauri://` custom protocol doesn't work in WebKit2GTK inside Flatpak
|
||||
- **`WEBKIT_DISABLE_DMABUF_RENDERER=1`** fixes Wayland protocol crash
|
||||
- **`--filesystem=host`** allows app to access game install directories
|
||||
(user-configured, can be anywhere on the filesystem)
|
||||
|
||||
## Updating
|
||||
|
||||
1. Update `APP_COMMIT` in `build.sh` to the new commit hash
|
||||
2. Run `./build.sh --clone`
|
||||
3. Update `org.droposs.client.metainfo.xml` with new release version/date
|
||||
|
||||
## Known Issues
|
||||
|
||||
- The game launching feature (`flatpak-spawn --host`) is not yet implemented
|
||||
— deferred to a future milestone
|
||||
- The GNOME 48 runtime is end-of-life since March 2026; should migrate
|
||||
to GNOME 49 or 50 when the Rust nightly SDK extension is available for
|
||||
the corresponding Freedesktop SDK version
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
# Build script for Drop Desktop Flatpak
|
||||
#
|
||||
# Vendors Cargo deps from the app repo, then builds inside
|
||||
# the Flatpak sandbox. Frontend is built inside the sandbox
|
||||
# (pnpm install + pnpm build).
|
||||
#
|
||||
# Usage: ./build.sh
|
||||
# ./build.sh --clone # Clone fresh before building
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
APP_URL="https://github.com/Drop-OSS/drop-app.git"
|
||||
# Update this to the latest commit when rebuilding
|
||||
APP_COMMIT="c886b5e"
|
||||
APP_SRC_DIR="$SCRIPT_DIR/drop-app-src"
|
||||
|
||||
# ── Parse arguments ──
|
||||
DO_CLONE=false
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--clone) DO_CLONE=true ;;
|
||||
--help)
|
||||
echo "Usage: $0 [--clone]"
|
||||
echo " --clone Clone the repo fresh before building"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# ── Clone / update the app repo (for dependency vendoring only) ──
|
||||
if [ "$DO_CLONE" = true ] || [ ! -d "$APP_SRC_DIR" ]; then
|
||||
echo "=== Cloning app repo ==="
|
||||
rm -rf "$APP_SRC_DIR"
|
||||
git clone --depth 1 "$APP_URL" "$APP_SRC_DIR"
|
||||
cd "$APP_SRC_DIR"
|
||||
git fetch --depth 1 origin "$APP_COMMIT"
|
||||
git checkout "$APP_COMMIT"
|
||||
cd "$SCRIPT_DIR"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=== Vendoring Cargo crates ==="
|
||||
rm -rf "$SCRIPT_DIR/cargo-vendor"
|
||||
cargo vendor --versioned-dirs \
|
||||
--manifest-path "$APP_SRC_DIR/src-tauri/Cargo.toml" \
|
||||
"$SCRIPT_DIR/cargo-vendor" 2>&1 | tail -3
|
||||
|
||||
echo ""
|
||||
echo "=== Preparing system tray libraries ==="
|
||||
mkdir -p "$SCRIPT_DIR/libs"
|
||||
# Copy from host system
|
||||
for lib in \
|
||||
libayatana-appindicator3.so.1.0.0 \
|
||||
libayatana-ido3-0.4.so.0.0.0 \
|
||||
libayatana-indicator3.so.7.0.0 \
|
||||
libdbusmenu-glib.so.4.0.12 \
|
||||
libdbusmenu-gtk3.so.4.0.12; do
|
||||
found=$(find /usr/lib64 /usr/lib /lib64 /lib -name "$lib" -type f 2>/dev/null | head -1)
|
||||
if [ -n "$found" ]; then
|
||||
cp -f "$found" "$SCRIPT_DIR/libs/"
|
||||
echo " ✓ $lib"
|
||||
else
|
||||
echo " ✗ $lib not found" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Building Flatpak ==="
|
||||
cd "$SCRIPT_DIR"
|
||||
rm -rf .flatpak-builder build-dir
|
||||
flatpak-builder --user --install --force-clean build-dir org.droposs.client.yaml 2>&1 | tail -20
|
||||
|
||||
echo ""
|
||||
echo "=== Done ==="
|
||||
echo "Run with: flatpak run org.droposs.client"
|
||||
echo "Or create a bundle: ./create-bundle.sh"
|
||||
@@ -2,4 +2,4 @@
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
directory = "vendor"
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Create a release bundle for Flathub submission
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
flatpak-builder --repo=repo --force-clean build-dir org.droposs.client.yaml
|
||||
flatpak build-bundle repo org.droposs.client.flatpak org.droposs.client
|
||||
|
||||
echo "Bundle created: org.droposs.client.flatpak"
|
||||
echo "Upload to Flathub or host on your own repo."
|
||||
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Drop
|
||||
Comment=Drop Desktop Client - open-source game distribution platform
|
||||
Exec=/app/bin/drop-app
|
||||
Icon=org.droposs.client
|
||||
Terminal=false
|
||||
Categories=Game;Network;
|
||||
MimeType=x-scheme-handler/drop;
|
||||
StartupWMClass=drop-app
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>org.droposs.client</id>
|
||||
<metadata_license>MIT</metadata_license>
|
||||
<project_license>MIT</project_license>
|
||||
<name>Drop</name>
|
||||
<summary>Desktop client for the Drop game distribution platform</summary>
|
||||
<description>
|
||||
<p>Drop is an open-source, self-hosted game distribution platform. This desktop client connects to a Drop server to browse, download, and launch your game library.</p>
|
||||
</description>
|
||||
<categories>
|
||||
<category>Game</category>
|
||||
<category>Network</category>
|
||||
</categories>
|
||||
<url type="homepage">https://github.com/Drop-OSS/drop-app</url>
|
||||
<developer_name>Drop OSS</developer_name>
|
||||
<launchable type="desktop-id">org.droposs.client.desktop</launchable>
|
||||
<releases>
|
||||
<release version="0.1.0" date="2026-06-02"/>
|
||||
</releases>
|
||||
</component>
|
||||
@@ -0,0 +1,5 @@
|
||||
<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M10.7 36C10.7 29.3354 14.368 23.365 19.353 18.6667C22.506 15.8473 26.805 11.3549 29.459 9.58907C31.01 8.55715 32.99 8.55715 34.541 9.58907C37.195 11.3549 41.494 15.8473 44.647 18.6667C49.632 23.365 53.3 29.3354 53.3 36C53.3 47.7821 43.782 57.3 32 57.3C20.218 57.3 10.7 47.7821 10.7 36Z"
|
||||
fill="#60a5fa" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 417 B |
@@ -0,0 +1,121 @@
|
||||
id: org.droposs.client
|
||||
runtime: org.gnome.Platform
|
||||
runtime-version: '48'
|
||||
sdk: org.gnome.Sdk
|
||||
command: drop-app
|
||||
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.rust-nightly
|
||||
|
||||
finish-args:
|
||||
- --socket=wayland
|
||||
- --socket=fallback-x11
|
||||
- --device=dri
|
||||
- --share=ipc
|
||||
- --share=network
|
||||
- --filesystem=host
|
||||
- --talk-name=org.kde.StatusNotifierWatcher
|
||||
- --filesystem=xdg-run/tray-icon:create
|
||||
- --env=WEBKIT_DISABLE_COMPOSITING_MODE=1
|
||||
- --env=WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||
|
||||
build-options:
|
||||
env:
|
||||
CARGO_HOME: /run/build/drop-app/cargo
|
||||
|
||||
modules:
|
||||
# Node.js runtime — needed by build.mjs (which uses child_process.spawn)
|
||||
- name: nodejs
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- mkdir -p /app/share/nodejs
|
||||
- mv * /app/share/nodejs/
|
||||
- mkdir -p /app/bin
|
||||
- ln -sf /app/share/nodejs/bin/node /app/bin/node
|
||||
- ln -sf /app/share/nodejs/bin/npm /app/bin/npm
|
||||
- ln -sf /app/share/nodejs/bin/npx /app/bin/npx
|
||||
- npm install -g pnpm
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://nodejs.org/dist/v22.16.0/node-v22.16.0-linux-x64.tar.xz
|
||||
sha256: f4cb75bb036f0d0eddf6b79d9596df1aaab9ddccd6a20bf489be5abe9467e84e
|
||||
|
||||
# System tray indicator libraries — not in GNOME Platform runtime
|
||||
- name: tray-libs
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- install -Dm755 libayatana-appindicator3.so.1.0.0 /app/lib/libayatana-appindicator3.so.1.0.0
|
||||
- ln -sf libayatana-appindicator3.so.1.0.0 /app/lib/libayatana-appindicator3.so.1
|
||||
- install -Dm755 libayatana-ido3-0.4.so.0.0.0 /app/lib/libayatana-ido3-0.4.so.0.0.0
|
||||
- ln -sf libayatana-ido3-0.4.so.0.0.0 /app/lib/libayatana-ido3-0.4.so.0
|
||||
- install -Dm755 libayatana-indicator3.so.7.0.0 /app/lib/libayatana-indicator3.so.7.0.0
|
||||
- ln -sf libayatana-indicator3.so.7.0.0 /app/lib/libayatana-indicator3.so.7
|
||||
- install -Dm755 libdbusmenu-glib.so.4.0.12 /app/lib/libdbusmenu-glib.so.4.0.12
|
||||
- ln -sf libdbusmenu-glib.so.4.0.12 /app/lib/libdbusmenu-glib.so.4
|
||||
- install -Dm755 libdbusmenu-gtk3.so.4.0.12 /app/lib/libdbusmenu-gtk3.so.4.0.12
|
||||
- ln -sf libdbusmenu-gtk3.so.4.0.12 /app/lib/libdbusmenu-gtk3.so.4
|
||||
sources:
|
||||
- type: dir
|
||||
path: libs
|
||||
|
||||
# Main app — built from source with vendored dependencies
|
||||
- name: drop-app
|
||||
buildsystem: simple
|
||||
build-options:
|
||||
append-path: /app/share/nodejs/bin:/usr/lib/sdk/rust-nightly/bin
|
||||
env:
|
||||
CARGO_NET_OFFLINE: "true"
|
||||
build-commands:
|
||||
# Install frontend deps and build
|
||||
- pnpm install --frozen-lockfile
|
||||
- pnpm build
|
||||
|
||||
# Set up vendored cargo deps
|
||||
- mkdir -p src-tauri/.cargo
|
||||
- cp cargo-config.toml src-tauri/.cargo/config.toml
|
||||
|
||||
# Build Tauri binary (no bundle — we handle installation ourselves)
|
||||
- npx tauri build --no-bundle
|
||||
|
||||
# Install binary
|
||||
- mkdir -p ${FLATPAK_DEST}/bin
|
||||
- cp src-tauri/target/release/drop-app ${FLATPAK_DEST}/bin/drop-app
|
||||
|
||||
# Install desktop entry
|
||||
- mkdir -p ${FLATPAK_DEST}/share/applications
|
||||
- cp org.droposs.client.desktop ${FLATPAK_DEST}/share/applications/
|
||||
|
||||
# Install icons at standard hicolor sizes
|
||||
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps
|
||||
- cp org.droposs.client.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/
|
||||
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/32x32/apps
|
||||
- cp src-tauri/icons/32x32.png ${FLATPAK_DEST}/share/icons/hicolor/32x32/apps/org.droposs.client.png
|
||||
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps
|
||||
- cp src-tauri/icons/128x128.png ${FLATPAK_DEST}/share/icons/hicolor/128x128/apps/org.droposs.client.png
|
||||
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps
|
||||
- cp src-tauri/icons/128x128@2x.png ${FLATPAK_DEST}/share/icons/hicolor/256x256/apps/org.droposs.client.png
|
||||
- mkdir -p ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps
|
||||
- cp src-tauri/icons/icon.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/org.droposs.client.png
|
||||
|
||||
# Install AppStream metainfo
|
||||
- mkdir -p ${FLATPAK_DEST}/share/metainfo
|
||||
- cp org.droposs.client.metainfo.xml ${FLATPAK_DEST}/share/metainfo/
|
||||
sources:
|
||||
# App source code
|
||||
- type: git
|
||||
url: https://github.com/Drop-OSS/drop-app.git
|
||||
commit: c886b5e
|
||||
# Vendored cargo crates
|
||||
- type: dir
|
||||
path: cargo-vendor
|
||||
dest: src-tauri/vendor
|
||||
# Cargo config for vendored deps
|
||||
- type: file
|
||||
path: cargo-config.toml
|
||||
# Flatpak metadata (local files)
|
||||
- type: file
|
||||
path: org.droposs.client.desktop
|
||||
- type: file
|
||||
path: org.droposs.client.svg
|
||||
- type: file
|
||||
path: org.droposs.client.metainfo.xml
|
||||
Reference in New Issue
Block a user