File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050 ./archive.zip
5151 ./NumberGuessingGame-windows.zip
5252 ./NumberGuessingGame-macos.zip
53- ./NumberGuessingGame-linux.tar.gz
53+ ./NumberGuessingGame-linux.tar.xz
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Download the platform-specific package with bundled JRE from the [latest release
4747
4848- ** Windows** : ` NumberGuessingGame-windows.zip ` (no Java installation required)
4949- ** macOS** : ` NumberGuessingGame-macos.zip ` (no Java installation required)
50- - ** Linux** : ` NumberGuessingGame-linux.tar.gz ` (no Java installation required)
50+ - ** Linux** : ` NumberGuessingGame-linux.tar.xz ` (no Java installation required)
5151
5252Extract the downloaded archive and run:
5353
@@ -183,7 +183,7 @@ Run the following scripts to create platform-specific packages with bundled JRE:
183183``` bash
184184./package-win.sh # Creates NumberGuessingGame-windows.zip
185185./package-macos.sh # Creates NumberGuessingGame-macos.zip
186- ./package-linux.sh # Creates NumberGuessingGame-linux.tar.gz
186+ ./package-linux.sh # Creates NumberGuessingGame-linux.tar.xz
187187```
188188
189189These packages include a bundled JRE and do not require Java to be installed on the target system. They are automatically built and uploaded to GitHub Releases via GitHub Actions.
Original file line number Diff line number Diff line change 11#! /bin/sh
22# Script to create a Linux package with bundled JRE for Number Guessing Game
33# This creates a self-contained package that doesn't require Java to be installed
4- # Output: NumberGuessingGame-linux.tar.gz
4+ # Output: NumberGuessingGame-linux.tar.xz
55
66# Exit immediately if any command fails
77set -e
@@ -16,6 +16,7 @@ ADOPTIUM_BASE_URL="https://api.adoptium.net/v3/binary/latest/8/ga"
1616# Clean up any previous builds
1717rm -rf ${PACKAGE_NAME}
1818rm -rf ${JRE_DIR}
19+ rm -f ${PACKAGE_NAME} .tar.xz
1920rm -f ${PACKAGE_NAME} .tar.gz
2021
2122# Build the application using Gradle
5859# Make the run script executable
5960chmod +x ${PACKAGE_NAME} /run.sh
6061
61- # Create the final tar.gz archive
62- echo " Creating tar.gz archive..."
63- tar -czf ${PACKAGE_NAME} .tar.gz ${PACKAGE_NAME} /
62+ # Create the final tar.xz archive with maximum compression
63+ echo " Creating tar.xz archive..."
64+ tar -cJf ${PACKAGE_NAME} .tar.xz ${PACKAGE_NAME} /
6465
6566# Clean up temporary directories
6667rm -rf ${PACKAGE_NAME}
6768rm -rf ${JRE_DIR}
6869
6970echo " "
70- echo " ✓ Linux package with bundled JRE created: ${PACKAGE_NAME} .tar.gz "
71+ echo " ✓ Linux package with bundled JRE created: ${PACKAGE_NAME} .tar.xz "
7172echo " "
Original file line number Diff line number Diff line change 5858# Make the run script executable
5959chmod +x ${PACKAGE_NAME} /run.sh
6060
61- # Create the final zip archive
61+ # Create the final zip archive with maximum compression
6262echo " Creating zip archive..."
63- zip -r ${PACKAGE_NAME} .zip ${PACKAGE_NAME} /
63+ zip -9 - r ${PACKAGE_NAME} .zip ${PACKAGE_NAME} /
6464
6565# Clean up temporary directories
6666rm -rf ${PACKAGE_NAME}
Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ jre\bin\java.exe -jar game.jar
5454@pause
5555EOF
5656
57- # Create the final zip archive
57+ # Create the final zip archive with maximum compression
5858echo " Creating zip archive..."
59- zip -r ${PACKAGE_NAME} .zip ${PACKAGE_NAME} /
59+ zip -9 - r ${PACKAGE_NAME} .zip ${PACKAGE_NAME} /
6060
6161# Clean up temporary directories
6262rm -rf ${PACKAGE_NAME}
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ copy scripts\run.sh NumberGuessingGame\run.sh
1717copy README.md NumberGuessingGame\README.txt
1818copy LICENSE NumberGuessingGame\LICENSE
1919
20- REM Create the ZIP archive using PowerShell
21- powershell -command " Compress-Archive -Path NumberGuessingGame -DestinationPath archive.zip -Force"
20+ REM Create the ZIP archive using PowerShell with maximum compression
21+ powershell -command " Compress-Archive -Path NumberGuessingGame -DestinationPath archive.zip -CompressionLevel Optimal - Force"
2222
2323REM Clean up temporary directory
2424rmdir /s /q NumberGuessingGame
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ cp -r scripts/run.sh NumberGuessingGame/run.sh
2222cp -r README.md NumberGuessingGame/README.txt
2323cp -r LICENSE NumberGuessingGame/LICENSE
2424
25- # Create the ZIP archive
26- zip -r archive.zip NumberGuessingGame/
25+ # Create the ZIP archive with maximum compression
26+ zip -9 - r archive.zip NumberGuessingGame/
2727
2828# Clean up temporary directory
2929rm -rf NumberGuessingGame
You can’t perform that action at this time.
0 commit comments