KCP gameserver with packet dispatch, scene streaming, combat, gacha and the shop, plus a small HTTP server for the login flow and the wish history page. Game data under assets is pulled out of the client instead of being typed by hand. The excel tables come from the packed bin container and the spawn points from the compiled scene scripts.
33 lines
1.3 KiB
PowerShell
33 lines
1.3 KiB
PowerShell
param(
|
|
[string]$GameDir = "D:\cbt1"
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$dist = Join-Path $PSScriptRoot 'dist'
|
|
|
|
$clientExe = 'GenshinImpact.exe', 'YuanShen.exe' |
|
|
Where-Object { Test-Path (Join-Path $GameDir $_) } | Select-Object -First 1
|
|
|
|
if (-not $clientExe) {
|
|
throw "No Genshin client (GenshinImpact.exe / YuanShen.exe) found in $GameDir - pass -GameDir <path> to your client folder."
|
|
}
|
|
Write-Host "Client: $clientExe in $GameDir" -ForegroundColor DarkGray
|
|
|
|
$files = 'version.dll', 'gadget.dll', 'gadget.config', 'redirect.js'
|
|
foreach ($file in $files) {
|
|
$source = Join-Path $dist $file
|
|
if (-not (Test-Path $source)) { throw "missing $source - run build.ps1 first." }
|
|
|
|
$target = Join-Path $GameDir $file
|
|
if ((Test-Path $target) -and $file -eq 'version.dll') {
|
|
Copy-Item $target "$target.bak" -Force
|
|
Write-Host "backed up existing version.dll -> version.dll.bak" -ForegroundColor DarkGray
|
|
}
|
|
|
|
Copy-Item $source $target -Force
|
|
Write-Host "deployed $file" -ForegroundColor Green
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "Patch deployed to $GameDir. Start the SDK server (:8899) and gameserver, then launch GenshinImpact.exe." -ForegroundColor Cyan
|
|
Write-Host "Check YuanshenPatch.log in the game folder to confirm the gadget loaded." -ForegroundColor Cyan
|