From 00e9e3b2a72eb246647f64812d78d0ef072b663a Mon Sep 17 00:00:00 2001 From: OMGeeky <> Date: Sun, 16 Feb 2025 00:01:27 +0100 Subject: [PATCH] Enhance package.sh to support platform-specific archive creation using PowerShell on Windows --- packaging/package.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/package.sh b/packaging/package.sh index 0b0a2fc..2d688fa 100755 --- a/packaging/package.sh +++ b/packaging/package.sh @@ -107,7 +107,13 @@ cp -f "${JAR_LOCATION}" "${PACKAGING_DIR}/common/ATCS.jar" # Copy JAR to version # --- Create archive --- cd "${PACKAGING_DIR}" || exit echo "Creating archive" -zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs +if [ "$PLATFORM" = "WINDOWS" ]; then + # Use PowerShell's Compress-Archive which is available by default on Windows + powershell.exe -Command "Compress-Archive -Path './common/*' -DestinationPath './ATCS_${VERSION}.zip' -Force" +else + # Use zip command on Linux + zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs +fi echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.zip" cd "${PACKAGING_DIR}" || exit