Commit Graph
93 Commits
Author SHA1 Message Date
N0VAN0M4LY 0af4183cb1 merge(ground-ai): merge feat/tank-ai phase 1 into main 2026-12-04 02:50:48 +08:00
N0VAN0M4LY 651b023d2a fix(launcher): preserve skipped files during game updates
Reuse source scan exclusions during stale-file cleanup so updates preserve user content and tool files copied by earlier installers.

Verified with root and launcher typechecks and an update run against temporary folders.
2026-12-04 00:47:29 +08:00
N0VAN0M4LY 1d3e47b082 feat(launcher): allow changing the online update source
Let registered clients set or replace their online installation source
from the maintenance page. Validate the source and persist its path
before refreshing the available update status.

Verified launcher and workspace type checks, a launcher build, and an
incremental update of a registered client using local game snapshots.
2026-12-04 00:11:55 +08:00
N0VAN0M4LY 4ac3484f56 feat(patcher,server): wire ground AI tuning, bot weights, and pack build
Add ground-ai.jsonc tuning validation, realistic tank class weights for
customBots pools, on-demand game.vromfs.bin / ailist.blk injection in
@wto/patcher, and launcher/CLI build integration while keeping all
ground AI layers disabled by default in shipped configuration.
2026-12-03 12:07:30 +08:00
N0VAN0M4LY e2ac4fa744 fix(launcher): use original-fs for copy and guard nested launcher folders
Electron patches node:fs to treat any .asar file on disk as a virtual
archive directory. When a player's War Thunder source directory contains
an .asar file (for example from a leftover portable launcher folder
previously unpacked inside the game folder), createReadStream fails with
ENOENT and aborts full-copy installation.

Changes:
- Add rawFs() helper using Electron's original-fs (with node:fs fallback)
  and use it across copy-game.ts and change-copy-files.ts for directory
  scans, streaming copies, timestamp preservation, rollback and cleanup.
- Preserve the first non-cancellation worker error in copyPlannedFiles so
  sibling AbortError rejections do not mask the real filesystem or
  hardlink error.
- Skip nested subfolders containing WTOffline Launcher.exe during
  planCopy, and reject copy installation upfront with
  launcher_inside_source when the packaged launcher itself runs from
  inside the selected source game directory (with en and zh-CN messages).

Verification:
- Root and launcher typecheck passed.
- Launcher electron-vite build passed.
- en.json and zh-CN.json key parity check passed (720 keys).
- Verified in Electron that patched node:fs reproduces ENOENT on
  default_app.asar while original-fs copies and cleans it up cleanly.
- Packaged installer end-to-end verification pending.
2026-12-03 10:40:49 +08:00
N0VAN0M4LY 01bafb6db7 fix(launcher): detach portable updater via Start-Process on Windows
Spawning powershell.exe directly with Node detached: true sets DETACHED_PROCESS (no console), causing Windows PowerShell 5.1 ConsoleHost to exit silently with code 0 before running -File. Spawning without detached lets it run, but Electron tears down attached children on app.quit(). Launch the apply script via a short hidden PowerShell Start-Process helper before quitting, properly quoting paths with spaces or non-ASCII characters, and clean up staged files if launching fails.
2026-12-03 07:48:44 +08:00
N0VAN0M4LY 18637cf1ff fix(launcher): skip user skins, sights, CDK, and launcher log folders when copying game
Exclude UserSkins and UserSights from stock client scans as player data folders (matching UserMissions and keeping them protected from symlink redirection during launch), and skip WarThunderCDK plus official launcher/updater log and obsolete folders when copying, sizing, or incrementally updating from a stock installation.

Verified: root typecheck, launcher typecheck, and launcher electron-vite build pass; runtime copy test pending.
2026-12-03 07:24:54 +08:00
N0VAN0M4LY 10427912e2 feat(launcher): display rendered markdown release notes in a modal
Keep the About page launcher update notice compact by showing only the available version, package size, and action buttons, with a compact button to open a scrollable release notes dialog when notes are present. Render GFM Markdown safely into React elements via marked.lexer without injecting raw HTML, and raise the release notes cap from 1,600 chars to 64 KiB so full bilingual notes are preserved.
2026-12-03 07:18:31 +08:00
N0VAN0M4LY 214f9d7f4b fix(launcher): use original-fs in portable updater and drop default_app.asar
Electron patches node:fs to treat .asar archives as virtual directories, so portable update verification failed on staged resources/default_app.asar and recursive cleanup could leave staging folders behind. Switch staging lstat and cleanup rm in portable-update.ts to original-fs (falling back to node:fs outside Electron), strip unused resources/default_app.asar during packaging so already-released 0.1.2/0.1.3 portable builds can update cleanly to future releases, and include portable-update.log in exported diagnostics.
2026-12-03 07:18:14 +08:00
N0VAN0M4LY 02fe867cf1 refactor(launcher): open mod documentation on wto-project.net
Replace the local offline HTML mod docs viewer in the launcher Mods page with a direct link to https://wto-project.net/mod-docs, remove the unused mods:openDocs IPC path and resource entry, and drop build-mod-docs-html.ts from Windows packaging while keeping bundled mod templates intact. Root typecheck, launcher typecheck, and electron-vite build passed.
2026-12-03 06:26:52 +08:00
N0VAN0M4LY 742094ea1e chore(launcher): bump version to 0.1.3 and add release notes 2026-12-03 06:13:23 +08:00
N0VAN0M4LY 594ff5ab54 feat(launcher): add project homepage link to About page
Add a Project homepage card and button pointing to https://wto-project.net on the launcher About page with matching zh-CN and en locale entries. Root typecheck, launcher typecheck, electron-vite build, and locale key parity checks passed.
2026-12-03 04:34:22 +08:00
N0VAN0M4LY d94c8fe687 feat(mods): merge additive mod system, official map selector, and mod-dev-docs
# Conflicts:
#	apps/launcher/src/main/workers/build-worker.ts
#	apps/launcher/src/renderer/src/i18n/locales/en.json
#	apps/launcher/src/renderer/src/i18n/locales/zh-CN.json
2026-12-03 03:43:56 +08:00
N0VAN0M4LY 240ee81712 feat(launcher): use dl.wto-project.net as primary release source with GitHub fallback
Replace the single GitHub repository field in release-channels.jsonc with primary_source (https://dl.wto-project.net) and ordered fallback_sources (GitHub), and update withReleaseSources to walk the deduplicated primary, player mirror, and fallback list while keeping preferred-source downloads and Ed25519 signature verification intact. Verified with root and launcher typecheck and launcher production build.
2026-12-03 03:02:14 +08:00
N0VAN0M4LY 6e65cec4c0 feat(mods): add official map selector mod template and move templates into mod-dev-docs 2026-12-03 03:01:18 +08:00
N0VAN0M4LY aa952e7cca docs(mods): add standalone mod-dev-docs handbook and launcher quick-open button 2026-12-03 02:51:54 +08:00
N0VAN0M4LY 5983e3f3e2 feat(mods): add battle.onFilterMissions hook and per-template bundled seeding 2026-12-03 02:40:38 +08:00
N0VAN0M4LY 662e837ab2 fix(patcher): support regional.vromfs.bin decal and skin indexes on cache import
Modern online War Thunder clients (verified on 2.61.0.58) ship their decal and
skin indexes (dldata/downloadable_decals.blk and dldata/downloadable_skins.blk)
inside cache/binary.<ver>/regional.vromfs.bin rather than downloading
downloadable_decals.<hash>.blk into cache/content/. Requiring
downloadable_decals.<hash>.blk rejected every live 2.61 cache/content folder.

- Accept modern online caches containing cached .ddsx textures alongside a
  sibling binary.<ver>/regional.vromfs.bin (as well as selecting the parent
  cache folder or legacy downloadable_decals.<hash>.blk caches).
- Extract both dldata/downloadable_decals.blk and dldata/downloadable_skins.blk
  into a self-contained .wto-index snapshot on launcher import (excluded from
  the copied game cache/content folder) and embed them into char.vromfs.bin
  during copy build so webdlcontent::init mounts cache/content and resolves
  cached real decals and downloadable skins natively without client patches.
- Log the specific rejection reason in launcher decal import and clarify the
  en/zh-CN prompts.

Verified with root and launcher npm run typecheck, launcher electron-vite
build, and an end-to-end temporary import + char.vromfs.bin build against a
read-only 2.61.0.58 online cache (4,080 decals / 1,930 skins embedded).
In-game acceptance pending on an isolated 2.61.0.58 client copy.
2026-12-03 01:58:28 +08:00
N0VAN0M4LY 8636d0b71d fix(mods): serialize initial example seeding and refresh on window focus 2026-12-03 01:55:20 +08:00
N0VAN0M4LY 97707f533d feat(launcher): bundle example mod templates and seed fresh mods folder once 2026-12-03 01:51:43 +08:00
N0VAN0M4LY ada635ecc7 refactor(launcher): move experimental mod notice to hover tooltip chip 2026-12-03 01:48:47 +08:00
N0VAN0M4LY deffcd6dde feat(saves): merge bulk research and purchase into one launcher action
In the launcher's Saves -> Vehicles & Research page, "Research all" only
filled vehicle RP without purchasing them, requiring players to buy each
vehicle manually in-game while a separate "Grant regular vehicles" button
already added them to the hangar.

Merge the two actions into a single "Research and buy all" (`purchase`) action
alongside "Unlock modifications" (`equipment`), and switch bulk modification
unlocking in save-research.ts to ProfileEquipmentIndex so large saves stay
O(N) and write cleanly across chunked modification blocks.

Verified with root and launcher npm run typecheck, launcher electron-vite
build, and en/zh-CN locale key parity (631 keys).
2026-12-03 01:19:20 +08:00
N0VAN0M4LY dbc21182a2 feat(launcher): add Mods page, per-client presets, custom repo folder, and launch integration 2026-12-03 00:34:07 +08:00
N0VAN0M4LY d0e4797fe7 feat(battle): add Nuclear Escalation tactical and strategic nuclear carriers
Connect stage-unlocked nuclear carriers to Air Realistic sub-mode 103
(Nuclear Escalation) and expose a player toggle for stage-3 megaton
strategic bombers:

- Dataset & profile grants: extract tactical killstreak nuclear carriers
  (5 kt / 30 kt Nuclear Escalation presets) and megaton strategic bombers
  (nt_b_52h / nt_tu_95m) from wpcost.blk in battle-spawn-rules (v4), and
  grant their required weapon/modification records in
  support-plane-modifications.ts.
- Server slot selection & tuning: add nuclearEscalationStrategicBombers
  (default true) in tuning/battle.jsonc, battle-tuning.ts, and
  launcher-tuning.ts; add one nation-matched tactical carrier per session
  rank bracket (with allowedWeapons limited to its Nuclear Escalation
  presets) and, when enabled, one stage-3 strategic bomber to
  extraBattleSlots; include modeTag in battle launch notifications.
- GUI patch & launcher UI: add battle/filter-extra-slot-weapons on
  scripts/weaponry/weaponryinfo.nut to filter extra-slot presets by
  allowedWeapons (hiding Ground RB zero-yield presets at stage 0) and to
  fall back to LocalMP launch metadata for GameModeRestrictions; expose
  the strategic bomber toggle in the launcher Battle tuning section.

Verified with root and launcher typechecks, launcher build, full
check-gui on 2.61.0.37 and 2.61.0.58 (49 patches across 37 .nut files),
and slot selection check across all 10 nations on 2.61.0.58 stock data;
pending in-game verification.
2026-12-02 23:03:15 +08:00
N0VAN0M4LY 646be7afb9 fix(battle): load player crew skills on LocalMP host
Unit::loadCrew previously skipped reading the player's equipped crew from
the profile whenever Multiplayer+0x60 (host flag) was non-zero, leaving
human players with default skills and no Expert/Ace bonuses. Calling
UnitCrewSkills::initFromSave after Unit::changeAircraft in the native
loadout hook ran too late to affect live vehicle crew state.

Add exe patch battle/load-local-host-player-crew to check both the host
and LocalMP flags (+0x60 and +0x61) in Unit::loadCrew so only non-LocalMP
hosts skip directly to the default crew while preserving the owner check.
Remove the late initFromSave workaround from local_mp_loadout.c (keeping
its native patch sites for compatibility with 0.1.2 hook DLLs) and add
the E-Crew skills in battle feature labels to the launcher locales.

Verified with check-patches on 2.61.0.37 (0x10025dd) and 2.61.0.58
(0x100700d), native wto_ws.dll build, launcher typecheck and build;
pending in-game verification.
2026-12-02 21:33:46 +08:00
N0VAN0M4LY be772c0cea fix(launcher): keep copy maintenance progress across tab switches 2026-12-02 20:24:30 +08:00
N0VAN0M4LY fa7f68b942 feat(launcher): use two-column About layout and add Discord link 2026-12-02 20:06:51 +08:00
N0VAN0M4LY fb7d07f4f9 feat(launcher): add About log export shortcut and runtime logging toggle
Launcher release / release (push) Canceled after 0s
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.
2026-12-02 17:41:49 +08:00
N0VAN0M4LY 2d5e268083 chore(launcher): bump version to 0.1.2 and add release note
Bump @wto/launcher to 0.1.2 in apps/launcher/package.json and package-lock.json, and add the bilingual release note in .github/release-notes/v0.1.2.md.
2026-12-02 17:23:13 +08:00
N0VAN0M4LY 66bbdf7192 fix(launcher): prevent false maintenance_location errors and log details
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.
2026-12-02 17:10:58 +08:00
N0VAN0M4LY bf2ce539e7 feat(launcher): use version-independent rules for space-saving copies
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.
2026-12-02 17:04:36 +08:00
N0VAN0M4LY de9ba52b85 fix(isolation): skip package validation and block official launcher spawns
Add -skip_pkg_validation to the shared offline launch arguments so aces.exe
skips the startup content/warthunder.blk file-size check, and add the
isolation/never-launch-official-launcher exe patch to NOP the os_shell_execute
call in the official launcher spawner while preserving its exit logging and
ExitProcess(1).
2026-12-02 10:18:54 +08:00
N0VAN0M4LY 82ec1c47ff feat(launcher): support signed in-place updates for portable builds 2026-12-02 09:37:05 +08:00
N0VAN0M4LY e284ea7ed6 chore(launcher): bump version to 0.1.1 and add release note
Bump @wto/launcher to 0.1.1 in apps/launcher/package.json and package-lock.json, and add the bilingual release note in .github/release-notes/v0.1.1.md.

Checked: root and launcher typechecks pass.
2026-12-02 09:21:35 +08:00
N0VAN0M4LY c55ec4ed57 fix(launcher): detect stale stock backups and distinguish missing backups on launch
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.
2026-12-02 09:06:28 +08:00
N0VAN0M4LY 1c6f5c9fc4 feat(launcher): verify launch files and log post-exit diagnostics
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.
2026-12-02 07:18:27 +08:00
N0VAN0M4LY cab73f92f9 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.
2026-12-02 07:15:37 +08:00
N0VAN0M4LY 152be6af0e feat(launcher): add configurable update mirror
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.
2026-12-01 20:04:29 +08:00
N0VAN0M4LY bd7450d9a1 fix(release): support prerelease adaptation packs
Adaptation pack / release (push) Canceled after 0s
Include published prereleases in adaptation pack checks. Publish signed adaptation packs as prereleases and let manual workflow runs stage a draft for release notes.
2026-12-01 18:36:17 +08:00
N0VAN0M4LY b4af034756 fix(hud): show damage notices for the controlled vehicle
Keep the affected unit on the native barrel and breech notification paths. Filter only the local-host notices, using the stock current-control lookup.
2026-12-01 13:50:05 +08:00
N0VAN0M4LY 7c2e2250c3 style(i18n): remove redundant Gaijin network disclaimer from pack check hint 2026-12-01 05:25:59 +08:00
N0VAN0M4LY f182e205e3 feat(launcher): merge add-client entry and choose setup mode in wizard step 1 2026-12-01 04:39:48 +08:00
N0VAN0M4LY a0515c4ed3 feat(launcher): detect missing client folders and support relocating while keeping saves 2026-11-30 21:32:17 +08:00
N0VAN0M4LY 2820d40d87 feat(launcher): create dedicated WTOffline subfolder and default versioned client name 2026-11-30 21:13:33 +08:00
N0VAN0M4LY bfedc3d27e feat(launcher): prompt for stock source when adding patched client without backup 2026-11-30 20:59:38 +08:00
N0VAN0M4LY 53e4fe54ba style(launcher): base app and installer icons on wordmark logo 2026-11-30 20:33:39 +08:00
N0VAN0M4LY f6aaeb2ad3 refactor(i18n): replace copy terminology with client in launcher locales 2026-11-30 19:42:26 +08:00
N0VAN0M4LY c65308c477 feat(launcher): add WTOffline logo application and installer icons 2026-11-30 19:38:32 +08:00
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