From cdccb16251072d8d7016840f1d9a76885f4cee3c Mon Sep 17 00:00:00 2001 From: Cyd Date: Thu, 6 Aug 2026 00:24:36 -0500 Subject: [PATCH] Keep AUDIO.RES; a Windows ? matches nothing too The bank exclusion used AUDIO?.RES, which also swallowed AUDIO.RES - the one-byte stub that has been in the audio folder since 1995. A '?' in a Windows wildcard will match zero characters, not just one. Name the two banks instead of pattern-matching them. Co-Authored-By: Claude Opus 5 (1M context) --- pack-dist.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pack-dist.ps1 b/pack-dist.ps1 index 3517afb..2f9b8fe 100644 --- a/pack-dist.ps1 +++ b/pack-dist.ps1 @@ -106,7 +106,13 @@ foreach ($dir in 'AUDIO', 'GAUGE', 'VIDEO') { # engine's LoadSBK path died with the sound cards, and AUDIO.INI's # [AudioResources] section is commented out along with it. Shipping them adds # 7MB to every download for nothing. -Get-ChildItem "$dist\AUDIO" -Filter 'AUDIO?.RES' | Remove-Item +# +# Named explicitly, NOT matched with a wildcard: 'AUDIO?.RES' also catches +# AUDIO.RES, because a Windows '?' will happily match zero characters. +# +foreach ($bank in 'AUDIO1.RES', 'AUDIO2.RES') { + Remove-Item "$dist\AUDIO\$bank" -ErrorAction SilentlyContinue +} foreach ($file in 'RPDPL.INI', 'JOYSTICK.INI', 'RPL4.RES', 'TEST.EGG', 'libsndfile-1.dll', 'oalinst.exe') { Copy-Item (Join-Path $assets $file) $dist