From 3705935ca42f514111ee3c8b73fc4d3905ab2a9f Mon Sep 17 00:00:00 2001 From: ml Date: Sat, 27 Jun 2026 12:13:48 +0200 Subject: [PATCH] Adding F-Droid publishing --- docs/publish.md | 110 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/docs/publish.md b/docs/publish.md index a7f331b..1101a55 100644 --- a/docs/publish.md +++ b/docs/publish.md @@ -126,7 +126,104 @@ versionCode = 2 // must strictly increase on every Play Store upload versionName = "1.1" // user-visible, free-form ``` -## 3. Pebble watch app → Rebble app store / direct distribution +## 3. Android companion app → F-Droid + +F-Droid is a community-run FOSS app catalogue that builds apps from source on +its own infrastructure and signs them with its own key. The companion app is a +good fit: it is open source, ships no proprietary binaries in the repo, and the +copyrighted ROM and disk files are handled entirely at runtime by the user. + +### 3.1 Inclusion policy check + +F-Droid's key requirement is that everything needed to build the app is in the +repo and is free/open-source. Verify: + +- VICE 3.8 source is GPLv2 (tarball in `res/`). ✓ +- nibtools source is GPLv2 (tarball in `res/`). ✓ +- No prebuilt binaries committed (`.a`/`.so` files are build outputs in + `.gitignore`). ✓ +- No non-free SDKs or closed-source dependencies in `build.gradle.kts`. ✓ +- C64 ROMs and game disks are not bundled — user-supplied at runtime. ✓ + +### 3.2 Prepare the fdroiddata metadata file + +F-Droid apps are registered by adding a YAML file to the +[fdroiddata](https://gitlab.com/fdroid/fdroiddata) repository. Fork it, then +create `metadata/de.ladkau.schwertundmagieonpebblecompanionapp.yml`: + +```yaml +Categories: + - Games +License: GPL-2.0-or-later +AuthorName: Matthias Ladkau +SourceCode: https://github.com/ +IssueTracker: https://github.com//issues + +AutoName: Schwert und Magie on Pebble + +RepoType: git +Repo: https://github.com/ + +Builds: + - versionName: '1.0' + versionCode: 1 + commit: + subdir: SchwertUndMagieOnPebbleCompanionApp + gradle: + - release + ndk: 30.0.14904198 + prebuild: + - bash app/src/main/jni/build_vice.sh + - bash app/src/main/jni/build_nibtools.sh + +AutoUpdateMode: None +UpdateCheckMode: None +``` + +Key points: + +- `subdir` points to the Gradle project root (where `gradlew` lives). +- `gradle: [release]` tells F-Droid to run `./gradlew assembleRelease`. +- `ndk` must match the `ndkVersion` in `app/build.gradle.kts` + (`30.0.14904198`). F-Droid's build server installs the requested NDK version + automatically. +- `prebuild` runs the VICE and nibtools cross-compilation before Gradle + invokes CMake. The `NDK` environment variable is set by F-Droid's build + server, matching what `build_vice.sh` and `build_nibtools.sh` expect. +- F-Droid signs with its own key, so `keystore.properties` is not needed on + the build server. The signing config in `build.gradle.kts` degrades + gracefully when the file is absent. + +### 3.3 Test the build locally with fdroid-server + +Before submitting, reproduce the F-Droid build environment locally: + +```bash +# Install fdroid-server (Debian/Ubuntu) +sudo apt install fdroidserver + +# In the fdroiddata checkout: +fdroid build de.ladkau.schwertundmagieonpebblecompanionapp --latest +``` + +This runs the build inside a Docker container that mirrors the F-Droid build +server. A successful local build means the merge request is very likely to +pass. + +### 3.4 Submit the merge request + +Push your `metadata/` addition to your fdroiddata fork and open a merge +request against `gitlab.com/fdroid/fdroiddata`. The F-Droid team reviews the +metadata and, if the build passes on their infrastructure, merges it and +includes the app in the next index update (published roughly weekly). + +### 3.5 Versioning for F-Droid updates + +Each new release requires a new `Builds` entry in the metadata file with an +incremented `versionCode` and the corresponding git commit or tag. `versionCode` +must match the value in `app/build.gradle.kts`. + +## 5. Pebble watch app → Rebble app store / direct distribution The official Pebble app store shut down years ago; the community-run **Rebble** store is the closest equivalent today, alongside the 2025 Core @@ -134,7 +231,7 @@ Devices relaunch of Pebble hardware. Check Rebble's current developer portal directly for their exact submission flow and requirements — that's outside this repo and changes independently of it. -### 3.1 Build the artifact +### 5.1 Build the artifact ```bash cd SchwertUndMagieOnPebbleWatchApp @@ -146,7 +243,7 @@ The `.pbw` is the complete distributable — it bundles all target platforms `package.json`. There is no signing step analogous to Android; Pebble apps are not cryptographically signed by the developer. -### 3.2 Direct distribution (no store) +### 5.2 Direct distribution (no store) Anyone with the `.pbw` file and Core for Pebble installed can sideload it — this is the lowest-friction path and doesn't depend on any third party's @@ -154,7 +251,7 @@ store being operational. This watch app is tightly coupled to the companion app's HTTP bridge (see `docs/architecture.md` §1), so it's not really meaningful as a standalone listing anyway — distribute both together. -### 3.3 Store submission (if Rebble's process applies) +### 5.3 Store submission (if Rebble's process applies) Expect to need: an app icon resource (not yet configured in `package.json` — there's no `icon`/menu-icon entry currently, only the in-app `IMAGE_SPLASH` @@ -168,12 +265,12 @@ pebble screenshot --vnc --no-open docs/screenshots/emery.png (repeat per target platform you want a store screenshot for). -### 3.4 Versioning +### 5.4 Versioning Bump `version` in `SchwertUndMagieOnPebbleWatchApp/package.json` before each release build. -## 4. Pre-publish checklist +## 6. Pre-publish checklist - [ ] Release keystore generated, passwords saved in a password manager, both gitignored (§1, §2.1) @@ -182,6 +279,7 @@ release build. from the resulting AAB (test via `bundletool` or Play internal testing) - [ ] Play Console store listing content complete (icon, screenshots, privacy policy, content rating, data safety form) +- [ ] F-Droid metadata YAML created and `fdroid build` passes locally (§3) - [ ] `pebble build` succeeds for all target platforms; `.pbw` sideloads and runs correctly against the signed companion app build - [ ] `versionCode`/`versionName` (Android) and `version` (Pebble) bumped