Skip to content

Latest commit

 

History

History
329 lines (263 loc) · 17.8 KB

ImplementationPlan.md

File metadata and controls

329 lines (263 loc) · 17.8 KB

SimpleLauncher — Implementation Plan

Baseline: v5.9.3 (2026-12-05). Avalonia is the shipping app; the WPF project is frozen reference code (SimpleLauncher.Wpf.Reference.sln) and is not built by CI. Legend: [x] done · [ ] open. Completed work from the old 1.x–5.x plan was removed. Sources of truth: docs/manual-tests.md (verification backlog), docs/21-release-artifacts.md (DEB/RPM plan), docs/17-release-notes.md, docs/19-linux-packages.md, AGENTS.md.


0. Shipped baseline (no action — reference only)

  • R2 cover catalog (v1) + Edit System → Download Missing Covers.
  • First-run wizard with Easy Mode embedded (Back/Next/Skip/progress/cancel/error states).
  • Inno Setup installer with .NET 11 bootstrap, per-user install, data-preserving uninstall.
  • Winget manifest generator (scripts/update-winget-manifests.ps1).
  • Bundled tools trimmed to CHDMounter, RetroAchievementsSharp, SimpleXisoDrive, SimpleZipDrive and 7-Zip; platform/pruning handled in packaging.
  • Avalonia-only Windows bundle (SimpleLauncher.exe); legacy installs update in place.
  • Serilog-only logging, complete bug-report environment block, accessibility tooltips, async naming guard, generated XML docs, internal-by-default assemblies.
  • SHA-256 checksums (SHA256SUMS.txt) + hash-verification notes in README/FAQ.
  • Windows ZIP/setup, Linux ZIP/tar.gz/AppImage/Flatpak, macOS Apple Silicon DMG.
  • Linux-native storefront scanners (Steam, Heroic, Lutris, .desktop) and SDL2 gamepad.
  • Linux/macOS updater behavior: portable ZIP self-update, AppImage self-replace, Flatpak/macOS updates handled externally.
  • ARM64 bundles validated on real winarm-test / linuxarm-test hosts.

1. Next release gate

Code already in master after release5.9.3 — verify it in the packaged build:

  • Message boxes raised from store-scan worker threads are marshaled to the UI thread (MessageBoxLibraryService.ShowAsync; bugs #70837 / #70892).
  • Extraction timestamp restoration is best-effort; a vanished destination cannot abort the whole extraction (bug #70890).
  • Game grid virtualized (Avalonia.Labs.Panels) + async, cancellation-aware cover decoding with a byte-budgeted cache.
  • Microsoft Store scan aligned with Playnite XboxLibrary: all Store packages (not only Get-StartApps), manifest app id/logo/display name, ms-resource resolution, local art before the network image API.
  • Deep-review hardening (2026-12-05): an unreadable settings.dat is never quarantined or overwritten with defaults, solid-7z failure cleanup preserves pre-existing files, the file watcher coalesces per system and rescans after a buffer overflow, stale decoded covers are invalidated, truncated downloads and UNC %TEMP% are handled, Lutris IDs are scoped per database, and search/delete/UI-reset refreshes no longer blank or rescan the view.
  • NuGet update compile repairs (SharpCompress 1.0 API renames, MessagePack 4 partial / source-generator requirements).

Release steps:

  • Bump the canonical version in SimpleLauncher.Avalonia/SimpleLauncher.Avalonia.csproj (and the synchronized files enforced by VersionConsistencyTests).
  • Update SimpleLauncher/WhatsNew.md / docs/17-release-notes.md with the five post-5.9.3 fixes above and the closed bug IDs.
  • Run the fast suites: SimpleLauncher.Avalonia.Tests (green at last run: 912 tests). Run slow suites only before deploying or when the admin asks.
  • Run package-dry-run.yml (or the equivalent local packaging) with all formats and the latest installers; confirm 0 warnings in Debug and Release solution builds.
  • Generate/submit SHA-256 checksums and mirror every asset to R2 (scripts/publish-fallback-r2.ps1 -Version <version>).
  • Smoke-test the packaged Windows x64 build (real launch + one game) and the Linux x64 AppImage/portable build.

2. Distribution

2.1 Winget (P1-20, P1-21)

release5.9.3 now includes the setup executables, so the “no installer assets” blocker is gone.

  • Generate the manifest for the next release: pwsh scripts/update-winget-manifests.ps1 -Version <version> -VerifyUrls.
  • Submit the generated manifests\p\PureLogicCode\SimpleLauncher\<version> tree to microsoft/winget-pkgs.
  • Verify on a clean Windows VM: winget install, upgrade, uninstall; x64 first, ARM64 if a host is available.
  • Add winget install --id PureLogicCode.SimpleLauncher -e to README.md, the download section of docs/index.html and the release notes.
  • Optional (P1-22): Scoop and Chocolatey manifests.

2.2 Debian and RPM packages (next cycle)

Decision and acceptance details are in docs/21-release-artifacts.md; do not add these formats to the release workflow/R2 until the checklist below is complete.

  • Confirm the pending decisions: self-contained payload, /opt/simplelauncher layout, ~/.local/share/SimpleLauncher data, runtime/dependency list, {version}-1 RPM release, final file names.
  • Build simplelauncher_{version}_amd64.deb and _arm64.deb.
  • Build simplelauncher-{version}-1.x86_64.rpm and .aarch64.rpm.
  • Clean install on Debian 12, Ubuntu 24.04/Linux Mint 22, Fedora current, RHEL 9 and openSUSE Leap (one representative per family).
  • Upgrade over the previous package version works; uninstall removes program files but keeps ~/.local/share/SimpleLauncher.
  • Desktop entry, icon and simplelauncher command are installed.
  • Extend PackagingEnvironment so DEB/RPM installs set HasReadOnlyInstall and UpdatesManagedExternally, with package-manager update guidance instead of the in-app updater.
  • Include the new assets in release.yml, package-dry-run.yml, SHA256SUMS.txt and scripts/publish-fallback-r2.ps1.
  • Update the landing-page OS detection and docs/19-linux-packages.md (no longer “planned”).
  • Launch the ARM64 packages on real ARM64 hardware before publishing.

2.3 Code signing and trust

Already done: [x] SHA256SUMS.txt for every release + README/FAQ hash verification notes.

  • P1-14 Apply to SignPath Foundation (public GPLv3 repo, build instructions, release history, CI workflow); record the application date and expected lead time.
  • P1-18d Fallback: buy Certum Open Source Code Signing — Cloud (€49/year, non-commercial, public OSS only) if SignPath is rejected or too slow.
  • P1-18f Add Authenticode verification steps to the docs (Get-AuthenticodeSignature, signtool verify /pa /v).
  • P1-18b Linux: GPG/minisign-sign the checksums/AppImage, publish the public key and verification steps.
  • P1-18c macOS: Apple Developer Program (US$99/year), Developer ID signing and notarization; the current DMG is ad-hoc signed only (Gatekeeper warning) and must stay clearly documented until this is done.

3. Verification backlog

The full checklist is docs/manual-tests.md; these are the remaining high-value gaps.

  • Windows end-to-end: launch real games through the tested emulator matrix, verify the pre-launch config injection dialogs and the RetroAchievements hash flow (docs/manual-tests.md §5–§8).
  • Linux end-to-end: real emulator launches, in-UI CHD conversion/mount, ZIP/7z/RAR mounting and cleanup on the GUI-test VM (docs/manual-tests.md §CHD/XISO/launch).
  • Disc pipeline: CHD→CUE/BIN, PBP→CUE/BIN, CHD mount, and Xemu/Cxbx CSO/ZAR/XISO mounts including the Dokan/FUSE fallback and post-exit cleanup.
  • Updater / reinstall: with and without a local Updater.exe, with and without network, and with access denied; app closes cleanly, no zombie processes.
  • AppImage in-place self-update against a live newer release; Flatpak software-center update path needs a published Flatpak repository.
  • Download manager integration: insufficient disk space, mid-body network drop retry, cancel removes the partial file, emergency overlay release (BUG-07/BUG-08 status).
  • RetroAchievements emulator configurator matrix (RetroArch, PCSX2, DuckStation, PPSSPP, Dolphin, Flycast, BizHawk) including read-only-config and sample-restore paths.
  • Menu/UI pass: menu actions, missing-cover download progress, 1000+ card grid rendering, loading/no-file states, system-image resolution, file pickers, About/Support/ImageViewer.
  • Mark every verified item in docs/manual-tests.md as [x]; close the matching BUG IDs.
  • Re-check GamepadNavigationServiceTests.ProcessInput_LeftStickUpAndDown_MovesFocusAcrossControls under the full parallel Linux suite; if it still flakes, add a deterministic focus wait (it passed in isolation in the last recorded run).

4. Docs, website and outreach

  • Winget install command in README, landing page and release notes (see §2.1).
  • Landing page/download docs: add DEB/RPM only once §2.2 is complete; keep AppImage as the “any Linux, no install” recommendation.
  • Analytics: choose a GoatCounter site code or Plausible domain and set the provider in docs/analytics-config.js; until then it stays provider: 'none'.
  • P2-21 YouTube outreach (Retro Game Corps, Phawx, Mr. Sujano, ETA Prime, Fan The Deck).
  • P2-22 Reddit outreach (r/emulation, r/EmulationOnPC, r/SteamDeck, r/retrogaming), following each community’s self-promotion rules.

Appendix A — Signing options (verify prices before buying)

Option Approx. cost Publisher shown Notes
SignPath Foundation $0 SignPath Foundation OSS only, manual approval per release, weeks–months lead time
Certum Open Source — Cloud €49/year Open Source Developer <name> Individual, strictly non-commercial, cloud HSM
Certum Standard — Cloud from €209/year Legal name Commercial use allowed, cloud HSM
Apple Developer Program US$99/year Your name/team Developer ID + notarization for macOS
GPG / minisign $0 Your key Linux detached signatures; stores handle repository trust

Brazil notes: no CNPJ is required for SignPath Foundation, Certum Open Source, or an individual OV certificate; prefer cloud HSM/remote signing over a shipped USB token; Azure Artifact Signing is not available to Brazilian individuals/companies.


Appendix B — Frozen / non-goals

  • WPF reference: frozen; do not mirror Avalonia/Core changes into SimpleLauncher, SimpleLauncher.Tests or SimpleLauncher.SlowTests, and do not build them as part of routine verification.
  • Package-managed installs: DEB/RPM (and Flatpak/macOS bundles) are updated by their package manager/installer, never by the in-app updater.
  • No tests in CI: CI builds and packages only; verification runs locally (fast suites during iteration, slow suites before deploy).

Appendix C - Product roadmap: becoming the best emulator frontend

Strategic recommendations recorded 2026-12-05, ordered by expected impact rather than by release commitment. All new work belongs in SimpleLauncher.Core / SimpleLauncher.Avalonia; the WPF reference stays frozen. Update docs/comparison.md as each competitive gap closes.

C.1 A real 10-foot / TV mode (highest impact)

This is the biggest gap versus ES-DE and LaunchBox Big Box. Gamepad navigation inside a desktop window is not the same product as a couch interface.

  • Full-screen, platform-first layout: system carousel -> game grid -> details pane with art, video and metadata.
  • Gamepad-first focus model: confirm/back, shoulder buttons for system paging, quick search with an on-screen keyboard, "resume last game".
  • Launch directly into it (--tv flag or setting) with a simple exit confirmation.
  • Optional attract mode / screensaver and startup video.
  • Steam Deck defaults: 1280x800 safe area, Game Mode startup, suspend/resume handling.
  • Reuse MainViewModel and existing services; add a separate TV view shell rather than forking the app.
  • Use scripts/gui-test-harness/ to automate gamepad navigation and accessibility checks.

C.2 Metadata and media pipeline

The comparison page correctly lists "cover art + RetroAchievements data; no video/manual scraper" as a weakness. Build a provider-agnostic scraper layer:

  • Providers: ScreenScraper, TheGamesDB, IGDB (already linked), SteamGridDB, MobyGames and EmuMovies where licensed.
  • Hash-first matching: CRC32/SHA1 against No-Intro/Redump/MAME/FBNeo DATs, with normalized filename parsing and fuzzy matching as fallbacks.
  • Media types: 2D/3D box art, screenshots, title screens, marquees/wheels, fanart, videos, manuals and music.
  • Region/language priority, per-game overrides, batch scrape with progress/cancel, and a "missing media" report.
  • Store metadata in the local SQLite database. Never rename or mutate ROMs unless the user explicitly asks, and always with a backup.
  • In-app video playback in the details pane (hardware-decoded, muted by default), with a poster/thumbnail fallback.
  • Respect provider API terms and rate limits; support user-supplied API keys and offline cache.

C.3 Library intelligence

  • Smart collections/playlists: genre, players, region, rating, year, completion status, installed/emulated, store source, "never played", "recently added".
  • Saved filters and a global command palette (keyboard and gamepad).
  • DAT audit: unknown/misnamed/missing ROMs, optional rename/organize with a dry-run preview.
  • Duplicate detection, multi-disc/M3U tooling, and a save-state/save-file backup manager.
  • Import from LaunchBox, ES-DE, Playnite and RetroArch playlists to lower the switching cost.
  • "Continue playing", random game, and per-system "recently played" shelves.

C.4 Store library depth (the Playnite moat)

Current scanning covers installed games only. Stage the expansion:

  1. Read-only account libraries: Steam Web API owned games/playtime/achievements; Epic/GOG/ Amazon metadata; show "not installed" entries in a unified library.
  2. Metadata/playtime import from stores, merged with emulated play history.
  3. Install/update/uninstall orchestration only after the read-only experience is solid; this is a large, fragile surface and should not be the first step.
  4. Keep scanner parity tests and per-store feature flags so a broken store API never blocks startup.

C.5 Emulator management 2.0

Easy Mode is a genuine differentiator; extend it:

  • Declarative system/emulator definition packs (JSON) updatable independently of the app.
  • Auto-detect installed emulators and cores; health checks for missing/wrong-architecture emulators and missing cores.
  • Per-game emulator/core overrides, fallback emulators, and per-game config injection.
  • RetroArch core/version management with pinned versions and rollback.
  • Expand "install full system stack" to verified checksums and a one-click repair path.

C.6 Extensibility, staged

Do not start with a full plugin runtime. Start declarative, then open it up:

  1. JSON packs for systems, emulators, launch strategies and scraper providers.
  2. Theme packs: package the existing theme resources, add "download theme from URL/GitHub", live preview and rollback.
  3. Only then a versioned plugin API (assembly load context, sandboxed, strict compatibility) for community scrapers/themes.

C.7 Opt-in cloud sync

  • Sync settings, systems, favorites, playlists, play history and metadata first; not save files.
  • Use a user-chosen folder (OneDrive/Dropbox/WebDAV/S3) or a self-hosted endpoint, with end-to-end encryption for credentials.
  • Save-file sync later, with explicit conflict resolution and per-game version history. Saves are the highest-risk data and should not be treated like settings.

C.8 Distribution and trust

  • Submit the prepared winget manifest; it is free distribution and a credibility signal.
  • Add beta/stable update channels and rollback.
  • Steam Deck: verify Flatpak in Game Mode, controller-only navigation, suspend/resume and the 1280x800 layout.
  • macOS signing/notarization would remove the Gatekeeper friction, but per AGENTS.md this requires the admin's explicit approval — it is a decision, not a default task.
  • Add a "doctor" diagnostics command: database integrity, emulator paths, permissions, helper binaries and log-bundle export.

C.9 Quality bar to protect the lead

  • Performance budgets: cold start, first game visible, scan of 10k/100k files, memory ceiling, cover decode latency.
  • Crash-safe writes and automatic backups for settings, library and metadata.
  • Accessibility as a release gate: full keyboard/gamepad focus, screen-reader names, high contrast, text scaling and RTL.
  • Cross-platform CI for the app itself, not only packaging; the fast suite is already strong.
  • Keep the WPF reference frozen and put all new work in Core/Avalonia.

C.10 Suggested 90-day sequence

  • Weeks 1-4: scraper abstraction + first provider (ScreenScraper or TheGamesDB) + video/ manual support + per-game overrides.
  • Weeks 5-8: smart collections/playlists + DAT audit + import from other frontends.
  • Weeks 8-12: TV mode MVP (--tv, system carousel, game grid, details, gamepad focus, attract mode).
  • In parallel: winget submission, theme-pack downloader, emulator definition packs.
  • Then evaluate account-based store libraries and cloud sync once the metadata/library foundation is stable.

C.11 What not to build

  • Netplay: RetroArch and the emulators already do it better; integrate/launch rather than reimplement.
  • A full plugin runtime before a theme/metadata pack format: it multiplies support and security work.
  • Automatic ROM renaming/organizing by default: opt-in, dry-run and backup only.
  • Save-file cloud sync before settings/library sync: conflict handling is much harder and the damage is worse.