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.
Exclude stray top-level wtoffline folders when scanning stock sources, block selecting a data folder that equals or contains the client folder during installation (with inline Step 3 feedback), avoid false maintenance_location blocks when an existing installation placed dataPath at an ancestor of copyPath while still protecting nested data folders and data entries, and log the specific reason and paths on every maintenance_location failure.
Replace the single-version 2.61.0.43 SHA-256 hardlink manifest with declarative read-only asset rules in packages/patcher/tuning/hardlink-resources.jsonc (content/ and content.hq/ .dxp.bin and .grp archives with no minimum size cutoff). Space-saving installs and conversions now work across minor updates, and updating a space-saving client from a same-volume source preserves or creates hard links instead of detaching them into full copies.
Read the live executable version in inspectGameFolder instead of masking externally updated folders behind an older wtoffline/stock backup, and atomically refresh stale or unreadable backups during install, external stock import, and relocation. Log exact copy/stock/recorded versions on launch mismatches and report a dedicated launch_stock_missing error when wtoffline/stock/win64/aces.exe is missing or unreadable.
Checked: root typecheck, launcher typecheck, zh-CN/en locale key parity (616/616), and launcher electron-vite build.
Check that win64/aces.exe, wto_ws.dll, and wto_ws.cfg exist and are readable immediately before spawning the game, surfacing a dedicated error when security software removes them. On unexpected non-zero exits, log a compact read-only snapshot of hook file presence, wto_ws.log tail lines, and newly created .game_logs entries.
Checked: root typecheck, launcher typecheck, and zh-CN/en locale key parity.
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.
Let a saved HTTPS repository serve as the fallback for launcher and adaptation pack releases. Retry downloads for the selected version and validate against the project signing key. Verified type checks, the launcher build, and a simulated primary outage.
Include published prereleases in adaptation pack checks. Publish signed adaptation packs as prereleases and let manual workflow runs stage a draft for release notes.
Add user-initiated read-only discovery of local online client settings, copy selected files into the offline copy's staging directory before preview/import, clear the offline client's local cache for the imported account, and refresh save summaries after import.
Generate manifest.json for bundled patches during installer builds and ignore previously downloaded adaptation packs that are older than or equal to the bundled patch set.
Use the game's non-Steam startup option in the shared fixed arguments. Validate the arguments in the installed development handoff.
Statically verified on the .37 and .43 clients. The guarded game run remains part of acceptance.
Share a bounded release scan across channels and compare tag versions across pages. Report uncertainty when the scan hits its limit without confirming a newer release.
Verified with local release responses covering cross-page versions, truncation, and missing feeds.
Bind confirmation to the selected copy and data paths throughout installation, launch, and maintenance. Validate redirected runtime data paths and recheck original files before refreshing an in-place backup.
Verified by type checking and build. The acceptance checklist covers directory links and Steam confirmation.
Keep successful process creation separate from exit status. Report the exit code and game log directory when the process exits abnormally.
Verified by type checking and launcher build. The guarded game exit remains part of acceptance.
Remove the development gate from the launcher and keep the guarded development handoff available.
Verified by type checking, Windows packaging, and opening the packaged launcher with a temporary profile.
Check the versioned release channel, verify the signed manifest and installer digest, and open the installer only after confirmation.
Verified type checks, the Windows package, and an upgrade handoff from a local release fixture, including tampering and interrupted downloads.
Store the chosen cache in the copy data directory and use it for future builds. Restore the placeholder index when the copy has no available cache.
Verified type checks, the launcher build, a temporary .43 build, and the import and replacement flow from the Windows package.
Ship the Electron workers, local server sources, native library, and bundled patch set in the Windows installer.
Verified type checks, build, and the extracted installer payload with a temporary copy, local save, and server health check.
Build the selected copy for its port, wait for the local server, and manage the game and server lifecycles. Keep standard launch disabled pending isolation verification.
Verified both type checks, the launcher build, and the launch lifecycle against a temporary copy and a stand-in executable.
Offer same-volume hard links for sampled 2.61.0.43 resources after checking their content and keeping mutable files independent. Support converting existing copies and detach registered links during version updates.
Read rank thresholds and available avatar artwork from the selected copy. Persist avatar selections in the player profile and preserve free research points when a level changes.
Let the launcher update a save's account nickname and replace or clear its remaining premium time. Reuse registration validation and preserve the existing login and password hash.
- IPC patches:active / check / apply / useBundled and the event
patch-set-changed; installing or reverting is refused while a copy is
being maintained, since a build reads the patch set as it runs.
- Setting checkPatchPacksOnStart (on by default): the window checks once
when it opens and stays quiet when the check fails.
- The footer shows an available pack at the right end and leads to the
About page, which shows the patch set in use, checks on request, and
downloads and activates a pack only when the player clicks for it;
a pack that needs a newer offline version, or a failed check, is
explained there. Supported game versions follow the active set.
- Chinese and English text.
An adaptation pack is the patch set (exe, GUI, native definitions and
version records) released on its own, so a new game build can be adapted
without a new offline version. It is a zip with a manifest, signed with
Ed25519, published as a GitHub release tagged patches-<YYYY.MM.DD[.N]>.
- packages/patcher/src/patch-pack: manifest and version numbers, zip
writing and reading with path and size checks, signatures, a check that
a patch set reads as a whole; tuning/patch-pack.jsonc holds the
repository and the limits.
- scripts/generate-patch-signing-key.ts writes the public key for the
repository and the private key outside it; scripts/build-patch-pack.ts
packs only committed files and signs with PATCH_SIGNING_KEY.
- .github/workflows/patch-pack.yml packs, signs and publishes on a
patches-* tag or a manual run.
- Launcher main process: find the newest pack release, download, verify,
unpack into user data and make it active; resource paths use the
active pack when it is usable (a repository checkout only with
WTO_USE_PATCH_PACK=1). The pages that show and start this come later.
The LocalMP modules of wto_ws.dll scanned for 42 functions at start-up and
used about a hundred structure offsets compiled in as constants, so a game
update could move a field without anything noticing. Their needs are now
definitions under patches/native/<module>.jsonc, resolved by the patcher when
it builds the game copy, the same way exe patches are located:
- Locate methods: "string_ref" finds code by the string it loads (optionally
with a pattern around the lea, to read the field a scoreboard row stores
under that name), and "within" searches a short pattern inside the function
of a site located before it (function ranges from the exception directory).
- Each module lists its sites (functions, globals, call targets and the
instructions whose captures give structure offsets), its features and the
modules it requires. A module whose sites are not all found is reported
like an unavailable patch, with the modules depending on it.
- The resolved values go into wto_ws.cfg as native.<site>[.<capture>] lines,
with the executable's PE time stamp and image size so the library can
refuse values resolved for another build.
- Version records include the native module variants and values.
- Patch-set folders: the patcher, the scripts and the launcher take the root
of a patch set (exe, gui, native, versions) instead of separate folders.
- New feature tags K-Chat and radio and K-Nuclear bomb in both language packs.
The library still scans by itself; reading these values is the next change.
Checked: root and launcher type checks; all 10 modules resolve on 2.61.0.37,
where the 239 values equal what the drafting tool read with a disassembler, and
on 2.61.0.43, where every structure offset is unchanged except the GameSaveData
HUD event queue (0xae8 -> 0xb18); build-game-copy from 2.61.0.37 into a
temporary folder writes the values into wto_ws.cfg.
A game update used to fail a patch whenever any byte it compared moved, even
when only an address in the instruction changed. Patch definitions now say
what a change needs and read the rest from the code:
- patch.jsonc holds a list of variants, each written for one game build
(written_for) with its own locate block and edit; locate.jsonc is merged
into it. Exactly one variant must apply, otherwise the patch is left out.
GUI script patches use the same variants rule.
- expect_original and the bytes to write use the signature syntax, so
addresses that differ between builds can be wildcards.
- A locate block can capture values at the site (rel32 targets, immediates,
displacements); a rel32 fixup fills a hole in the written bytes from a
capture. allow-local-host-bot-spawns now jumps to the target of the
conditional jump it replaces instead of a stored distance, which makes it
apply to 2.61.0.43 as well.
- verified_on is gone from the definitions. patches/versions/<version>.jsonc
records, per checked game build, which variant of every patch applies and
where; scripts/record-game-version.ts writes it and the launcher reads the
recorded versions from there.
The Python tools (check-patches, patch-exe, check-gui) read the same format;
check-patches assembles a variant whose assembly names captures at the site
it was located at.
Checked: root and launcher type checks; check-patches and check-gui on
2.61.0.37 and 2.61.0.43 (12 exe and 35 GUI patches each); check-patches and
check-gui report a deliberately broken patch with a non-zero exit;
build-game-copy from 2.61.0.43 into a temporary folder. The computed bytes of
allow-local-host-bot-spawns on 2.61.0.37 equal the bytes it stored before.
BREAKING CHANGE: Each patch needs a variants list. Move executable locators into patch.jsonc and regenerate game version records with record-game-version.ts.
The window background now comes from two sources, served to the window
over a wto-art:// scheme from the launcher's cache:
- Website wallpapers: the newest entries of the public wallpaper gallery
on warthunder.com (two pages), list refreshed at most daily, each
1920x1080 picture downloaded when first shown and kept in the cache.
No cookies, no sign-in; a setting turns it off. Without a connection
the pictures downloaded before stay available.
- Game pictures: the nation pictures the game's own launcher keeps in
launcherr.dat next to the game, extracted from the installed copy
(fflate) once per archive version.
Without either, the window keeps its drawn background. The settings
choose a random picture per start or a fixed one (thumbnail grid); the
home page shows the picture's name with previous / next.
Checked: launcher typecheck, electron-vite build. Ran the window from a
scratch user data folder with a fake copy holding a copy of the real
launcherr.dat: 18 website wallpapers and 9 game pictures listed, both
sizes and the game pictures load through wto-art://, an unknown picture
is refused, stepping saves the choice, turning wallpapers off leaves
the game pictures, no console errors.
The window is now a fixed 1120x720 frameless window with its own title
bar: page navigation, language, minimize and close. The layout follows
the game's launcher: a side panel, the main area over the background,
and a bottom bar with the state of the current task and the primary
action. The colours and type follow the game's website: dark blue-grey,
red actions, Roboto Condensed (bundled, OFL), cyan progress.
- Pages: home (requirements before installation, the current copy
after), copies (copy details with folders to open, feature status
grouped by inventory section), settings (language), about.
- The install wizard is a hook shared by the side panel (step list),
the main area (current step) and the bottom bar (back, next, install,
cancel, copy progress).
- The adaptation shown for a game version is the version itself when
the patches were verified on it, otherwise the nearest verified one.
- Both language packs are rewritten in consistent product wording.
- New IPC: app:openFolder, install:listFeatures (patcher's new
patchFeatures), window:minimize, window:close; app:getInfo reports the
supported game versions.
Launching is not built yet; its button stays disabled.
Checked: launcher typecheck (main and renderer), electron-vite build,
root typecheck. Ran the window from a scratch user data folder over the
remote debugging port: every page and section in Chinese and English,
empty and installed state, the wizard's first step, both new IPC calls,
no console errors and no overflow.
The launcher's main process can now install the game copy, driven over
IPC by the install wizard to come:
- install:checkPatches builds the copy in memory in a utility process
(workers/patch-check-worker.ts, a second main entry) and reports the
patches that do not fit, each marked essential or not. Nothing is
written.
- install:start checks first, on the stock files the copy would get, so
a game whose essential patches do not fit is refused before tens of
gigabytes are copied; other missing patches need the player's
acceptance. Then, for the copy method, it measures, checks the target
drive's free space (plus 1 GB) and copies; it keeps the four stock
files in <copy>/wtoffline/stock, never replacing a file already there;
and it writes <user data>/install.json. Patched files are written by
the build at every launch with that launch's port, not here.
- The copy leaves out the top-level folders that hold what the game
produced while played online (.game_logs, cache, Replays, Screenshots,
UserMissions). It copies in chunks through streams, so progress moves
within a large data pack and install:cancel stops at once; it never
overwrites a file, and after a failure or a cancel it removes what it
copied, which is safe because the target was new or empty. One failing
parallel copy stops the others before the cleanup starts.
- Progress goes to the window as event:install-progress, at most every
250 ms. install:getRecord returns the record and the default data
folder (<user data>/data).
- New error codes, translated in both languages: not_a_game_folder,
target_not_usable, steam_library_not_confirmed, not_enough_space,
essential_patches_unavailable, missing_features_not_accepted,
patch_check_failed, copy_failed, install_cancelled, install_busy.
Checked with the launcher typecheck and build, and the calls made from a
running launcher window on a 2 GB test game folder holding the real
stock files: the check (12 exe and 35 GUI patches ready), a copy
install (player data folders left out, stock files backed up, record
written, 51 progress events), a second install into the same folder
(not_empty), a cancel 36 MB into a copy (install_cancelled, the copy
removed), an in-place install of the copy (its backup used) and a
folder that is not a game.
The install wizard needs to tell whether the chosen folder is a War
Thunder installation, which version it is, whether it is a Steam
library, and whether the folder for the copy can take it.
The patcher reads the game version from win64/aces.exe (the
VS_FIXEDFILEINFO block of its version resource) and works out the
versions every exe and GUI patch was verified on, from their
verified_on lists, so the version check follows the patch definitions
instead of a constant.
The launcher gets four IPC calls, each validated against the contract:
- dialog:pickFolder, a folder picker titled by the window;
- install:inspectGameFolder: missing game files, version, verified
versions, Steam library;
- install:inspectTargetFolder: new or empty, not overlapping the stock
installation, Steam library, free space on its drive, and whether it
is on the stock installation's drive (the space saving copy needs
that);
- install:measureFolder: bytes and files of the stock installation,
regular files only, links not followed.
A folder that does not exist or cannot be read is the folder_unreadable
error code, translated in both languages. In development the patch
folders and the hook library come from this repository; the packaged
layout comes with the installer build.
Checked with both typechecks, the launcher build, and the calls made
from a running launcher window: the stock folder (2.61.0.37, verified),
a non-game folder, a missing path, a Steam library path, four target
folders (new, inside the stock folder, not empty, other drive) and the
size of the offline copy (96.9 GB in 10,972 files).
The installer and launcher is an Electron app in apps/launcher: main
process, a sandboxed preload that only forwards allowed channels, and a
React window translated into Chinese and English.
Every renderer -> main call is declared once in the IPC contract
(shared/ipc/contract.ts) with zod schemas for its input and output; the
main side validates both when it registers a handler. The main process
throws error codes only, and the window translates them. The launcher's
own settings (for now the window language) are kept in the user data
folder and written through a temporary file and a rename. Development
runs can point the user data folder elsewhere with
WTO_LAUNCHER_USER_DATA.
The workspace packages (@wto/patcher, @wto/server) stay external to the
bundle: they ship as TypeScript sources and will run in utility
processes, where Electron's Node strips the types and they find their
web pages, tuning and keys next to their sources as they do today.
The root typecheck leaves out the launcher, which has its own tsconfig
files for the main process and the window.
Checked with the launcher typecheck, electron-vite build, the root
typecheck, and a start on a scratch user data folder.