diff --git a/docs/OPEN_ISSUES_FOR_TESTERS.txt b/docs/OPEN_ISSUES_FOR_TESTERS.txt index d85368d..97d4c48 100644 --- a/docs/OPEN_ISSUES_FOR_TESTERS.txt +++ b/docs/OPEN_ISSUES_FOR_TESTERS.txt @@ -7,9 +7,12 @@ ============================================================================= HOW TO REPORT: drop a line in Discord with the issue number and PASS / FAIL / what you saw. Screenshots and rough times help. - LOGS -- ONE CLICK: double-click SENDLOGS.bat in the game folder after the - session. ONE small zip lands on your Desktop -- attach that. This build - also names every shot fired in the log, so reports can name weapons. + LOGS -- ONE CLICK: CLOSE THE GAME, then double-click SENDLOGS.bat in the + game folder. ONE small zip lands on your Desktop -- attach that. It now + tells you the exact file it wrote; if it says SKIPPED, the game was still + running and holding that log. (Two of you hit errors last time -- both + causes are fixed, and it no longer claims success when it failed.) This + build also names every shot fired in the log, so reports can name weapons. SOUNDS: use the SOUNDBOARD zip's COPY button to reference an exact sound (that is how Oracle handed us the missile-alarm sample -- it worked). FIELD GUIDE: mark up your copy and send the file back. Oracle's return diff --git a/players/SENDLOGS.bat b/players/SENDLOGS.bat index 3e40112..b9d0386 100644 --- a/players/SENDLOGS.bat +++ b/players/SENDLOGS.bat @@ -5,15 +5,60 @@ rem Double-click me after a playtest. The zip lands on your DESKTOP as rem BTLOGS__.zip -- attach that one file in Discord. rem Collects: every session log, matchlog, and launch breadcrumb. Nothing rem is deleted or modified; this only makes a copy. +rem +rem Field-hardened 2026-08-15 after two testers hit different failures: +rem * ConstrainedLanguage mode (locked-down Windows) blocks .NET calls, so +rem [Environment]::GetFolderPath and [math]::Round are gone -- the Desktop +rem is resolved from environment variables and the size via -f formatting. +rem Compress-Archive ALSO fails there (it is a script module that calls +rem .NET internally), so the zip is made with Windows' native tar.exe and +rem Compress-Archive is only the fallback if tar is missing. +rem * A log still held open by a running BattleTech made Compress-Archive +rem abort the WHOLE zip. Files are now staged with Copy-Item first, so an +rem unreadable one is skipped and named instead of killing the run. +rem * The old script announced success unconditionally. It now only says +rem the zip is ready if the file actually exists. +rem ABOUT.txt (machine, date, folder, exe version) rides inside the zip so we +rem can tell WHICH BUILD a report came from. rem ========================================================================== cd /d "%~dp0" powershell -NoProfile -ExecutionPolicy Bypass -Command ^ + "$ErrorActionPreference = 'SilentlyContinue';" ^ "$d = Get-Date -Format yyyyMMdd_HHmm;" ^ - "$out = Join-Path ([Environment]::GetFolderPath('Desktop')) (\"BTLOGS_{0}_{1}.zip\" -f $env:COMPUTERNAME, $d);" ^ - "$files = Get-ChildItem -Path 'content\*.log','content\lastrun_*.txt','content\matchlog_*.txt','content\cdb_*.txt' -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -gt (Get-Date).AddHours(-36) };" ^ - "if (-not $files) { Write-Host 'No logs found -- run me from the BT411 folder (next to the content directory).'; exit 1 }" ^ - "Compress-Archive -Force -Path $files.FullName -DestinationPath $out;" ^ - "Write-Host ('Wrote ' + $out + ' (' + $files.Count + ' files, ' + [math]::Round((Get-Item $out).Length/1MB,1) + ' MB)');" + "$desk = $null;" ^ + "if ($env:OneDrive -and (Test-Path (Join-Path $env:OneDrive 'Desktop'))) { $desk = Join-Path $env:OneDrive 'Desktop' }" ^ + "elseif (Test-Path (Join-Path $env:USERPROFILE 'Desktop')) { $desk = Join-Path $env:USERPROFILE 'Desktop' }" ^ + "else { $desk = $PWD.Path };" ^ + "$out = Join-Path $desk ('BTLOGS_{0}_{1}.zip' -f $env:COMPUTERNAME, $d);" ^ + "$files = Get-ChildItem -Path 'content\*.log','content\lastrun_*.txt','content\matchlog_*.txt','content\cdb_*.txt' | Where-Object { $_.LastWriteTime -gt (Get-Date).AddHours(-36) };" ^ + "if (-not $files) { Write-Host ''; Write-Host ' No logs found -- run me from the BT411 folder (the one containing content).' -ForegroundColor Yellow; exit 1 };" ^ + "$stage = Join-Path $env:TEMP ('BTLOGS_' + $d);" ^ + "Remove-Item -Recurse -Force $stage;" ^ + "New-Item -ItemType Directory -Path $stage -Force | Out-Null;" ^ + "$kept = 0; $skip = @();" ^ + "foreach ($f in $files) { Copy-Item -LiteralPath $f.FullName -Destination $stage -Force; if (Test-Path (Join-Path $stage $f.Name)) { $kept = $kept + 1 } else { $skip += $f.Name } };" ^ + "$exe = Get-Item 'btl4.exe';" ^ + "$about = Join-Path $stage 'ABOUT.txt';" ^ + "Set-Content -Path $about -Value ('machine=' + $env:COMPUTERNAME);" ^ + "Add-Content -Path $about -Value ('packed=' + $d);" ^ + "Add-Content -Path $about -Value ('folder=' + $PWD.Path);" ^ + "if ($exe) { Add-Content -Path $about -Value ('btl4.exe built ' + $exe.LastWriteTime); if ($exe.VersionInfo.FileVersion) { Add-Content -Path $about -Value ('btl4.exe version ' + $exe.VersionInfo.FileVersion) } };" ^ + "if ($kept -eq 0) { Write-Host ''; Write-Host ' Could not read any log files -- close BattleTech, then run me again.' -ForegroundColor Red; exit 1 };" ^ + "Remove-Item -Force $out;" ^ + "Push-Location $stage;" ^ + "if (Get-Command tar.exe) { tar.exe -a -c -f $out * } ;" ^ + "Pop-Location;" ^ + "if (-not (Test-Path $out)) { Compress-Archive -Force -Path (Join-Path $stage '*') -DestinationPath $out };" ^ + "Remove-Item -Recurse -Force $stage;" ^ + "Write-Host '';" ^ + "if (Test-Path $out) { Write-Host (' ZIP READY: ' + $out) -ForegroundColor Green; Write-Host (' ' + $kept + ' files, ' + ('{0:N1}' -f ((Get-Item $out).Length/1MB)) + ' MB'); if ($skip.Count -gt 0) { Write-Host (' SKIPPED (still in use): ' + ($skip -join ', ')) -ForegroundColor Yellow; Write-Host ' Close BattleTech and run me again to include those.' -ForegroundColor Yellow } }" ^ + "else { Write-Host ' FAILED -- no zip was created.' -ForegroundColor Red; Write-Host ' Screenshot this window and send it to us.' -ForegroundColor Red; exit 1 }" +if errorlevel 1 goto :failed echo. -echo Attach the BTLOGS zip from your Desktop in Discord. Thanks! +echo Attach that BTLOGS zip in Discord. Thanks! +goto :done +:failed +echo. +echo Nothing was created -- see the message above. +:done pause