feat(launcher): launch the game through the guarded lab

This commit is contained in:
N0VAN0M4LY committed 2026-11-29 15:02:39 +08:00
1 parent d633280e23
commit e41b73aaa3
25 files changed
+920 -23

No files matched your search

+23
View File
@@ -10,6 +10,7 @@ import {
PatchFeatureSchema,
TargetFolderInspectionSchema,
} from '../schemas/install.ts';
import { LabInfoSchema, LaunchStateSchema } from '../schemas/launch.ts';
import { SettingsPatchSchema, SettingsSchema } from '../schemas/settings.ts';
/**
@@ -25,6 +26,7 @@ export const ipcContract = {
output: z.object({
version: z.string(),
electron: z.string(),
development: z.boolean(),
/** The operating system's preferred language, as Electron reports it (e.g. "zh-CN"). */
systemLocale: z.string(),
userDataPath: z.string(),
@@ -93,6 +95,26 @@ export const ipcContract = {
input: z.void(),
output: z.array(PatchFeatureSchema),
},
'launch:getState': {
input: z.void(),
output: LaunchStateSchema,
},
'launch:getLabInfo': {
input: z.void(),
output: LabInfoSchema.nullable(),
},
'launch:start': {
input: z.void(),
output: LaunchStateSchema,
},
'launch:stop': {
input: z.void(),
output: z.void(),
},
'launch:openServerStatus': {
input: z.void(),
output: z.void(),
},
'settings:get': {
input: z.void(),
output: SettingsSchema,
@@ -114,6 +136,7 @@ export const ipcContract = {
export const ipcEvents = {
'event:settings-changed': SettingsSchema,
'event:install-progress': InstallProgressSchema,
'event:launch-state': LaunchStateSchema,
} as const;
export type IpcChannel = keyof typeof ipcContract;