Skip to content

Commit 8799da1

Browse files
committed
fix(rc31): correct NTE deployment, runtime sync and clean reinstalls
1 parent 6ce9ee9 commit 8799da1

7 files changed

Lines changed: 384 additions & 22 deletions

File tree

‎.github/workflows/aurora-hardening.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: New RC3.1 safety and clean-room suites (Windows PowerShell 5.1)
1717
shell: powershell
1818
run: |
19-
foreach ($name in @('Path_Safety','Fault_Matrix','Metadata_Fuzz','Scan_Performance','Batch_Entry','Package_Boundary','Package_Cleanroom')) {
19+
foreach ($name in @('Path_Safety','Fault_Matrix','Metadata_Fuzz','Scan_Performance','Batch_Entry','Package_Boundary','Package_Cleanroom','Install_Incident','Install_Entry')) {
2020
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\tests\Aurora_${name}_Tests.ps1"
2121
if ($LASTEXITCODE -ne 0) { throw "Hardening suite failed: $name" }
2222
}

‎dist/runtime_sync/Aurora_Installer.ps1‎

Lines changed: 140 additions & 14 deletions
Large diffs are not rendered by default.

‎dist/runtime_sync/Aurora_Setup.ps1‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
)
88
. (Join-Path $PSScriptRoot 'Aurora_Common.ps1')
99
. (Join-Path $PSScriptRoot 'Aurora_Installer.ps1')
10-
$exitCode=0; $report=Join-Path ([IO.Path]::GetTempPath()) ('Aurora-RC3-'+[Guid]::NewGuid().ToString('N')+'.json')
10+
$exitCode=0; $session=New-AuroraReportSession; $report=$session.ReportPath
1111
try {
1212
$PackageDir=Get-AuroraPath $PackageDir; $InstallDir=Get-AuroraPath $InstallDir
13-
Write-Host "`n Aurora 安装器 RC3`n" -ForegroundColor Cyan
13+
Write-Host "`n Aurora 安装器 RC3.1 · 安装修复版 20260914`n" -ForegroundColor Cyan
1414
Write-Host ' 正在自动检测游戏…'
1515
if (-not $GameRoot -and ((Test-Path -LiteralPath (Join-Path $InstallDir 'OptiScaler\AuroraSetup\installation.json')) -or (Test-Path -LiteralPath (Get-AuroraIndexPath $InstallDir)))) {
1616
$GameRoot=Resolve-AuroraDeploymentRoot $InstallDir
@@ -29,7 +29,7 @@ try {
2929
}
3030
}
3131
$GameRoot=Get-AuroraPath $GameRoot; Assert-AuroraGameRoot $GameRoot
32-
$index=Open-AuroraIndex $GameRoot
32+
$index=Open-AuroraIndex $GameRoot -ForNewInstall:($Action -in @('Menu','Install','Repair'))
3333
$localMeta=Join-Path $InstallDir 'OptiScaler\AuroraSetup\installation.json'
3434
if (-not $index -and (Test-Path -LiteralPath $localMeta)) {
3535
$savedMeta=Read-AuroraJson $localMeta
@@ -43,7 +43,7 @@ try {
4343
if ($GameExe -and -not @($candidates | Where-Object { $_.Path -ieq (Get-AuroraPath $GameExe) }).Count) { throw '指定 EXE 未通过安全筛选。' }
4444
Write-Host (' ✓ 已检测到游戏:'+[IO.Path]::GetFileName($GameRoot)) -ForegroundColor Green
4545
Write-Host (' ✓ 将覆盖 '+@($candidates | Group-Object Directory).Count+' 个游戏入口目录') -ForegroundColor Green
46-
foreach ($c in @($candidates | Select-Object -First 3)) { Write-Host (' '+$c.Path.Substring($GameRoot.Length).TrimStart('\')) }
46+
foreach ($c in @($candidates | Select-Object -First 3)) { Write-Host (' '+$c.Path.Substring($GameRoot.Length).TrimStart('\')+' → '+(Get-AuroraRecommendedProxy @($c) $Proxy)) }
4747
if ($candidates.Count -gt 3) { Write-Host ' 其余入口见详细报告。' }
4848
if (-not $scan.Complete -or -not $candidates.Count) { Write-Host ' ! 当前不能安全安装;仍可选择恢复 / 卸载。' -ForegroundColor Yellow }
4949
Write-Host ' ✓ 自动匹配 Proxy,保留现有配置,替换前备份' -ForegroundColor Green
@@ -76,8 +76,11 @@ try {
7676
if ($Action -in @('Install','Repair')) {
7777
Write-Host "`n 正在备份并部署 Aurora…"
7878
$index=Install-AuroraDeployment $GameRoot $PackageDir $Proxy $report
79-
Write-Host "`n ✓ 安装完成,所有候选入口已部署并校验。" -ForegroundColor Green
80-
Write-Host ' 可以启动游戏,按 Insert 核对 Aurora。'
79+
Write-Host ("`n ✓ 部署完成,"+$index.Verification.Count+' 个入口的 Proxy 与完整文件自检通过。') -ForegroundColor Green
80+
$summary=$index.RuntimeSummary
81+
Write-Host (' ✓ Runtime:已同步 '+$summary.Synchronized+' 项,已是包内版本 '+$summary.AlreadyCurrent+' 项。') -ForegroundColor Green
82+
if ($summary.Protected) { Write-Host (' ! 安全保留 '+$summary.Protected+' 项 Runtime(其中 SL1 '+$summary.SL1Preserved+' 项),原因见详细报告。') -ForegroundColor Yellow }
83+
Write-Host ' 磁盘部署已完成;请启动游戏,按 Insert 核对实际加载。'
8184
} elseif ($index -and $Action -in @('Restore','Remove')) {
8285
$preserved=@(Remove-AuroraDeployment $index $report -RuntimeOnly:($Action -eq 'Restore'))
8386
Write-Host "`n ✓ 已恢复可恢复的原版文件。" -ForegroundColor Green
@@ -86,7 +89,7 @@ try {
8689
} elseif ($index -and $Action -eq 'Check') {
8790
foreach ($target in $index.Targets) {
8891
foreach ($exe in $target.Executables) {
89-
$log=Join-Path ([IO.Path]::GetTempPath()) ('Aurora-Check-'+[Guid]::NewGuid().ToString('N')+'.log.txt')
92+
$log=Join-Path ([IO.Path]::GetDirectoryName($report)) ('check-'+[Guid]::NewGuid().ToString('N')+'.log.txt')
9093
Invoke-AuroraRuntimeTask Check $GameRoot $target.Directory $log $exe
9194
Write-Host (' ✓ 诊断报告:'+$log) -ForegroundColor Green
9295
}
@@ -114,4 +117,5 @@ if (-not $NonInteractive) {
114117
}
115118
}
116119
}
120+
$session.Lease.Dispose()
117121
exit $exitCode

‎dist/runtime_sync/runtime_sync.ps1‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@ try {
149149
foreach ($item in @($inventory | Where-Object { $_.Action -eq '可同步' })) {
150150
Install-AuroraFile $journal $manifestPath $sources[$item.Name] $item.Path $item.SourceHash $item.SHA256
151151
}
152+
if ($RC3Safety -and $ReportPath) {
153+
$synchronized=@($inventory | Where-Object { $_.Action -eq '可同步' })
154+
foreach ($item in $synchronized) {
155+
if ((Get-AuroraHash $item.Path) -ne $item.SourceHash) { throw "Runtime 安装后校验失败:$($item.Path)" }
156+
}
157+
# Keep Inventory as the diagnostic pre-operation evidence, and add an
158+
# explicit outcome instead of presenting a planned copy as a completed one.
159+
$report.Phase='PostOperation'
160+
$report | Add-Member NoteProperty Summary ([pscustomobject]@{
161+
Synchronized=$synchronized.Count
162+
AlreadyCurrent=@($inventory | Where-Object { $_.Reason -eq '与包内版本相同' }).Count
163+
SL1Preserved=@($inventory | Where-Object { $_.Name -like 'sl.*.dll' -and $_.Major -eq 1 }).Count
164+
Protected=@($inventory | Where-Object { $_.Action -eq '保留' -and $_.Reason -ne '与包内版本相同' }).Count
165+
SynchronizedPaths=@($synchronized | ForEach-Object { $_.Path })
166+
})
167+
Write-AuroraJson $ReportPath $report
168+
}
152169
Write-Host '同步完成。SL1、未知版本及 DLSSNR 已保留;请进游戏按 Insert 核对加载和倍率。'
153170
exit 0
154171
} catch {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# RC3.1 安装实机问题修复(2026-09-14)
2+
3+
基线:`6ce9ee94`,工作分支:`aurora-rc3-installer-20260913`。本轮只处理安装链路;不修改渲染、6X、Streamline Fetcher 或核心 DLL。研究工作暂停。
4+
5+
## 已从实机日志确认的事实
6+
7+
- 异环旧版安装报告 `9b318d42765448fc94ee7c7305182ec7` 把 AntiCheatExpert 内的 ACE-Service64、ACE-Setup64、ACE-Tray 当作三个候选,向同一个 ACE 目录部署 dxgi。主 Win64 目录没有安装日志;其中 OptiScaler.dll 是用户解压的源文件。旧版的成功提示只证明错误目标的复制完成,并不证明游戏注入成功。
8+
- 主 Win64 同时含 HTGame.exe、CrashCapture.exe、CrashClientReporter.exe。旧版“同目录任何 x64 工具即排除整个目录”误排除 HTGame;同时反作弊过滤漏了 AntiCheatExpert/ACE,评分又把祖先 Win64 的分数给了子目录,三项缺陷共同造成错误部署。
9+
- UE 插件的 DLSS/Streamline 位于 Engine/Plugins/.../ThirdParty/Win64。旧 Runtime 安全过滤把 ThirdParty 一律排除,所以异环没有同步。
10+
- 用户 Remove 后,旧总清单状态是 Removed。随后游戏启动器重建整个 Win64,旧 ACE 部署日志消失;安装入口仍强制要求旧日志存在,导致无法重装。
11+
- 巫师3报告 `771e810a0d304e47a9d56d6ae6f5985a` 确认 `bin/x64` 与 `bin/x64_dx12` 都已部署,DLSS/DLSSG 已同步至 310.9,SL1.5.6 保留。OptiScaler.dll 与 dxgi.dll 共存符合自包含部署设计;解压时已有且内容相同的源文件不会被凭空登记为安装器所有。
12+
13+
## 修复
14+
15+
1. 明确过滤 AntiCheatExpert、ACE、CrashCapture 等程序与目录;Win64/Binaries 评分只应用于直接入口,不再传递到任意子目录。安全筛选按目录缓存,提交前和最终校验重新检查。
16+
2. 异环 HT/Binaries/Win64/HTGame.exe 固定使用 winmm,拒绝 dxgi 等覆盖。保留通用共目录工具保护,仅对该配置中的两个已采集 SHA256 的崩溃组件允许共存:
17+
- CrashCapture.exe:`1C909503EC05A58552F244654D62105BDA92B16D90F66C6E87B5F69944CA3FB5`
18+
- CrashClientReporter.exe:`FC334948C58161D706035A17C72DAFABC1BBF309A0EB1AE853EFFE11A25FBD26`
19+
这是一项有限的兼容配置,不是“静态检查证明任何运行时都不会加载 Proxy”。未知版本或额外工具仍阻止自动安装,反作弊目录始终排除。组件更新后需要重新核对,不能只按名称放行。
20+
3. Runtime 模式允许 ThirdParty 内的原生 DLL 进入原有版本/架构/备份流程;工具和反作弊目录仍保留,SL1 与未知代际仍保护,源 SL2 仍受固定 SHA256 catalog 限制。
21+
4. 已完成 Removed 状态可开始新安装:校验仍存在的日志全部 Restored,归档旧总清单,创建新的目标清单;旧 ACE 目标不会带入新部署。Remove/Restore 不使用此例外,缺日志仍不操作。Applied/Pending/NeedsAttention 缺注册日志不能当作全新安装;另补上更新时缺 Runtime 日志会丢失原版恢复关联的漏洞。
22+
5. 最终成功前重检所有候选、所选 Proxy、完整 payload 和已同步 Runtime。若第一入口的文件在第二入口完成时发生变化,状态为 NeedsAttention,不能显示成功;Remove 仍保留用户修改。
23+
6. Runtime JSON 加入 PostOperation 和实际同步/相同版本/保护计数,保留原诊断 Inventory 作为操作前证据。普通 UI 显示真实入口、Proxy、同步结果,并明确区分磁盘校验与游戏内加载。
24+
7. 新报告集中在 `%LOCALAPPDATA%\Aurora\Logs\<会话ID>`。保留最近 20 次操作,活动会话、未知文件、目录链接不清理;不递归删除、不接触安装清单和备份。旧 Temp 文件不自动删除,故障证据已另存。
25+
8. 当前解压上下文里有游戏但入口被安全策略阻止时,不再悄悄改选另一个 Steam 游戏。
26+
27+
## 验证
28+
29+
- 新增 `Aurora_Install_Incident_Tests.ps1`:49 项,覆盖真实目录形态、ACE 排除、共目录工具例外的严格边界、ThirdParty Runtime、旧 ACE Removed 清单与目录重建、缺 Runtime 日志、双入口、SL1、最终状态异常、日志保留和 junction。
30+
- 新增 `Aurora_Install_Entry_Tests.ps1`:9 项,通过真实 CMD/Windows PowerShell 5.1,模拟“完整包解压到主 Win64 → 自动定位 → Enter 安装 → 更新 → Remove”,区分源 OptiScaler.dll 与生成 Proxy 的 ownership。
31+
- 相关回归:Fault Matrix 69 项、Metadata Fuzz 92 项。仅因本次修改触及事务完成判定与清单读取而回归;未重跑旧 RC3 81、RC2 41、旧 50 项套件。
32+
- 真实目录只读扫描:异环选出唯一 HTGame.exe/winmm;巫师3两个 EXE/dxgi。异环只读 Runtime 检查得到 9 项可同步(3 个 DLSS 系列、6 个 SL2);没有替换实机文件。
33+
- 测试使用合成 PE;涉及崩溃组件的测试仅在临时测试包内替换两个已知指纹为合成组件指纹,不修改生产配置、不附带真实游戏 EXE。上述测试不证明 GPU/游戏兼容性。
34+
35+
## 更新与实机复测
36+
37+
推荐把完整构建包解压到游戏之外的独立目录,再覆盖本次“安装链路热修工具包”。运行 Aurora_Setup.bat,在摘要中选中要测试的游戏;若无法自动找到异环,在路径兜底输入游戏目录。不要将仓库替换 ZIP 解压到游戏,不要把旧 RC2/RC3 ZIP 再覆盖到本次工具上。
38+
39+
如果当前旧记录已经 Removed,直接安装即可,历史总清单会归档。如果仍显示 Applied/NeedsAttention 且旧目标是 ACE,先使用修复包的修复/恢复/卸载菜单按原日志卸载;若日志缺失,保持停止,不删除或伪造 metadata。任何无法证明 ownership 的文件都保留。
40+
41+
实机需确认:异环摘要是 HTGame/winmm,ACE 目录没有新增 Aurora;winmm 存在、dxgi 不生成;游戏内 Insert/加载提示、退出稳定性与启动器行为;9 项 Runtime 同步后的游戏表现以及 Remove 恢复。巫师3验证双入口、SL1.5.6、既有 6X。两个共目录崩溃工具的动态模块行为仍需实际运行核对。
42+
43+
保留的 OptiScaler.dll、手工解压工具或用户修改文件不代表卸载失败。清单与备份有意保留。没有自动修改真实游戏,没有合并 aurora 或发布 Release。
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
param([string]$ScratchRoot=(Join-Path $env:TEMP ('AuroraEntryIncident-'+[Guid]::NewGuid().ToString('N'))))
2+
. (Join-Path $PSScriptRoot 'Aurora_Hardening_TestSupport.ps1')
3+
$game=Join-Path $ScratchRoot '异环 [中文] 空格\Client\WindowsNoEditor'; $win=Join-Path $game 'HT\Binaries\Win64'
4+
Package $win
5+
Binary (Join-Path $win 'HTGame.exe'); Binary (Join-Path $win 'CrashCapture.exe'); Binary (Join-Path $win 'CrashClientReporter.exe')
6+
Binary (Join-Path $win 'AntiCheatExpert\ACE-Service64.exe')
7+
Binary (Join-Path $game 'Engine\Plugins\Runtime\Nvidia\DLSS\Binaries\ThirdParty\Win64\nvngx_dlss.dll') '310.1.0.0'
8+
$installer=Join-Path $win 'Aurora_Installer.ps1'
9+
$text=[IO.File]::ReadAllText($installer)
10+
# The real product pins game companion bytes, not synthetic executables. Substitute
11+
# only those two fingerprints in this isolated package; no helper-policy stubs.
12+
$text=$text.Replace('1C909503EC05A58552F244654D62105BDA92B16D90F66C6E87B5F69944CA3FB5',(Get-AuroraHash (Join-Path $win 'CrashCapture.exe')))
13+
$text=$text.Replace('FC334948C58161D706035A17C72DAFABC1BBF309A0EB1AE853EFFE11A25FBD26',(Get-AuroraHash (Join-Path $win 'CrashClientReporter.exe')))
14+
Put $installer $text
15+
$sourceHash=Get-AuroraHash (Join-Path $win 'OptiScaler.dll')
16+
function RunEntry([string]$Wrapper,[string]$InputText) {
17+
$psi=New-Object Diagnostics.ProcessStartInfo
18+
$psi.FileName=$env:ComSpec; $psi.Arguments='/d /c ""'+(Join-Path $script:win $Wrapper)+'""'
19+
$psi.UseShellExecute=$false; $psi.CreateNoWindow=$true
20+
$psi.RedirectStandardInput=$true; $psi.RedirectStandardOutput=$true; $psi.RedirectStandardError=$true
21+
# Keep fixture sessions out of the user's real log directory.
22+
$psi.EnvironmentVariables['LOCALAPPDATA']=Join-Path $script:ScratchRoot 'UserLocal'
23+
$process=[Diagnostics.Process]::Start($psi)
24+
$stdout=$process.StandardOutput.ReadToEndAsync(); $stderr=$process.StandardError.ReadToEndAsync()
25+
$process.StandardInput.Write($InputText); $process.StandardInput.Close()
26+
if (-not $process.WaitForExit(60000)) { $process.Kill(); throw 'Entry timed out.' }
27+
$result=[pscustomobject]@{ExitCode=$process.ExitCode;Output=$stdout.Result;Error=$stderr.Result}
28+
$process.Dispose(); return $result
29+
}
30+
$first=RunEntry 'Aurora_Setup.bat' "`r`n`r`n"
31+
Put (Join-Path $ScratchRoot 'install-output.txt') ($first.Output+$first.Error)
32+
Assert ($first.ExitCode -eq 0) 'Real CMD wrapper accepts one Enter to install from an extracted package inside Win64'
33+
Assert ($first.Output -match 'HTGame.exe' -and $first.Output -match 'winmm.dll' -and $first.Output -notmatch 'ACE-Service64.exe') 'Normal UI names HTGame and winmm without listing ACE as an entry'
34+
Assert ($first.Output -match '已同步 1 项' -and $first.Output -match '实际加载') 'Normal UI reports actual Runtime outcome and requests in-game verification'
35+
$index=Open-AuroraIndex $game
36+
Assert ($index.Status -eq 'Applied' -and $index.Targets[0].Directory -eq $win -and $index.Targets[0].Proxy -eq 'winmm.dll') 'Automatic root resolution and disk deployment agree'
37+
Assert ((Get-AuroraHash (Join-Path $win 'OptiScaler.dll')) -eq $sourceHash -and (Get-AuroraHash (Join-Path $win 'winmm.dll')) -eq $sourceHash) 'Extracted core stays intact while a real Proxy is created'
38+
$journal=Open-AuroraJournal $index.Targets[0].JournalPath $game $win
39+
Assert (-not @($journal.Entries | Where-Object { $_.TargetPath -eq (Join-Path $win 'OptiScaler.dll') }).Count) 'Source extraction alone does not grant installer ownership of OptiScaler.dll'
40+
$again=RunEntry 'Aurora_Setup.bat' "`r`n`r`n"
41+
Assert ($again.ExitCode -eq 0 -and $again.Output -match '已同步 0 项,已是包内版本 1 项') 'Update runs the complete chain and reports an already-current Runtime'
42+
$remove=RunEntry 'Remove_Aurora.bat' "`r`n"
43+
Assert ($remove.ExitCode -eq 0 -and -not (Test-Path -LiteralPath (Join-Path $win 'winmm.dll')) -and (Test-Path -LiteralPath (Join-Path $win 'OptiScaler.dll'))) 'Actual Remove entry deletes owned Proxy and retains extracted source core'
44+
$sessions=@(Get-ChildItem -LiteralPath (Join-Path $ScratchRoot 'UserLocal\Aurora\Logs') -Directory)
45+
Assert ($sessions.Count -eq 3 -and @(Get-ChildItem -LiteralPath $sessions[0].FullName -File).Count -gt 1) 'Each real wrapper operation keeps its files in one managed log session'
46+
Finish 'INSTALL ENTRY'

0 commit comments

Comments
 (0)