Add JRE bundling for Windows, macOS, and Linux releases #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements automatic JRE bundling for cross-platform distribution of the Number Guessing Game, following the approach documented in the libgdx deployment guide. Users can now download and run the game on Windows, macOS, and Linux without needing to install Java separately.
Changes
New Packaging Scripts
Created three new packaging scripts that automatically download Eclipse Adoptium JRE 21 and bundle it with the application:
package-jre-windows.sh- CreatesNumberGuessingGame-windows.zip(~50MB)package-jre-macos.sh- CreatesNumberGuessingGame-macos.zip(~50MB)package-jre-linux.sh- CreatesNumberGuessingGame-linux.tar.gz(~50MB)Each script:
GitHub Actions Integration
Updated
.github/workflows/release.ymlto automatically build all three platform-specific packages on release creation. The workflow now uploads 6 artifacts to each GitHub Release:Existing artifacts:
app.jar- Standalone JAR (requires Java)archive.zip- Manual installation package (requires Java)numberguessinggame.deb- Debian package (requires Java)New artifacts:
NumberGuessingGame-windows.zip- Windows with bundled JRE ✨NumberGuessingGame-macos.zip- macOS with bundled JRE ✨NumberGuessingGame-linux.tar.gz- Linux with bundled JRE ✨Documentation Updates
Updated
README.mdto include:Build Artifact Management
Updated
.gitignoreto exclude:jre-windows/,jre-macos/,jre-linux/)Benefits
.deb, manual.zip) continue to workTesting
Notes
Linux users have multiple options:
The bundled JRE packages provide the best out-of-box experience for users who don't have Java installed.
Closes #[issue_number]
Original prompt
Fixes #56
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.