Don't compress NesCarts.xml when packaging

see #2939
This commit is contained in:
YoshiRulz 2021-09-30 18:39:06 +10:00
parent 340352eb69
commit 5f1d686475
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 1 additions and 15 deletions

View File

@ -6,5 +6,4 @@ find "output" -type f \( -wholename "output/EmuHawk.exe" -o -wholename "output/D
if [ "$1" = "windows-x64" ]; then rm "packaged_output/EmuHawkMono.sh"; fi
find "packaged_output/dll" -type f -name "*.xml" -exec rm "{}" \;
mkdir "packaged_output/Firmware"
cd "packaged_output/gamedb" && 7za a -t7z -mx9 "NesCarts.7z" "NesCarts.xml" && rm "NesCarts.xml" && cd "../.."
find "packaged_output" -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755

View File

@ -69,12 +69,6 @@ cd temp
rem Patch up working dir with a few other things we want
mkdir Firmware
rem compress nescart 7z
cd gamedb
..\..\7za a -t7z -mx9 NesCarts.7z NesCarts.xml
del NesCarts.xml
cd ..
rem Build the final zip
..\zip.exe -X -9 -r ..\%NAME% . -i \*
cd ..

View File

@ -55,14 +55,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
// notes: there can be multiple each of prg,chr,wram,vram
// we aren't tracking the individual hashes yet.
string xmlPath = Path.Combine(basePath, "NesCarts.xml");
string x7zPath = Path.Combine(basePath, "NesCarts.7z");
bool loadXml = File.Exists(xmlPath);
using var nesCartFile = new HawkFile(loadXml ? xmlPath : x7zPath);
if (!loadXml)
{
nesCartFile.BindFirst();
}
using HawkFile nesCartFile = new(Path.Combine(basePath, "NesCarts.xml"));
var stream = nesCartFile.GetStream();