Commit Graph
53 Commits
Author SHA1 Message Date
N0VAN0M4LY cae69a6446 feat(launcher): support registering existing offline clients without copying 2026-11-30 19:32:24 +08:00
N0VAN0M4LY 7cb1011f0d feat(saves): localize battle and preset names, merge overview form and guard cache writes 2026-11-30 19:26:13 +08:00
N0VAN0M4LY e6e75d92c6 fix(saves): keep imported presets intact, cap crews to preset units and drop used-unit scan 2026-11-30 19:21:47 +08:00
N0VAN0M4LY 388dc9d9d7 fix(modifications): grant custom-slot weapon containers and support unit weapons 2026-11-30 19:18:16 +08:00
N0VAN0M4LY 62da2e3038 perf(server): index profile equipment and research refreshes
Replace O(N^2) linear lookups and repeated array filtering across modifications, weapons, modsResearch and unitResearch with single-pass Map indexes, pre-sort catalogue equipment once on load, avoid redundant pre-change disk writes in PlayerProfiles.updateWhen, and shallow-copy only top-level lists in clientProfile.
2026-11-30 17:54:36 +08:00
N0VAN0M4LY ebb2937a38 feat(launcher): add wordmark logo, ellipsis tooltips, auto-dismiss errors and online wording
Replace the title bar text mark with the white WTOffline wordmark SVG, add a window-level floating tooltip for truncated ellipsis text, auto-dismiss and manually close global error banners, and replace retail wording with online edition terminology across both locales and isolation patch titles.
2026-11-30 16:53:04 +08:00
N0VAN0M4LY db84971823 feat(saves): add one-click online data discovery and cache cleanup
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.
2026-11-30 16:51:52 +08:00
N0VAN0M4LY f39d7b05c1 fix(patch-pack): write bundled manifest and prefer newer bundled patches
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.
2026-11-30 16:50:46 +08:00
N0VAN0M4LY 8c19811714 fix(saves): remap online settings accounts, crew ids and exclude talismans
Re-key imported global.blk account settings to the local user id, map online global crew ids onto local crew slots, rewrite slotbar presets to local crew ids, clear offline local cache after bumping cloud versions, avoid cascading tech-tree unlocks from optional per-unit settings, and exclude talismans (premExpMul) from full equipment unlocks.
2026-11-30 16:49:50 +08:00
N0VAN0M4LY dacc61d404 fix(login): mark local accounts as email verified
Include the email_verified player tag in login answers so non-newbie local accounts do not trigger the in-game email verification dialog.
2026-11-30 16:48:52 +08:00
N0VAN0M4LY c087bd886a fix(launcher): disable Steam SDK initialization
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.
2026-11-30 15:23:18 +08:00
N0VAN0M4LY 31f4fedafe fix(updates): scan release channels across pages
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.
2026-11-30 15:23:18 +08:00
N0VAN0M4LY 5a78b1fdf8 fix(copies): honor confirmed Steam locations
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.
2026-11-30 15:23:17 +08:00
N0VAN0M4LY 84158f719d fix(launcher): report game exits separately
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.
2026-11-30 15:23:15 +08:00
N0VAN0M4LY b3a30c0fd9 fix(launcher): enable standard game launch
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.
2026-11-30 15:23:15 +08:00
N0VAN0M4LY 746b74c564 feat(updates): verify and install launcher releases
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.
2026-11-30 11:12:44 +08:00
N0VAN0M4LY a0beedd898 feat(agreement): show and record the WTOffline terms
Require explicit acceptance in the existing game dialog and retain the accepted version in the local account profile.

Verified full Quirrel compilation for .37 and .43, a temporary .43 build, and the launcher checks.
2026-11-30 10:44:42 +08:00
N0VAN0M4LY 1e3843b7e9 feat(decals): import a decal cache for each copy
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.
2026-11-30 09:59:14 +08:00
N0VAN0M4LY 10839f050f feat(installer): package the Windows launcher and runtime
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.
2026-11-30 09:49:43 +08:00
N0VAN0M4LY c1dea23955 feat(launcher): implement gated standard launch
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.
2026-11-30 09:40:58 +08:00
N0VAN0M4LY 2a97b0d46c feat(copies): add verified space-saving copies
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.
2026-11-30 05:51:22 +08:00
N0VAN0M4LY 0c9340f883 fix(profile): send a default avatar to the hangar
Include the default pilot icon in client profile replies when a save has no selected icon. Preserve chosen and legacy icons without modifying stored saves.
2026-11-30 04:58:43 +08:00
N0VAN0M4LY a940861295 fix(launcher): keep install requirement labels on one line
Size the home page requirement label column to its longest label so the installation requirements fit on one line in Chinese and English.
2026-11-30 04:56:13 +08:00
N0VAN0M4LY 5d1d7001b8 feat(saves): edit account levels and avatars
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.
2026-11-29 18:19:05 +08:00
N0VAN0M4LY d043a8f0f8 feat(accounts)!: require explicit local account registration
Open the local signup page in the game's embedded browser before sign-in. Return the existing login error for unknown accounts or invalid passwords.

BREAKING CHANGE: First-time players must register in the game's signup window or create a save in the launcher before signing in. Existing accounts can sign in with their saved credentials.
2026-11-29 18:00:21 +08:00
N0VAN0M4LY d20b7f4249 feat(saves): edit local save nicknames and premium days
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.
2026-11-29 17:41:46 +08:00
N0VAN0M4LY 02e05b07dc docs(patch-pack): reference the public version record implementation 2026-11-29 16:35:46 +08:00
N0VAN0M4LY a8678445c0 fix(launcher): report whether a game version is verified
Patches locate themselves in each game build, so nothing is chosen per
game version: a version without a check record is installed with every
patch tried, and the copy's patch check says which features work. The
pages showed an "adaptation version" and, for an unchecked version, the
nearest checked one as if its patches were used. They now show whether
the version is verified, and say that an unverified one still tries
every patch.
2026-11-29 16:34:54 +08:00
N0VAN0M4LY b984f40087 feat(patch-pack): show adaptation pack updates in the launcher
- 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.
2026-11-29 16:32:13 +08:00
N0VAN0M4LY 893d60854f feat(tuning): configure tuning for each game copy 2026-11-29 16:24:21 +08:00
N0VAN0M4LY 61255f5473 feat(saves): edit research branches in local saves 2026-11-29 16:16:42 +08:00
N0VAN0M4LY f5c5377d44 feat(patch-pack): publish signed adaptation packs and install them locally
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.
2026-11-29 16:08:37 +08:00
N0VAN0M4LY 597df6b4f5 feat(saves): import official game backups 2026-11-29 16:03:31 +08:00
N0VAN0M4LY d0a767e692 feat(saves): add save archives and copy transfers 2026-11-29 15:55:23 +08:00
N0VAN0M4LY 073a907617 feat(saves): add local save selection and editing 2026-11-29 15:42:28 +08:00
N0VAN0M4LY 2b1da24263 feat(accounts): add explicit local account registration 2026-11-29 15:30:34 +08:00
N0VAN0M4LY ef3648cb13 feat(launcher): add maintenance for installed game copies 2026-11-29 15:24:21 +08:00
N0VAN0M4LY 7d68dc0548 feat(launcher)!: manage multiple game copies
BREAKING CHANGE: The launcher stores copy registrations in copies.json. Installations recorded only in install.json must be registered again.
2026-11-29 15:14:41 +08:00
N0VAN0M4LY e41b73aaa3 feat(launcher): launch the game through the guarded lab 2026-11-29 15:02:39 +08:00
N0VAN0M4LY d633280e23 feat(launcher): add logging and diagnostics export 2026-11-29 14:45:49 +08:00
N0VAN0M4LY dde852e2b1 feat(patcher): resolve native LocalMP values from patch definitions
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.
2026-11-29 12:15:30 +08:00
N0VAN0M4LY 927201a462 feat(patches)!: support game-version variants in patch definitions
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.
2026-11-29 11:47:08 +08:00
N0VAN0M4LY 9503bb3c45 chore(patches): name patch feature tags in English
The features listed by every exe and GUI patch definition now use English
tags, so contributors can read them without knowing Chinese. Each tag keeps
its feature inventory section letter (A- to O-) and translates the inventory
row it stands for. Tags that named the same row in two languages are merged
(store, premium account, marketplace), and the external inventory tag on the
coupon redemption patch joins the coupons tag it describes: 32 tags become 28.

The three essential tags in the patcher and the launcher's feature labels in
both locales follow the rename.

Checked: check-patches, check-gui, root and launcher typecheck, launcher
build, a build-game-copy run into a temporary folder (12 exe and 35 GUI
patches ready, as before), and install:listFeatures in the launcher
returning 28 tags with the three essential ones flagged.
2026-11-29 11:25:44 +08:00
N0VAN0M4LY 44190e4544 build(repo): make source comments and build tools self-contained 2026-11-29 08:46:08 +08:00
N0VAN0M4LY 5b5c59ab08 fix(launcher): improve text contrast and simplify interface copy 2026-11-29 08:43:21 +08:00
N0VAN0M4LY d82f9856f6 feat(launcher): show official gallery and local game wallpapers
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.
2026-11-29 07:45:26 +08:00
N0VAN0M4LY 81c900a61d feat(launcher): redesign the main launcher window
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.
2026-11-29 07:39:12 +08:00
N0VAN0M4LY c442d6b83c feat(launcher): add the installation wizard
The window now installs the offline version in five steps:

1. Game: the player picks their War Thunder folder; the launcher says
   whether it is one and whether its version is the one the patches were
   verified on (another version is pointed out, not refused).
2. Method: copy into a new folder (recommended; shows the size of the
   installation, the room on the target drive, and why a folder cannot
   be used) or install into the chosen folder itself. A Steam library
   brings up the three risks and needs a tick before going on.
3. Data: the folder for saves, caches and logs, the launcher's own data
   folder by default.
4. Check: the patch check runs each time the step is entered. Missing
   essential changes stop the installation; other missing changes are
   listed as the features they cost, translated, with the patches behind
   them folded away, and need a tick to go on.
5. Install: phase, a byte progress bar and file counts while copying,
   and a cancel button. An error goes back to the check step with its
   translated message.

The first screen shows either the invitation to install or what is
installed (copy, data folder, version, method, missing features) with a
button to install again. Feature tags of the patch definitions have
names in both languages; a tag without one is shown as it is.

The app's productName gives its user data folder a readable name.

Checked with the launcher typecheck and build, and a start on a scratch
user data folder: the first screen and the wizard's first step render
in Chinese and English with no console errors.
2026-11-29 06:29:53 +08:00
N0VAN0M4LY 3dcf7bb062 feat(launcher): install offline copies and back up stock files
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.
2026-11-29 05:03:40 +08:00
N0VAN0M4LY ab0d3b1f30 feat(launcher): inspect game installation and destination folders
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).
2026-11-29 03:36:00 +08:00