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).
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 03:36:00 +08:00
1 parent 38e9549e15
commit ab0d3b1f30
13 files changed
+310 -1

No files matched your search

+4
View File
@@ -8,6 +8,10 @@
export const IPC_CHANNEL_PREFIXES = [
/** The launcher itself: version, folders. */
'app:',
/** System dialogs (folder pickers). */
'dialog:',
/** Installing the offline version: looking at the chosen folders, copying, patching. */
'install:',
/** The launcher's own settings. */
'settings:',
] as const;