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

WTOfflineProject

《战争雷霆》离线版。目标客户端版本:Steam 2.61.0.37。

做法和 SPT 一样:客户端的所有联网请求改到本机,由本地服务器模拟 Gaijin 的服务器。

本仓库不包含任何游戏文件。构建时从一个游戏文件夹读取原版文件。

目录 内容
apps/server/ 本地服务器(TypeScript):模拟 Gaijin 的登录、档案、匹配、商店等服务器
packages/ 共用的 TypeScript 库(npm workspace):BLK 编解码(blk)、数据包读写(vromfs)、JSONC(jsonc)、exe 补丁引擎(exepatch)、构建游戏副本(patcher)
patches/exe/ exe 补丁定义
patches/gui/ 界面脚本补丁定义
native/ 网络钩子与本地对局模块 wto_ws.dll(C)
scripts/ 开发用的 TypeScript 脚本(如 build-game-copy.ts 构建游戏副本)
tools/ Python 开发端工具:数据包读写、exe 补丁核对(特征码生成、汇编核对)、界面补丁编译检查
S
Description
WTOffline is a single-player offline project for the Windows client of War Thunder.
Readme AGPL-3.0
11 MiB
0 Stars 1 Watchers 0 Forks
2026-12-03 03:33:17 +08:00
Languages
TypeScript 82.3%
C 5.8%
Squirrel 3.3%
Python 3.1%
CSS 2.5%
Other 2.9%