Script to automate bundling the packer for Windows

This commit is contained in:
Martin Haye 2023-10-16 11:59:19 -07:00
parent b9bd377408
commit 983ba84449
2 changed files with 24 additions and 0 deletions

View File

@ -5,3 +5,4 @@ correction*
*.exe
data/world/world*
launch4j/
packer-bundle*

View File

@ -0,0 +1,23 @@
#!/bin/bash
set -euxo pipefail
if [ "$#" -ne 1 ]; then
echo "Usage: bundlePacker.sh <versionNum>"
exit 1
fi
rm -f PackPartitions.exe
java -Djava.awt.headless=true -jar /Users/mhaye/plat/virtual/launch4j/launch4j.jar launch4j.cfg.xml
rm -rf bundle-tmp
mkdir bundle-tmp
cd bundle-tmp
unzip ../packer-bundle.zip
mv packer-bundle-* packer-bundle-$1
rm packer-bundle-$1/PackPartitions.exe
mv ../PackPartitions.exe packer-bundle-$1/PackPartitions.exe
zip -r packer-bundle-$1.zip *
cp packer-bundle-$1.zip ../packer-bundle.zip
cd ..
rm -r bundle-tmp