From 983ba84449ff0cfe454b1082ffabe204f57f7c78 Mon Sep 17 00:00:00 2001 From: Martin Haye Date: Mon, 16 Oct 2023 11:59:19 -0700 Subject: [PATCH] Script to automate bundling the packer for Windows --- Platform/Apple/virtual/.gitignore | 1 + Platform/Apple/virtual/bundlePacker.sh | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 Platform/Apple/virtual/bundlePacker.sh diff --git a/Platform/Apple/virtual/.gitignore b/Platform/Apple/virtual/.gitignore index 11102298..3d64487c 100644 --- a/Platform/Apple/virtual/.gitignore +++ b/Platform/Apple/virtual/.gitignore @@ -5,3 +5,4 @@ correction* *.exe data/world/world* launch4j/ +packer-bundle* diff --git a/Platform/Apple/virtual/bundlePacker.sh b/Platform/Apple/virtual/bundlePacker.sh new file mode 100755 index 00000000..a1bd04c2 --- /dev/null +++ b/Platform/Apple/virtual/bundlePacker.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -euxo pipefail + +if [ "$#" -ne 1 ]; then + echo "Usage: bundlePacker.sh " + 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 \ No newline at end of file