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:
1 parent
38e9549e15
commit
ab0d3b1f30
13 files changed
+310
-1
No files matched your search
@@ -15,6 +15,7 @@
|
||||
"errors": {
|
||||
"internal_error": "Something went wrong inside the launcher.",
|
||||
"settings_write_failed": "Could not save the settings.",
|
||||
"folder_unreadable": "Cannot read the folder: {{path}}",
|
||||
"unknown": "Something went wrong."
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
"errors": {
|
||||
"internal_error": "启动器内部出错了。",
|
||||
"settings_write_failed": "设置保存失败。",
|
||||
"folder_unreadable": "无法读取文件夹:{{path}}",
|
||||
"unknown": "出错了。"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user