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

@@ -4,6 +4,7 @@ import { join } from 'node:path';
import { app, dialog, shell, type BrowserWindow } from 'electron';
import { zipSync } from 'fflate';
import { AppError } from '@shared/errors.ts';
import { getSettings } from '../config/settings-store.ts';
import { readInstallRecord } from '../install/install-record.ts';
import { LAUNCHER_LOG_FILES, launcherLogFolder } from './launcher-log.ts';
@@ -41,8 +42,9 @@ export async function exportDiagnostics(window: BrowserWindow | null): Promise<{
await addFile(files, `launcher-logs/${name}`, join(launcherLogs, name));
}
}
const record = await readInstallRecord();
if (record) await addServerLogs(files, record.dataPath);
const [record, settings] = await Promise.all([readInstallRecord(), getSettings()]);
const dataPath = (settings.developerMode ? settings.labDataPath : null) ?? record?.dataPath;
if (dataPath) await addServerLogs(files, dataPath);
const temporary = `${result.filePath}.${randomUUID()}.tmp`;
try {