Files
Meshtastic-Android/scripts/verify-flatpak/desktop-offline.yaml
T
2026-05-30 11:29:53 -05:00

103 lines
4.8 KiB
YAML

# Local offline verification of org.meshtastic.desktop.
# Differences from vid's upstream manifest (vidplace7/org.meshtastic.desktop):
# 1. Meshtastic-Android source: `type: dir` pointing at our local checkout instead of `type: git`.
# 2. flatpak-sources.json is INCLUDED (uncommented) so Gradle resolves from the offline-repository.
# 3. Build uses `--offline` for Gradle — true Flathub-style offline compilation.
# (finish-args still grants runtime network since the app needs it; only the build is offline.)
# Generated by scripts/verify-flatpak/verify.sh; do not edit upstream from here.
id: org.meshtastic.desktop
runtime: org.freedesktop.Platform
runtime-version: '25.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk17
- org.freedesktop.Sdk.Extension.openjdk21
command: meshtastic-wrapper.sh
finish-args:
- --share=ipc
- --socket=x11
- --device=dri
- --device=all
- --share=network
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=org.freedesktop.Notifications
- --allow=bluetooth
- --system-talk-name=org.bluez.*
- --env=PATH=/app/jre/bin:/app/bin:/usr/bin
- --env=JAVA_HOME=/app/jre
modules:
- name: jbr
buildsystem: simple
build-commands:
- mkdir -p /app/jre
- tar xzf jbr-*.tar.gz -C /app/jre --strip-components=1
sources:
- type: file
url: https://cache-redirector.jetbrains.com/intellij-jbr/jbr-21.0.10-linux-x64-b1163.105.tar.gz
sha256: b6a3b13451d296140727bbde9325dd9ee422e2e9b2c6a9378f346f1b8d1111bc
only-arches:
- x86_64
- type: file
url: https://cache-redirector.jetbrains.com/intellij-jbr/jbr-21.0.10-linux-aarch64-b1163.105.tar.gz
sha256: 38804f526d869f5a9c49e9b90c04edcbc918b41e8e43264e5d5076d352a959bc
only-arches:
- aarch64
- shared-modules/libappindicator/libappindicator-gtk3-12.10.json
- name: meshtastic-wrapper
buildsystem: simple
build-commands:
- install -Dm755 meshtastic-wrapper.sh /app/bin/meshtastic-wrapper.sh
sources:
- type: file
path: meshtastic-wrapper.sh
- name: meshtastic-desktop
buildsystem: simple
build-options:
append-path: "/usr/lib/sdk/openjdk21/bin"
env:
JAVA_HOME: /usr/lib/sdk/openjdk21/jvm/openjdk-21
# Point Gradle at the offline mirror produced by flatpak-sources.json
GRADLE_USER_HOME: /run/build/meshtastic-desktop/.gradle
build-commands:
# Install desktop metadata from the in-repo packaging sources (mirrors vid's upstream manifest,
# which stopped shipping standalone root-level copies as of 2026-05-30).
- install -Dm644 desktopApp/packaging/icons/icon.svg /app/share/icons/hicolor/scalable/apps/org.meshtastic.desktop.svg
- install -Dm644 -t /app/share/applications desktopApp/packaging/linux/org.meshtastic.desktop.desktop
- desktop-file-edit --set-key="Exec" --set-value="meshtastic-wrapper.sh %U"
/app/share/applications/org.meshtastic.desktop.desktop
- install -Dm644 -t /app/share/metainfo desktopApp/packaging/linux/org.meshtastic.desktop.metainfo.xml
# Redirect the Gradle wrapper to the bundled distribution (no network).
- sed -i 's|distributionUrl=.*|distributionUrl=gradle-all.zip|' gradle/wrapper/gradle-wrapper.properties
- echo "org.gradle.java.installations.auto-detect=false" >> gradle.properties
- echo "org.gradle.java.installations.auto-download=false" >> gradle.properties
- echo "org.gradle.java.installations.paths=/usr/lib/sdk/openjdk21/jvm/openjdk-21,/usr/lib/sdk/openjdk17/jvm/openjdk-17" >> gradle.properties
- >
sed -i
's/^\(\s*\)vendor\.set(JvmVendorSpec\.JETBRAINS)/\1\/\/ vendor.set(JvmVendorSpec.JETBRAINS)/'
desktopApp/build.gradle.kts
# Force Gradle to resolve from the bundled offline-repository ONLY (true offline test).
- ./gradlew --offline :desktopApp:packageUberJarForCurrentOS
- >
JAR_FILE=$(find desktopApp/build/compose/jars/ -name "*.jar" -type f | head -1)
&& install -Dm755 "$JAR_FILE" /app/lib/meshtastic-desktop.jar
sources:
# Desktop metadata (.desktop/.metainfo.xml/.svg) now lives inside the meshtastic-android
# source tree (desktopApp/packaging/...) and is installed by build-commands above —
# no longer sourced as standalone root-level files.
- type: dir
path: meshtastic-android
- type: file
# Must match the version in gradle/wrapper/gradle-wrapper.properties.
# Bumping the wrapper? Update both the URL and sha256 here.
url: https://services.gradle.org/distributions/gradle-9.5.1-all.zip
sha256: c72fb9991f6025cbe337d52ba77e531b3faf62bdd3e348fe1ccee9f51c71adb0
dest: "gradle/wrapper"
dest-filename: "gradle-all.zip"
- flatpak-sources.json