v1.5.0: 게임 PC 앱이 발로란트 리플레이(.vrf)를 찾아 변환해 사이트 3D 재생기로 보냄
- 앱: %LOCALAPPDATA%\VALORANT\Saved 아래 <경기 ID>.vrf 를 찾아 gvr-replay.exe 로 변환, GVR-Data/replays/<경기 ID>.json.gz 로 보관 (원본 · 앱 버전이 같으면 다시 변환하지 않음) - GET /api/matches/:id/replay: gzip JSON, 처음 변환이 15초를 넘으면 202 converting, 실패 422 replay_failed(이유), 변환기 없음 500. GET /api/replays: 찾은 리플레이 목록 - 변환은 한 번에 하나, 낮은 우선순위. 실패한 파일은 다시 내려받을 때까지 다시 하지 않음 - 중계: content-encoding 이 있는 응답은 바이너리 조각으로 (gzip 이 깨지지 않게) - 사이트: 변환 중(202)이면 3초마다 다시 묻고 '변환하는 중' 표시, 변환 실패 안내 - 빌드: win-ci 가 .NET 10 SDK 로 gvr-replay.exe(단일 파일)를 만들어 resources/replay 에 넣고, 시험 리플레이로 변환기 · 포터블 앱 안 변환까지 확인 (smoke GVR_SMOKE_VRF) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -120,6 +120,46 @@ try {
|
||||
}
|
||||
|
||||
if ($Phase -eq 'full') {
|
||||
# 3D 리플레이 변환기 (v1.5.0~): .NET SDK 10 (없으면 받음) → ValorantReplayParser 고정 커밋 → win-x64 단일 exe
|
||||
$r['replay_build'] = Step 'replay_build' {
|
||||
$dn = 'C:\win-ci\dotnet'
|
||||
if (-not (Test-Path (Join-Path $dn 'dotnet.exe'))) {
|
||||
$inst = Get-File 'https://dot.net/v1/dotnet-install.ps1' 'dotnet-install.ps1'
|
||||
& powershell -NoProfile -ExecutionPolicy Bypass -File $inst -Channel 10.0 -InstallDir $dn
|
||||
}
|
||||
$env:DOTNET_ROOT = $dn
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
||||
$env:DOTNET_NOLOGO = '1'
|
||||
& (Join-Path $dn 'dotnet.exe') --version
|
||||
$tx = Join-Path $Repo 'tools\replay-extract'
|
||||
$vd = Join-Path $tx 'vendor\ValorantReplayParser'
|
||||
$pc = (Select-String -Path (Join-Path $tx 'fetch-parser.sh') -Pattern 'PARSER_COMMIT:-([0-9a-f]{40})').Matches[0].Groups[1].Value
|
||||
if (-not (Test-Path (Join-Path $vd '.git'))) { & git clone -q https://github.com/michel-giehl/ValorantReplayParser $vd }
|
||||
& git -C $vd fetch -q origin
|
||||
& git -C $vd checkout -q --force $pc
|
||||
# global.json 의 SDK 패치 버전 고정을 푼다 (fetch-parser.sh 와 같게)
|
||||
$gj = Join-Path $vd 'global.json'
|
||||
$j = Get-Content $gj -Raw | ConvertFrom-Json
|
||||
$j.sdk | Add-Member -NotePropertyName rollForward -NotePropertyValue 'latestFeature' -Force
|
||||
$j | ConvertTo-Json -Depth 5 | Set-Content $gj -Encoding UTF8
|
||||
"parser @ $(& git -C $vd rev-parse --short HEAD)"
|
||||
Push-Location $tx
|
||||
& (Join-Path $dn 'dotnet.exe') publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none -o out\win
|
||||
$c = $LASTEXITCODE
|
||||
Pop-Location
|
||||
if ($c -ne 0) { throw "dotnet publish exit $c" }
|
||||
$exe = Join-Path $tx 'out\win\gvr-replay.exe'
|
||||
if (-not (Test-Path $exe)) { throw 'gvr-replay.exe 없음' }
|
||||
"gvr-replay.exe $([math]::Round((Get-Item $exe).Length / 1MB, 1)) MB"
|
||||
# 실제 13.08 리플레이 변환 (호스트가 serve/ 에 둔 시험 파일, 없으면 건너뜀)
|
||||
$vrf = Join-Path $OutDir '4145f041-7d83-4785-ac4b-b532154f14a4.vrf'
|
||||
try { Invoke-WebRequest -Uri 'http://10.0.2.2:8099/gvr-test.vrf' -OutFile $vrf -UseBasicParsing -TimeoutSec 600 } catch { Remove-Item $vrf -Force -ErrorAction SilentlyContinue; "시험 리플레이 없음: $($_.Exception.Message)" }
|
||||
if (Test-Path $vrf) {
|
||||
$out = & $exe $vrf (Join-Path $OutDir 'replay.json')
|
||||
$out
|
||||
if ($LASTEXITCODE -ne 0) { throw "gvr-replay exit $LASTEXITCODE" }
|
||||
}
|
||||
}
|
||||
$r['app_build'] = Step 'app_build' {
|
||||
Push-Location (Join-Path $Repo 'app')
|
||||
& npm.cmd ci --no-audit --no-fund
|
||||
@@ -134,6 +174,9 @@ try {
|
||||
$exe = Get-ChildItem app\release\win-unpacked\GameVoiceRecorder.exe
|
||||
$data = Join-Path $OutDir 'smoke-data'
|
||||
Remove-Item $data -Recurse -Force -ErrorAction SilentlyContinue
|
||||
# 시험 리플레이가 있으면 앱 안의 변환기로 실제 변환까지 확인한다
|
||||
$vrf = Join-Path $OutDir '4145f041-7d83-4785-ac4b-b532154f14a4.vrf'
|
||||
if (Test-Path $vrf) { $env:GVR_SMOKE_VRF = $vrf } else { Remove-Item Env:GVR_SMOKE_VRF -ErrorAction SilentlyContinue }
|
||||
$p = Start-Process $exe.FullName -ArgumentList '--smoke', "--data-dir=$data" -PassThru -Wait
|
||||
Get-Content (Join-Path $data 'smoke.json') -ErrorAction SilentlyContinue
|
||||
if ($p.ExitCode -ne 0) { throw "app smoke exit $($p.ExitCode)" }
|
||||
|
||||
Reference in New Issue
Block a user