7 Commits

Author SHA1 Message Date
PrimeBuild-pc 0c33eee9de refactor: small cleanups from the final review
Game Boost StopAsync and Dispose reuse SyncTimer for the timer; the always-true
UpdateDownloadResult.ChecksumVerified and an unused using are gone. No behavior change.
2026-10-22 10:54:37 +02:00
PrimeBuild-pc 6f84ead769 fix: delete update folders left in Windows\Temp by earlier updates
A successful update exits right after starting the installer, so its ~55 MB folder was never
removed. At elevated startup, folders older than a day are deleted, only when they are owned by
Administrators (a user cannot create those or change what is inside).
2026-10-22 10:54:37 +02:00
PrimeBuild-pc d1092891e4 fix: compare numeric prerelease parts as numbers so beta.10 is newer than beta.9 2026-10-22 10:54:37 +02:00
PrimeBuild-pc 3a2af1c0e9 security: refuse an update whose release has no trusted SHA256SUMS.txt
The installer runs elevated and silent, yet a release without the checksum file
was installed unverified. The download now stops before fetching anything when
the checksum asset is missing or not hosted on GitHub.
2026-10-22 10:54:37 +02:00
Prime Build 1540aeb7be Polish Windows 11 tweaks and add one-click updates (#40)
Verify persisted Windows tweak state on startup, modernize selection styling, and make in-app updates check every launch, install automatically after consent, preserve settings, and relaunch ThreadPilot.
2026-08-01 13:50:11 +02:00
Prime Build 7953fc7774 Refactor repo with ponytail cleanup (#31) 2026-06-24 17:52:45 +02:00
Prime Build 024673dcbe Add safe in-app updater (#28)
## Summary

Adds a safe in-app updater for ThreadPilot. This PR does not bump the app version and does not prepare a release; version and release metadata will be handled separately for v1.4.0.

## Type of Change

- [x] Feature
- [x] Security hardening
- [x] Documentation
- [x] Added/updated tests

## Update flow

- Checks for updates on demand from Settings.
- Performs background startup checks only when enabled and the last check is older than the configured interval.
- Defaults to a 7-day interval.
- Excludes prereleases by default.
- Notifies users when an update is available.
- Requires explicit user action before download/install.

## Security and safety

- Uses release metadata from the official `PrimeBuild-pc/ThreadPilot` repository only.
- Selects safe ThreadPilot installer assets from GitHub HTTPS release assets.
- Downloads into a ThreadPilot-owned temp update directory.
- Verifies SHA256 checksums when `SHA256SUMS.txt` is available.
- Rejects checksum mismatches.
- Performs best-effort Authenticode verification and rejects explicitly invalid signatures.
- Starts the installer elevated without shell command construction.
- Prevents concurrent install attempts.

## User data preservation

- Update flow does not delete AppData, settings, profiles, CPU masks, rules, custom/imported power plans, or logs.
- Only updater temp files are cleaned.
- Full uninstall behavior remains separate.

## Validation

- `dotnet restore ThreadPilot_1.sln`: passed
- `dotnet build ThreadPilot_1.sln`: passed, 0 warnings, 0 errors
- `dotnet test ThreadPilot_1.sln`: passed, 537 tests

## Release note

This PR intentionally leaves `ThreadPilot.csproj` at `1.3.1`. The `1.4.0` version bump, changelog, packaging metadata, and tag should happen in a separate release-prep branch after this PR is merged.
2026-06-07 06:06:53 +02:00