This is a repository for automatically packaging HMCL on macOS: it fetches the latest release of HMCL.jar from upstream, generates HMCL.app, and optionally packages it into a drag-and-drop installable HMCL.dmg.
- Upstream Project: The main HMCL program comes from the open-source project HMCL-dev/HMCL
- What This Repository Does: Only provides macOS packaging and bundling scripts (without modifying the upstream logic), making it easier for users to launch with a double-click or drag to install
Reminder: This repository does not commit
HMCL.jaror HMCL source code into the repository; during build, it downloads via GitHub API and caches in.cache/.
Run the following in the root directory of the repository:
make workflowIt will sequentially complete:
- Fetch the latest release via GitHub API and download
HMCL.jarto.cache/(skip if already downloaded) - Generate
HMCL.icnsfromicon/HMCL.png - Create
.output/HMCL.app(copy jar and icon toContents/Resources/) - Create
.output/HMCL.dmg(containingHMCL.app,Applicationssymlink, and documentation/license files)
-
Output Directory:
.output/HMCL.appHMCL.dmgHMCL.icns
-
Cache Directory:
.cache/HMCL-latest.jar: Fixed entry point (soft link pointing to cached jar filename)hmcl-latest.json: Records upstream release info used this time (liketag_name, download URLs, etc.)LICENSE-HMCL.txt: Upstream license text (downloaded and cached during build)
-
Only Download JAR (Cache):
make jar
-
Only Cache Upstream LICENSE:
make license
-
Only Generate icns / app / dmg:
make icon make app make dmg
-
Install to Local Applications (for testing, backs up existing saves):
make install-app
This repository assumes you are running on macOS and can use built-in system tools:
curl(download)jq(parse JSON returned by GitHub API)sips/iconutil(generate.icns)hdiutil(generate.dmg)make/bash
Among these, jq may need to be manually installed (e.g., using Homebrew):
brew install jqWhen running HMCL.app, the system needs to find java (script优先 uses /usr/libexec/java_home; otherwise, uses java in PATH).
If opening HMCL.app prompts "damaged" or "not secure", you can remove the quarantine attribute before opening:
xattr -rd com.apple.quarantine /Applications/HMCL.app- Scripts/Packaging Files in This Repository: Use
LICENSE(MIT License). - HMCL (Upstream): License terms are subject to HMCL-dev/HMCL; this repository includes when packaging DMG:
LICENSE-HMCL.txt(upstream license text)SOURCE_CODE.md(explains how to obtain corresponding source code bytag_name)HMCL-RELEASE.json(metadata of the release used this time)INSTALLATION.md(declaration and installation instructions)
This repository makes no modifications to the upstream program; packaged products are provided "as is" at your own risk.