feat(launcher): support signed in-place updates for portable builds
This commit is contained in:
1 parent
e284ea7ed6
commit
82ec1c47ff
8 files changed
+477
-46
No files matched your search
@@ -9,6 +9,11 @@ export function launcherReleaseFiles(version: string) {
|
||||
return { installer: `${base}.exe`, manifest: `${base}.manifest.json`, signature: `${base}.manifest.json.sig` };
|
||||
}
|
||||
|
||||
export function portableLauncherReleaseFiles(version: string) {
|
||||
const base = `wtoffline-launcher-${AppReleaseVersionSchema.parse(version)}-win-x64-portable`;
|
||||
return { archive: `${base}.zip`, manifest: `${base}.manifest.json`, signature: `${base}.manifest.json.sig` };
|
||||
}
|
||||
|
||||
export const LauncherReleaseManifest = z.strictObject({
|
||||
kind: z.literal('wto-launcher-release'),
|
||||
format: z.literal(1),
|
||||
@@ -19,6 +24,16 @@ export const LauncherReleaseManifest = z.strictObject({
|
||||
});
|
||||
export type LauncherReleaseManifest = z.output<typeof LauncherReleaseManifest>;
|
||||
|
||||
export const PortableReleaseManifest = z.strictObject({
|
||||
kind: z.literal('wto-launcher-portable-release'),
|
||||
format: z.literal(1),
|
||||
version: AppReleaseVersionSchema,
|
||||
platform: z.literal('win32-x64'),
|
||||
size: z.number().int().positive().max(MAX_INSTALLER_BYTES),
|
||||
sha256: z.string().regex(/^[a-f0-9]{64}$/),
|
||||
});
|
||||
export type PortableReleaseManifest = z.output<typeof PortableReleaseManifest>;
|
||||
|
||||
const AppUpdateReleaseSchema = z.object({
|
||||
version: AppReleaseVersionSchema,
|
||||
size: z.number().int().positive().max(MAX_INSTALLER_BYTES),
|
||||
|
||||
Reference in new issue
Block a user