feat(launcher): include client logs in diagnostics and format exit codes
Export the active client's wto_ws.log, latest .clog (bounded to 16 MiB), and a client-logs/summary.json metadata snapshot in diagnostics ZIPs without touching player saves. Log build completion, game launch arguments, PID, runtime duration, and hex-annotated Windows NTSTATUS/HRESULT exit codes in the launcher log and status bar. Checked: root typecheck, launcher typecheck, launcher electron-vite build, and exit code formatter runtime check.
This commit is contained in:
1 parent
1c24adbd83
commit
cab73f92f9
5 files changed
+184
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import type { TFunction } from 'i18next';
|
||||
import type { InstallRecord } from '@shared/schemas/install.ts';
|
||||
import type { LaunchState } from '@shared/schemas/launch.ts';
|
||||
import { formatExitCode, type LaunchState } from '@shared/schemas/launch.ts';
|
||||
import type { BarModel } from '../../shell/bar-model.ts';
|
||||
import { missingFeatures } from '../copies/missing-features.ts';
|
||||
|
||||
@@ -24,8 +24,11 @@ export function homeBar(
|
||||
const starting = { label: t('launch.starting'), disabled: true };
|
||||
const progress = { value: state.filesWritten ?? 0, max: state.filesTotal || null };
|
||||
const { gameExit } = state;
|
||||
const exitCodeLabel = gameExit
|
||||
? (gameExit.code !== null ? formatExitCode(gameExit.code) : (gameExit.signal ?? t('launch.exitCodeUnknown')))
|
||||
: undefined;
|
||||
const exitDetail = gameExit && gameExit.code !== 0
|
||||
? t('launch.exitDetail', { code: gameExit.code ?? gameExit.signal ?? t('launch.exitCodeUnknown'), path: gameExit.logFolder })
|
||||
? t('launch.exitDetail', { code: exitCodeLabel, path: gameExit.logFolder })
|
||||
: undefined;
|
||||
switch (state.phase) {
|
||||
case 'checking':
|
||||
|
||||
Reference in new issue
Block a user