diff --git a/.github/ISSUE_TEMPLATE/crash_report.yml b/.github/ISSUE_TEMPLATE/crash_report.yml index f37e41e..59d7ee3 100644 --- a/.github/ISSUE_TEMPLATE/crash_report.yml +++ b/.github/ISSUE_TEMPLATE/crash_report.yml @@ -18,7 +18,7 @@ body: paste relevant log output here. you can find logs at: - **rmcl logs**: `~/.cache/rmcl/` (per-session files like `rmcl_2026-04-20_12-34-56.log`) - - **launch logs**: `~/.local/share/rmcl/instances/{instance}/.minecraft/logs/launches/` + - **launch logs**: `~/.local/share/rmcl/instances/{instance}/minecraft/logs/launches/` you can also view logs in the TUI via the log overlay or use `rmcl log` from the CLI. render: text diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index bbde2c9..bf7a286 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -230,12 +230,17 @@ jobs: env: PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}" ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}" - RELEASE_COMMIT: "${{ github.sha }}" CHANGELOG: "${{ steps.changelog.outputs.content }}" RELEASE_TAG: "${{ needs.plan.outputs.tag }}" APP_VERSION: "${{ fromJson(steps.host.outputs.manifest).releases[0].app_version }}" + PUBLISH_WINGET: "${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}" run: | + RELEASE_COMMIT="$(git rev-parse HEAD)" echo "$CHANGELOG" > $RUNNER_TEMP/notes.txt + WINGET_MANIFEST_NOTE="" + if [[ "$PUBLISH_WINGET" == true ]]; then + WINGET_MANIFEST_NOTE="The generated WinGet manifest is attached as \`winget-manifest-${APP_VERSION}.zip\` for local validation." + fi cat >> $RUNNER_TEMP/notes.txt <> "$GITHUB_OUTPUT" - echo "tag=$tag" >> "$GITHUB_OUTPUT" - - if [[ "$release" == true ]]; then - echo "releasing $tag (latest release: ${latest:-none})" - else - echo "Cargo.toml version $version is not newer than latest release v$latest; nothing to release" - fi + python3 scripts/release-version.py --check + python3 scripts/release-version.py "$version" - name: create tag if: steps.version.outputs.release == 'true' diff --git a/README.md b/README.md index 567e80c..a5211f3 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,13 @@ prebuilt archives are attached to each GitHub release. brew install objz/tap/rmcl ``` +Linux archives and Homebrew installations require the system `libxcb` runtime +package (`libxcb1` on Debian/Ubuntu, `libxcb` on Arch). + +An ARM64 launcher build still needs Minecraft natives for that platform. For +example, Minecraft 1.20.1 supplies macOS ARM64 natives but no Linux ARM64 natives; +using a custom GLFW library alone does not provide the other required libraries. + ### Windows release builds include a `.zip` archive and an `.msi`. WinGet packages are @@ -106,6 +113,7 @@ cargo install rmcl ### from source requires a Rust toolchain and a JDK (`javac` and `jar` on `PATH`). +Linux builds also require the libxcb development package (`libxcb1-dev` on Debian/Ubuntu, `libxcb` on Arch). ```sh git clone https://github.com/objz/rmcl.git @@ -124,10 +132,10 @@ settings, accounts, instances, and cached game metadata. | what | Linux | macOS | Windows | |---|---|---|---| | config (`config.toml`, `theme.toml`, `accounts.json`) | `~/.config/rmcl/` | `~/Library/Application Support/rmcl/` | `%APPDATA%\rmcl\` | -| instances | `~/.local/share/rmcl/instances/` | `~/Library/Application Support/rmcl/instances/` | `%LOCALAPPDATA%\rmcl\instances\` | -| metadata (versions, libraries, assets, loader profiles) | `~/.local/share/rmcl/meta/` | `~/Library/Application Support/rmcl/meta/` | `%LOCALAPPDATA%\rmcl\meta\` | +| instances | `~/.local/share/rmcl/instances/` | `~/Library/Application Support/rmcl/instances/` | `%APPDATA%\rmcl\instances\` | +| metadata (versions, libraries, assets, loader profiles) | `~/.local/share/rmcl/meta/` | `~/Library/Application Support/rmcl/meta/` | `%APPDATA%\rmcl\meta\` | -each instance has an `instance.json` for its config and a `.minecraft/` directory with the actual game files. +each instance has an `instance.json` for its config and a `minecraft/` directory with the actual game files. Launcher settings can be edited from the TUI or in `config.toml`. Changes to `instances_dir`, `meta_dir`, and `image_protocol` apply after restarting rmcl; @@ -169,7 +177,7 @@ launcher logs are per-session and contain rmcl's own output. instance launch log | what | Linux | macOS | Windows | |---|---|---|---| | launcher logs | `~/.cache/rmcl/` | `~/Library/Caches/rmcl/` | `%LOCALAPPDATA%\rmcl\` | -| instance launch logs | `//.minecraft/logs/launches/` | same | same | +| instance launch logs | `//minecraft/logs/launches/` | same | same | --- diff --git a/dist-workspace.toml b/dist-workspace.toml index bdbc3ca..0a3bde6 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -9,7 +9,7 @@ tap = "objz/homebrew-tap" targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"] install-path = "CARGO_HOME" publish-jobs = ["homebrew", "./publish-crates", "./publish-aur", "./publish-winget"] -github-custom-job-permissions = { publish-crates = { contents = "read" }, publish-aur = { contents = "read" }, publish-winget = { contents = "read" } } +github-custom-job-permissions = { publish-crates = { contents = "read" }, publish-aur = { contents = "read" }, publish-winget = { contents = "write" } } github-build-setup = "../dist-build-setup.yml" hosting = "github" install-updater = false diff --git a/pkg/rmcl-bin/PKGBUILD b/pkg/rmcl-bin/PKGBUILD index f8ce80f..86d68c0 100644 --- a/pkg/rmcl-bin/PKGBUILD +++ b/pkg/rmcl-bin/PKGBUILD @@ -6,7 +6,7 @@ pkgdesc="Minecraft launcher TUI" arch=('x86_64' 'aarch64') url="https://github.com/objz/rmcl" license=('GPL-3.0-only') -depends=() +depends=('libxcb') provides=('rmcl') conflicts=('rmcl' 'rmcl-git' 'mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git') replaces=('mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git') diff --git a/pkg/rmcl-git/PKGBUILD b/pkg/rmcl-git/PKGBUILD index fdb8623..c36e1c5 100644 --- a/pkg/rmcl-git/PKGBUILD +++ b/pkg/rmcl-git/PKGBUILD @@ -6,7 +6,7 @@ pkgdesc="Minecraft launcher TUI" arch=('x86_64' 'aarch64') url="https://github.com/objz/rmcl" license=('GPL-3.0-only') -depends=() +depends=('libxcb') makedepends=('git' 'rust' 'cargo' 'jdk-openjdk') provides=('rmcl') conflicts=('rmcl' 'rmcl-bin' 'mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git') @@ -36,7 +36,7 @@ check() { package() { cd "$srcdir/rmcl" - install -Dm755 "target/release/rmcl" "$pkgdir/usr/bin/rmcl" + install -Dm755 "$srcdir/target/release/rmcl" "$pkgdir/usr/bin/rmcl" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" } diff --git a/pkg/rmcl/PKGBUILD b/pkg/rmcl/PKGBUILD index 63a315e..9fff590 100644 --- a/pkg/rmcl/PKGBUILD +++ b/pkg/rmcl/PKGBUILD @@ -6,7 +6,7 @@ pkgdesc="Minecraft launcher TUI" arch=('x86_64' 'aarch64') url="https://github.com/objz/rmcl" license=('GPL-3.0-only') -depends=() +depends=('libxcb') makedepends=('rust' 'cargo' 'jdk-openjdk') provides=('rmcl') conflicts=('rmcl-bin' 'rmcl-git' 'mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git') @@ -31,7 +31,7 @@ check() { package() { cd "$srcdir/rmcl-${pkgver}" - install -Dm755 "target/release/rmcl" "$pkgdir/usr/bin/rmcl" + install -Dm755 "$srcdir/target/release/rmcl" "$pkgdir/usr/bin/rmcl" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" } diff --git a/scripts/release-version.py b/scripts/release-version.py new file mode 100644 index 0000000..cca6ed8 --- /dev/null +++ b/scripts/release-version.py @@ -0,0 +1,54 @@ +# SPDX-FileCopyrightText: 2026 Constantin Bauer +# SPDX-License-Identifier: GPL-3.0-only + +import os +import re +import subprocess +import sys + + +def version_key(value): + match = re.fullmatch( + r"(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)" + r"(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?" + r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?", + value, + ) + if match is None: + return None + pre = match[4].split(".") if match[4] is not None else [] + if any(part.isdigit() and len(part) > 1 and part.startswith("0") for part in pre): + return None + return tuple(map(int, match.groups()[:3])) + ( + match[4] is None, + tuple((0, int(part)) if part.isdigit() else (1, part) for part in pre), + ) + + +def check(): + chain = "1.0.0-alpha 1.0.0-alpha.1 1.0.0-alpha.beta 1.0.0-beta 1.0.0-beta.2 1.0.0-beta.11 1.0.0-rc.1 1.0.0".split() + assert all(version_key(a) < version_key(b) for a, b in zip(chain, chain[1:])) + assert version_key("1.0.0+build2") == version_key("1.0.0+build1") + assert all(version_key(v) is None for v in ["01.0.0", "1.0.0-01", "1.0.0-alpha..1"]) + assert version_key("0.5.1") > version_key("0.5.1-rc.1") + assert version_key("0.5.1-rc.10") > version_key("0.5.1-rc.9") + + +if __name__ == "__main__": + if sys.argv[1:] == ["--check"]: + check() + else: + version = sys.argv[1] + candidate = version_key(version) + if candidate is None: + sys.exit(f"Invalid package version: {version}") + versions = [ + (key, tag[1:]) + for tag in subprocess.check_output(["git", "tag", "--list", "v*"], text=True).splitlines() + if (key := version_key(tag[1:])) is not None + ] + latest_key, latest = max(versions, default=(None, "")) + release = latest_key is None or candidate > latest_key + with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output: + output.write(f"release={str(release).lower()}\ntag=v{version}\n") + print(f"v{version}: release={str(release).lower()}, latest={latest or 'none'}")