Release adaptation packs and let the launcher install them

An adaptation pack is the patch set (exe, GUI, native definitions and
version records) released on its own, so a new game build can be adapted
without a new offline version. It is a zip with a manifest, signed with
Ed25519, published as a GitHub release tagged patches-<YYYY.MM.DD[.N]>.

- packages/patcher/src/patch-pack: manifest and version numbers, zip
  writing and reading with path and size checks, signatures, a check that
  a patch set reads as a whole; tuning/patch-pack.jsonc holds the
  repository and the limits.
- scripts/generate-patch-signing-key.ts writes the public key for the
  repository and the private key outside it; scripts/build-patch-pack.ts
  packs only committed files and signs with PATCH_SIGNING_KEY.
- .github/workflows/patch-pack.yml packs, signs and publishes on a
  patches-* tag or a manual run.
- Launcher main process: find the newest pack release, download, verify,
  unpack into user data and make it active; resource paths use the
  active pack when it is usable (a repository checkout only with
  WTO_USE_PATCH_PACK=1). The pages that show and start this come later.
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 16:08:37 +08:00
1 parent 19990fc9de
commit 3e2acc5a17
18 files changed
+1097 -2

No files matched your search

+28
View File
@@ -28,6 +28,34 @@ export { redirectNetworkConfig, type NetworkRedirectReport } from './network/red
export { loadNativeModules, type NativeModule, type NativeSite, type NativeSiteVariant } from './native/native-definition.ts';
export { resolveNativeModules, type NativeResolution } from './native/native-resolve.ts';
export { patchFeatures, type PatchFeature } from './patch-features.ts';
export { checkPatchSet, type PatchSetSummary } from './patch-pack/check-patch-set.ts';
export {
compareAppVersions,
comparePackVersions,
formatManifest,
isPackVersion,
manifestIncompatibility,
MANIFEST_FILE,
packFileNames,
packVersionOfTag,
parseManifest,
PATCH_PACK_FORMAT,
PATCH_PACK_TAG_PREFIX,
type ManifestIncompatibility,
type PatchPackFileNames,
type PatchPackManifest,
} from './patch-pack/manifest.ts';
export { packGameVersions, readPatchPack, writePatchPack, type PatchPackContents, type PatchPackFile } from './patch-pack/pack-archive.ts';
export { PatchPackError, type PatchPackProblem } from './patch-pack/patch-pack-error.ts';
export { patchPackTuning, type PatchPackTuning } from './patch-pack/patch-pack-tuning.ts';
export {
generateSigningKeys,
packSigningPublicKey,
signPatchPack,
SIGNING_PUBLIC_KEY_FILE,
verifyPatchPack,
type SigningKeyPair,
} from './patch-pack/signature.ts';
export { patchSetFolders, type PatchSetFolders } from './patch-set.ts';
export { offlinePackBundleGuids } from './store/offline-bundles.ts';
export {