feat(launcher): add About log export shortcut and runtime logging toggle
Launcher release / release (push) Waiting to run

Add a quick ZIP log export button to the About page (also bundling the latest embedded browser -browser.log while excluding player saves) and add a runtime logging toggle under Settings -> Diagnostics that controls launcher file logs, local server traffic logs, and wto_ws.log via log=0 in wto_ws.cfg. Update the v0.1.2 release note accordingly.
This commit is contained in:
N0VAN0M4LY committed 2026-12-02 17:41:49 +08:00
1 parent 2d5e268083
commit fb7d07f4f9
21 files changed
+230 -37

No files matched your search

+5 -1
View File
@@ -44,6 +44,8 @@ export interface GameCopyInputs {
readonly multiVehiclePackIds: readonly string[];
/** Store the placeholder decal index; false when the player's own web cache is copied. */
readonly placeholderDecals: boolean;
/** Whether wto_ws.dll writes win64/wto_ws.log; defaults to true. */
readonly hookLogging?: boolean;
}
/** One file of the game copy, by its path relative to the copy folder. */
@@ -96,7 +98,9 @@ export function buildGameCopy(inputs: GameCopyInputs): GameCopyBuild {
const mainPack = rebuildMainPack(inputs.stock.mainPack, endpoint, bundles);
const executableFolder = dirname(GAME_FILES.executable);
const hookSettings = networkHookSettings(endpoint, stockImage, native.values);
const hookSettings = networkHookSettings(endpoint, stockImage, native.values, {
loggingEnabled: inputs.hookLogging ?? true,
});
const files: GameCopyFile[] = [
{ path: GAME_FILES.charPack, content: charPack },
{ path: GAME_FILES.mainPack, content: mainPack.pack },
+6 -1
View File
@@ -17,7 +17,12 @@ export function networkHookSettings(
endpoint: LocalEndpoint,
stock: PeImage,
nativeValues: ReadonlyMap<string, number>,
options?: { readonly loggingEnabled?: boolean },
): { name: string; content: Uint8Array } {
const lines = [`port=${endpoint.port}`, ...nativeSettingsLines(stock, nativeValues)];
const lines = [
`port=${endpoint.port}`,
...(options?.loggingEnabled === false ? ['log=0'] : []),
...nativeSettingsLines(stock, nativeValues),
];
return { name: SETTINGS, content: new TextEncoder().encode(`${lines.join('\n')}\n`) };
}