Skip to content

Commit 39d09b2

Browse files
YoshiRulzvadosnaprimer
authored andcommitted
Refactor release package script, shrinking output slightly
more shrinking may be possible, but there are diminishing returns, especially when MAME is so big (#3505)
1 parent ab0baba commit 39d09b2

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

Dist/Package.sh

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
#!/bin/sh
22
set -e
3+
targetDir="packaged_output"
34
cd "$(dirname "$0")/.."
4-
rm -fr "packaged_output" && mkdir -p "packaged_output"
5-
find "output" -type f \( -wholename "output/EmuHawk.exe" -o -wholename "output/DiscoHawk.exe" -o -wholename "output/*.config" -o -wholename "output/defctrl.json" -o -wholename "output/EmuHawkMono.sh" -o -wholename "output/dll/*" -o -wholename "output/Shaders/*" -o -wholename "output/gamedb/*" -o -wholename "output/Tools/*" -o -wholename "output/NES/Palettes/*" -o -wholename "output/Lua/*" -o -wholename "output/Gameboy/Palettes/*" -o -wholename "output/overlay/*" \) -not -name "*.pdb" -not -name "*.lib" -not -name "*.pgd" -not -name "*.ipdb" -not -name "*.iobj" -not -name "*.exp" -not -wholename "output/dll/libsneshawk-64*.exe" -not -name "*.ilk" -not -wholename "output/dll/gpgx.elf" -not -wholename "output/dll/miniclient.*" -exec install -D -m644 "{}" "packaged_{}" \;
6-
if [ "$1" = "windows-x64" ]; then rm "packaged_output/EmuHawkMono.sh"; fi
7-
find "packaged_output/dll" -type f -name "*.xml" -exec rm "{}" \;
8-
mkdir "packaged_output/Firmware"
9-
find "packaged_output" -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755
5+
rm -fr "$targetDir" && mkdir -p "$targetDir"
6+
find "output" -type f \( -wholename "output/EmuHawk.exe" -o -wholename "output/DiscoHawk.exe" -o -wholename "output/*.config" -o -wholename "output/defctrl.json" -o -wholename "output/EmuHawkMono.sh" -o -wholename "output/dll/*" -o -wholename "output/Shaders/*" -o -wholename "output/gamedb/*" -o -wholename "output/Tools/*" -o -wholename "output/NES/Palettes/*" -o -wholename "output/Lua/*" -o -wholename "output/Gameboy/Palettes/*" -o -wholename "output/overlay/*" \) \
7+
-not -name "*.pdb" -not -name "*.lib" -not -name "*.pgd" -not -name "*.ipdb" -not -name "*.iobj" -not -name "*.exp" -not -name "*.ilk" \
8+
-not -wholename "output/dll/*.xml" -not -wholename "output/dll/libsneshawk-64*.exe" -not -wholename "output/dll/gpgx.elf" -not -wholename "output/dll/miniclient.*" \
9+
-exec install -D -m644 "{}" "packaged_{}" \;
10+
cd "$targetDir"
11+
mkdir "Firmware"
12+
if [ "$1" == "windows-x64" ]; then
13+
rm -f "EmuHawkMono.sh"
14+
cd "dll"
15+
rm -f "OpenTK.dll.config" \
16+
"libbizlynx.dll.so" "libbizswan.dll.so" "libblip_buf.so" "libbizhash.so" "libdarm.so" "libemu83.so" "libfwunpack.so" "libgambatte.so" "libLibretroBridge.so" "libquicknes.dll.so.0.7.0" "librcheevos.so" "libsameboy.so" "libmgba.dll.so" "libMSXHawk.so" "libwaterboxhost.so"
17+
else
18+
find . -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755
19+
cd "dll"
20+
rm -f "lua54.dll" \
21+
"mupen64plus-audio-bkm.dll" "mupen64plus-input-bkm.dll" "mupen64plus-rsp-cxd4-sse2.dll" "mupen64plus-rsp-hle.dll" "mupen64plus-video-angrylion-rdp.dll" "mupen64plus-video-glide64.dll" "mupen64plus-video-glide64mk2.dll" "mupen64plus-video-GLideN64.dll" "mupen64plus-video-rice.dll" "mupen64plus.dll" "octoshock.dll" \
22+
"bizlynx.dll" "bizswan.dll" "blip_buf.dll" "libbizhash.dll" "libdarm.dll" "libemu83.dll" "libfwunpack.dll" "libgambatte.dll" "libLibretroBridge.dll" "libquicknes.dll" "librcheevos.dll" "libsameboy.dll" "mgba.dll" "MSXHawk.dll" "waterboxhost.dll"
23+
fi

0 commit comments

Comments
 (0)