{"id":51145693,"url":"https://github.com/sproctor/potassium-updater","last_synced_at":"2026-06-26T02:30:58.894Z","repository":{"id":367314636,"uuid":"1279603589","full_name":"sproctor/potassium-updater","owner":"sproctor","description":"Draft: runtime install-type detection for Nucleus auto-update (enables single-invocation electron-builder packaging)","archived":false,"fork":false,"pushed_at":"2026-06-25T13:26:38.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T14:06:46.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sproctor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-24T21:02:16.000Z","updated_at":"2026-06-25T13:27:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sproctor/potassium-updater","commit_stats":null,"previous_names":["sproctor/potassium-updater"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sproctor/potassium-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fpotassium-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fpotassium-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fpotassium-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fpotassium-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sproctor","download_url":"https://codeload.github.com/sproctor/potassium-updater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sproctor%2Fpotassium-updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34801014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-26T02:30:53.702Z","updated_at":"2026-06-26T02:30:58.885Z","avatar_url":"https://github.com/sproctor.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# potassium-updater\n\nA standalone auto-update library for Compose/JVM desktop applications — the **updating** half\nof a focused fork of [Nucleus](https://github.com/kdroidFilter/Nucleus), under the\n`com.seanproctor` namespace. It is the counterpart to\n[`nucleus-plugin`](https://github.com/sproctor/nucleus-plugin) (the **packaging** half), and is\nindependent of the upstream monorepo so it can move on its own.\n\nIt is a fork/extraction of the monorepo's `updater-runtime` module: the full updater, plus the\nnew runtime install-type detection, with the handful of `core-runtime` classes it needs vendored\nin (so there is no dependency on the rest of Nucleus).\n\n## What it does\n\nSelf-updates desktop apps from an electron-builder-style release manifest (`latest-\u003cos\u003e.yml`):\n\n- **Linux** — AppImage, deb, rpm\n- **Windows** — NSIS (`.exe`), MSI\n- **macOS** — DMG / ZIP (applies the ZIP, Squirrel-style)\n\nIt checks a provider (GitHub Releases or a generic HTTP server) for a newer version, picks the\nartifact matching how *this* copy was installed, verifies its SHA-512, downloads it, and runs the\nplatform-appropriate installer.\n\n## Runtime install-type detection\n\nThe headline change vs. upstream: the install format is detected **at runtime** rather than baked\ninto the app before packaging. This is what lets the packaging plugin build every format of an OS\nin a single electron-builder invocation. Detection (`InstallTypeDetector`) mirrors\nelectron-updater's factory:\n\n- **Linux** — `APPIMAGE` / `SNAP` / `FLATPAK` env, else electron-builder's per-target\n  `resources/package-type` (deb/rpm), else fall back to the legacy `nucleus.executable.type` marker.\n- **macOS** — always the ZIP.\n- **Windows** — a per-target `package-type` (nsis/msi) if present, else the legacy marker, else NSIS.\n\nIt is fully unit-tested through an injectable `InstallEnvironment` seam.\n\n## Layout\n\n```\ncom/seanproctor/potassium/updater/\n├── PotassiumUpdater.kt        entry point (checkForUpdates / download / installAndRestart)\n├── UpdaterConfig.kt           DSL config (provider, channel, currentVersion, …)\n├── Update{Result,Info,Event,Level}.kt · DownloadProgress.kt · Version.kt\n├── exception/UpdateException.kt\n├── provider/                  UpdateProvider · GitHubProvider · GenericProvider\n├── internal/                  InstallTypeDetector · InstallEnvironment · FileSelector ·\n│                              PlatformInstaller · PlatformInfo · YamlParser · ChecksumVerifier ·\n│                              UpdateMarker\n└── runtime/                   vendored from core-runtime, trimmed + rebranded:\n    ├── Platform.kt            OS detection\n    ├── PotassiumRuntime.kt    the InstallType enum + legacy executable-type marker reader\n    └── PotassiumApp.kt        app id/version (trimmed to what the updater uses)\n```\n\n### What was vendored from `core-runtime` (and what wasn't)\n\nOnly what the updater actually imports: `Platform`, `ExecutableType` (→ `InstallType`),\n`ExecutableRuntime` (→ `PotassiumRuntime`), and `NucleusApp` (→ `PotassiumApp`, trimmed to\n`appId`/`version`). The rest of `core-runtime` — deep links, native library loading, single-instance,\ndesktop-environment/Logger tools — is unrelated to updating and was left behind.\n\n## Build\n\n```bash\n./gradlew test\n```\n\nKotlin 2.3.21 / JVM 17. 79 tests.\n\n## Status \u0026 attribution\n\nDraft / work in progress. Forked from kdroidFilter's Nucleus (`updater-runtime` + `core-runtime`);\noriginal copyright headers are retained. Package imports stay under `com.seanproctor.potassium.updater`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsproctor%2Fpotassium-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsproctor%2Fpotassium-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsproctor%2Fpotassium-updater/lists"}