feat(all): split client tooling and add OAuth server login

This commit is contained in:
2026-09-30 17:32:14 +08:00
parent 7cb5e36c2a
commit 50e2572385
230 changed files with 9875 additions and 853 deletions
+4 -4
View File
@@ -66,16 +66,16 @@ GameData 根目录和版本没有机器相关默认值,所有查询都必须
```powershell
python .\tools\python\import_seed.py login .\decoded\LoginUser.pb `
--packet-code 11 --output .\go\seed\v2_34_13\login_user.json
--packet-code 11 --output .\go\seed\v2_35_10\login_user.json
python .\tools\python\import_seed.py starter `
--items .\decoded\ItemInfo.pb `
--costumes .\decoded\CostumeInfo.pb `
--characters .\decoded\CharInfo.pb `
--output .\go\seed\v2_34_13\starter_player.json
--output .\go\seed\v2_35_10\starter_player.json
python .\tools\python\import_seed.py mail .\decoded\MailInfo.pb `
--output .\go\seed\v2_34_13\mail.json
--output .\go\seed\v2_35_10\mail.json
```
输出已存在时默认拒绝覆盖;审阅输入和预期差异后才传 `--force`。
@@ -101,7 +101,7 @@ python .\tools\python\import_seed.py mail .\decoded\MailInfo.pb `
python .\tools\python\dev_mail_grant.py serve `
--game-data "E:\bd2\dl\GameData" `
--game-data-version "20260923193640" `
--mail-seed .\go\seed\v2_34_13\mail.json `
--mail-seed .\go\seed\v2_35_10\mail.json `
--output .\data\dev\mail-grants.json `
--settings-output .\data\dev\dev-tools.json
```
+1 -1
View File
@@ -8,7 +8,7 @@ by an explicitly configured local bd2server.
Example:
python tools/python/dev_mail_grant.py serve `
--game-data E:\\bd2\\dl\\GameData --game-data-version 20260910162539 `
--mail-seed go\\seed\\v2_34_13\\mail.json --output data\\dev\\mail-grants.json
--mail-seed go\\seed\\v2_35_10\\mail.json --output data\\dev\\mail-grants.json
"""
from __future__ import annotations
+11 -6
View File
@@ -44,6 +44,7 @@ $pluginDir = Join-Path $GameDir 'BepInEx\plugins'
$localRes = Join-Path $pluginDir 'PluginLocalRes.dll'
$capturePlugin = Join-Path $pluginDir 'BD2CaptureEnvironment.dll'
$identityPlugin = Join-Path $pluginDir 'BD2LocalIdentity.dll'
$loginUIPlugin = Join-Path $pluginDir 'BD2LoginUI.dll'
$doorstop = Join-Path $GameDir 'doorstop_config.ini'
$isolatedData = Join-Path $GameDir 'IsolatedUserData'
$stagedCapturePlugin = Join-Path $PSScriptRoot '..\..\plugins\CaptureEnvironment\bin\Release\netstandard2.1\BD2CaptureEnvironment.dll'
@@ -109,14 +110,18 @@ $localResText = $localResText.Replace('<BUNDLE_VERSION>', $BundleVersion)
$localResText = $localResText.Replace('<GAME_DATA_VERSION>', $GameDataVersion)
[IO.File]::WriteAllText($localResConfig, $localResText, [Text.UTF8Encoding]::new($false))
if (Test-Path -LiteralPath $identityPlugin) {
throw "Unsafe plugin found in official environment: $identityPlugin"
foreach ($unsafePlugin in @($identityPlugin, $loginUIPlugin)) {
if (Test-Path -LiteralPath $unsafePlugin) {
throw "Unsafe plugin found in official environment: $unsafePlugin"
}
}
$unexpectedIdentity = Get-ChildItem -LiteralPath (Join-Path $GameDir 'BepInEx') `
-Recurse -File -Filter 'BD2LocalIdentity.dll' -ErrorAction SilentlyContinue
if ($unexpectedIdentity) {
throw "BD2LocalIdentity.dll must not exist anywhere in the official environment."
foreach ($unsafeName in @('BD2LocalIdentity.dll', 'BD2LoginUI.dll')) {
$unexpectedPlugin = Get-ChildItem -LiteralPath (Join-Path $GameDir 'BepInEx') `
-Recurse -File -Filter $unsafeName -ErrorAction SilentlyContinue
if ($unexpectedPlugin) {
throw "$unsafeName must not exist anywhere in the official environment."
}
}
$sharedStaticPaths = @{