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.