|
7 | 7 | ) |
8 | 8 | . (Join-Path $PSScriptRoot 'Aurora_Common.ps1') |
9 | 9 | . (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 |
11 | 11 | try { |
12 | 12 | $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 |
14 | 14 | Write-Host ' 正在自动检测游戏…' |
15 | 15 | if (-not $GameRoot -and ((Test-Path -LiteralPath (Join-Path $InstallDir 'OptiScaler\AuroraSetup\installation.json')) -or (Test-Path -LiteralPath (Get-AuroraIndexPath $InstallDir)))) { |
16 | 16 | $GameRoot=Resolve-AuroraDeploymentRoot $InstallDir |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | $GameRoot=Get-AuroraPath $GameRoot; Assert-AuroraGameRoot $GameRoot |
32 | | - $index=Open-AuroraIndex $GameRoot |
| 32 | + $index=Open-AuroraIndex $GameRoot -ForNewInstall:($Action -in @('Menu','Install','Repair')) |
33 | 33 | $localMeta=Join-Path $InstallDir 'OptiScaler\AuroraSetup\installation.json' |
34 | 34 | if (-not $index -and (Test-Path -LiteralPath $localMeta)) { |
35 | 35 | $savedMeta=Read-AuroraJson $localMeta |
|
43 | 43 | if ($GameExe -and -not @($candidates | Where-Object { $_.Path -ieq (Get-AuroraPath $GameExe) }).Count) { throw '指定 EXE 未通过安全筛选。' } |
44 | 44 | Write-Host (' ✓ 已检测到游戏:'+[IO.Path]::GetFileName($GameRoot)) -ForegroundColor Green |
45 | 45 | 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)) } |
47 | 47 | if ($candidates.Count -gt 3) { Write-Host ' 其余入口见详细报告。' } |
48 | 48 | if (-not $scan.Complete -or -not $candidates.Count) { Write-Host ' ! 当前不能安全安装;仍可选择恢复 / 卸载。' -ForegroundColor Yellow } |
49 | 49 | Write-Host ' ✓ 自动匹配 Proxy,保留现有配置,替换前备份' -ForegroundColor Green |
|
76 | 76 | if ($Action -in @('Install','Repair')) { |
77 | 77 | Write-Host "`n 正在备份并部署 Aurora…" |
78 | 78 | $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 核对实际加载。' |
81 | 84 | } elseif ($index -and $Action -in @('Restore','Remove')) { |
82 | 85 | $preserved=@(Remove-AuroraDeployment $index $report -RuntimeOnly:($Action -eq 'Restore')) |
83 | 86 | Write-Host "`n ✓ 已恢复可恢复的原版文件。" -ForegroundColor Green |
|
86 | 89 | } elseif ($index -and $Action -eq 'Check') { |
87 | 90 | foreach ($target in $index.Targets) { |
88 | 91 | 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') |
90 | 93 | Invoke-AuroraRuntimeTask Check $GameRoot $target.Directory $log $exe |
91 | 94 | Write-Host (' ✓ 诊断报告:'+$log) -ForegroundColor Green |
92 | 95 | } |
@@ -114,4 +117,5 @@ if (-not $NonInteractive) { |
114 | 117 | } |
115 | 118 | } |
116 | 119 | } |
| 120 | +$session.Lease.Dispose() |
117 | 121 | exit $exitCode |
0 commit comments