Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .codacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Codacy (https://app.codacy.com): what it analyses. Rust lints (clippy, rustfmt)
# run in CI (.github/workflows/ci.yml) and block merges there; Codacy adds the
# overview, duplication, complexity, the other languages and test coverage.
exclude_paths:
# Generated from Cargo.lock (dev/third_party_licenses.py, checked in CI).
- "THIRD_PARTY_LICENSES.md"
- "crates/openrage-app/src/third_party_licenses.json"
# Name lists and lookup data, not code.
- "crates/rage-formats/src/meta_names.txt"
- "**/*.txt"
# Build output.
- "target/**"
- "plugins/target/**"
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,44 @@ jobs:
if: runner.os == 'Linux'
- run: cargo test

# Test coverage (Linux), reported to Codacy. Runs the same tests as `test`
# with coverage instrumentation; the upload needs the CODACY_PROJECT_TOKEN
# secret, which pull requests from forks do not get, so it is skipped there.
# The upload action is pinned to the commit of its v1.3.0 tag.
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install system libraries for the GUI (Slint, audio output)
run: |
sudo apt-get update
sudo apt-get install -y libfontconfig1-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libudev-dev libasound2-dev
- uses: dtolnay/rust-toolchain@stable
# rust-toolchain.toml pins the version; add the coverage tools to it.
- run: rustup component add llvm-tools
- uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov@0.9.2
- uses: Swatinem/rust-cache@v2
with:
key: coverage
workspaces: |
. -> target
plugins -> target
- run: cargo llvm-cov --workspace --locked --lcov --output-path lcov.info
# The token only reaches the upload: the tests and the build scripts of
# the dependencies run without it.
- name: Is there a Codacy token?
id: codacy
env:
TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: echo "present=$([ -n "$TOKEN" ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
- uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0
if: steps.codacy.outputs.present == 'true'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: lcov.info

# Every dependency must come under a GPL-3-compatible licence (deny.toml),
# and the generated licence list (THIRD_PARTY_LICENSES.md and the data the
# app shows) must match Cargo.lock.
Expand Down
40 changes: 26 additions & 14 deletions .github/workflows/release-bundle.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Release bundle

# One download with both the Linux and the Windows version, for mod sites
# that host a single file per release (GTA5-Mods, Nexus Mods, …).
# One download with every system's version, for mod sites that host a single
# file per release (GTA5-Mods, Nexus Mods, …).
#
# It runs after the Release workflow has published a tag's release: it takes
# that release's Linux .tar.gz and Windows .zip, unpacks them into `linux/`
# and `windows/` next to a short README and the license files, and attaches
# `openrage-<tag>-linux-windows.zip` to the same release (its checksum is
# added to SHA256SUMS.txt). Nothing is built again.
# that release's Linux .tar.gz, Windows .zip and, if there is one, the macOS
# .tar.gz (a preview, so it may be missing), unpacks them into `linux/`,
# `windows/` and `macos/` next to a short README and the license files, and
# attaches `openrage-<tag>-all-platforms.zip` to the same release (its
# checksum is added to SHA256SUMS.txt). Nothing is built again.
#
# "Run workflow" (manual) makes the bundle for an existing release tag; with
# "upload" off it is only kept as a workflow artifact, to check it first.
Expand Down Expand Up @@ -44,40 +45,51 @@ jobs:
steps:
# The default branch: it has the bundle README also for older tags.
- uses: actions/checkout@v5
- name: Download the Linux and Windows archives of the release
- name: Download the archives of the release
run: |
gh release view "$TAG" > /dev/null
mkdir -p dl
gh release download "$TAG" --dir dl \
--pattern "openrage-${TAG}-linux-x86_64.tar.gz" \
--pattern "openrage-${TAG}-windows-x86_64.zip" \
--pattern SHA256SUMS.txt
# macOS is a preview build and may be missing from a release.
gh release download "$TAG" --dir dl --pattern "openrage-${TAG}-macos-arm64.tar.gz" || true
(cd dl && sha256sum --check --ignore-missing SHA256SUMS.txt)
- name: Put both into one archive
- name: Put them into one archive
run: |
bundle="openrage-${TAG}-linux-windows"
bundle="openrage-${TAG}-all-platforms"
mkdir -p "$bundle" unpacked out
tar xzf "dl/openrage-${TAG}-linux-x86_64.tar.gz" -C unpacked
unzip -q "dl/openrage-${TAG}-windows-x86_64.zip" -d unpacked
mv "unpacked/openrage-${TAG}-linux-x86_64" "$bundle/linux"
mv "unpacked/openrage-${TAG}-windows-x86_64" "$bundle/windows"
systems="linux windows"
if [ -f "dl/openrage-${TAG}-macos-arm64.tar.gz" ]; then
tar xzf "dl/openrage-${TAG}-macos-arm64.tar.gz" -C unpacked
mv "unpacked/openrage-${TAG}-macos-arm64" "$bundle/macos"
systems="$systems macos"
fi
# The license files and README once, at the top.
for f in LICENSE LICENSE-AGPL-3.0 NOTICE.md README.md; do
mv "$bundle/linux/$f" "$bundle/$f"
rm -f "$bundle/windows/$f"
for s in $systems; do rm -f "$bundle/$s/$f"; done
done
# Releases before 0.3 have no THIRD_PARTY_LICENSES.md.
if [ -f "$bundle/linux/THIRD_PARTY_LICENSES.md" ]; then
mv "$bundle/linux/THIRD_PARTY_LICENSES.md" "$bundle/THIRD_PARTY_LICENSES.md"
rm -f "$bundle/windows/THIRD_PARTY_LICENSES.md"
for s in $systems; do rm -f "$bundle/$s/THIRD_PARTY_LICENSES.md"; done
fi
# Every file the archives held, and nothing else, ends up in the bundle.
for f in "$bundle"/linux/* "$bundle"/windows/*; do test -s "$f"; done
for s in $systems; do for f in "$bundle/$s"/*; do test -s "$f"; done; done
test -x "$bundle/linux/openrage-gui" && test -f "$bundle/windows/openrage-gui.exe"
if [ -d "$bundle/macos" ]; then test -x "$bundle/macos/openrage-gui"; fi
sed "s/{VERSION}/${TAG}/" packaging/BUNDLE-README.txt > "$bundle/README.txt"
# Without a macOS build, leave its part out of the README.
if [ ! -d "$bundle/macos" ]; then sed -i '/^ macos\//,/^$/d' "$bundle/README.txt"; fi
# Windows users open README.txt in Notepad: CRLF line ends.
sed -i 's/$/\r/' "$bundle/README.txt"
# -X: no Unix owner fields; Unix permissions stay, so the Linux files remain executable.
# -X: no Unix owner fields; Unix permissions stay, so the Linux and macOS files remain executable.
zip -q -r -X -9 "out/${bundle}.zip" "$bundle"
(cd out && sha256sum "${bundle}.zip" | tee "${bundle}.zip.sha256")
unzip -l "out/${bundle}.zip"
Expand All @@ -89,7 +101,7 @@ jobs:
- name: Attach the bundle to the release
if: env.UPLOAD == 'true'
run: |
bundle="openrage-${TAG}-linux-windows.zip"
bundle="openrage-${TAG}-all-platforms.zip"
grep -v " ${bundle}\$" dl/SHA256SUMS.txt > SHA256SUMS.txt || true
cat "out/${bundle}.sha256" >> SHA256SUMS.txt
gh release upload "$TAG" "out/${bundle}" SHA256SUMS.txt --clobber
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ edit game text and install `.oiv` packages — compatible with OpenIV's `mods` f

[![Website](https://img.shields.io/badge/website-two--play.github.io%2Fopenrage-c2410c.svg)](https://two-play.github.io/openrage/)
[![CI](https://github.com/Two-Play/openrage/actions/workflows/ci.yml/badge.svg)](https://github.com/Two-Play/openrage/actions/workflows/ci.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b51832dcb1464119ab0f48db6835ecbf)](https://app.codacy.com/gh/Two-Play/openrage/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Dev environment](https://github.com/Two-Play/openrage/actions/workflows/dev-env.yml/badge.svg)](https://github.com/Two-Play/openrage/actions/workflows/dev-env.yml)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-blue.svg)](LICENSE)
[![Rust 1.99](https://img.shields.io/badge/rust-1.99-orange.svg?logo=rust)](rust-toolchain.toml)
Expand Down
12 changes: 8 additions & 4 deletions packaging/BUNDLE-README.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
OpenRAGE {VERSION} - Linux and Windows
=====================================
OpenRAGE {VERSION} - Linux, Windows and macOS
=============================================

OpenRAGE is a free, open-source explorer and mod tool for RAGE engine games
(GTA V Legacy and Enhanced, GTA IV, Red Dead Redemption 2), the successor to
OpenIV. It works with OpenIV's "mods" folder and .oiv packages.

This archive contains both versions:
This archive contains the version for each system:

windows/ OpenRAGE for Windows 10/11 (x86_64)
Start openrage-gui.exe. No installation needed.
Expand All @@ -14,7 +14,11 @@ This archive contains both versions:
Start ./openrage-gui. openrage.desktop and openrage.png add it
to the application menu if you like.

Both folders also contain "openrage", the command-line tool, and "plugins"
macos/ OpenRAGE for macOS (Apple silicon), a preview
See README-macOS.txt: macOS blocks the unsigned programs
until you run "xattr -dr com.apple.quarantine ." there.

Every folder also contains "openrage", the command-line tool, and "plugins"
with three example plugins ("strings", "gxt2-patch" and "obj-tools"; MIT OR
Apache-2.0).
Plugins stay off until you turn them on in Settings > Plugins.
Expand Down
2 changes: 1 addition & 1 deletion site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Content lives in content/ (Markdown), layout in templates/, CSS/JS in static/.
base_url = "https://two-play.github.io/openrage"
title = "OpenRAGE"
description = "The free, open-source successor to OpenIV: mod GTA V and explore Red Dead Redemption 2 on Linux and Windows."
description = "The free, open-source successor to OpenIV: mod GTA V and explore Red Dead Redemption 2 on Linux, Windows and macOS."
default_language = "en"
compile_sass = false
build_search_index = false
Expand Down
10 changes: 5 additions & 5 deletions site/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# TOML note: plain keys must stay above the first [table] / [[list]] entry.
# Strings are Markdown (links, `code`, **bold**). Images are file names in docs/images/.
title = "OpenRAGE – the open-source OpenIV successor"
description = "OpenRAGE is the free, open-source successor to OpenIV: mod GTA V (Legacy and Enhanced) and explore Red Dead Redemption 2 on Linux and Windows, with OpenIV's mods folder and .oiv packages, plus undo."
description = "OpenRAGE is the free, open-source successor to OpenIV: mod GTA V (Legacy and Enhanced) and explore Red Dead Redemption 2 on Linux, Windows and macOS, with OpenIV's mods folder and .oiv packages, plus undo."

[extra]
# Small line above the headline.
eyebrow = "The open-source OpenIV successor"
# **bold** parts are shown in the accent colour.
headline = "The open modding toolkit for **RAGE engine** games"
# One short line under the headline; the longer description belongs in features_intro.
lead = "OpenIV's last release was in 2022. OpenRAGE picks up where it left off: same `mods` folder and `.oiv` packages, now open source, on Linux and Windows, ready for GTA V Enhanced and RDR2."
lead = "OpenIV's last release was in 2022. OpenRAGE picks up where it left off: same `mods` folder and `.oiv` packages, now open source, on Linux, Windows and macOS, ready for GTA V Enhanced and RDR2."
notice = """
OpenRAGE is an independent community project. It is not affiliated with or endorsed by Rockstar Games or Take-Two Interactive.
It is not made by or affiliated with the OpenIV team either.
Expand Down Expand Up @@ -200,8 +200,8 @@ text = "GPL-3.0: read, check and improve the code."

[[extra.reasons]]
icon = "🐧"
title = "Linux and Windows"
text = "Native on both, Steam and Proton installs included."
title = "Linux, Windows and macOS"
text = "Native on Linux and Windows, Steam and Proton installs included; macOS as a preview."

[[extra.reasons]]
icon = "🛠️"
Expand Down Expand Up @@ -239,7 +239,7 @@ edge = "openrage"
[[extra.compare]]
feature = "Operating systems"
openiv = "Windows"
openrage = "Linux and Windows"
openrage = "Linux, Windows and macOS (preview)"
edge = "openrage"

[[extra.compare]]
Expand Down
7 changes: 4 additions & 3 deletions site/content/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ A release: open a pull request from `develop` into `main`, merge it, then tag `m

## Releases

Releases are made by pushing a version tag on `main` (`git tag v0.2.0 && git push origin v0.2.0`, matching the version in `Cargo.toml`); the *Release* workflow builds both systems and publishes the release. It can also be run by hand from the Actions tab to build the archives without publishing.
Releases are made by pushing a version tag on `main` (`git tag v0.2.0 && git push origin v0.2.0`, matching the version in `Cargo.toml`); the *Release* workflow builds Linux, Windows and macOS (a preview: a failed macOS build does not stop the release) and publishes the release. It can also be run by hand from the Actions tab to build the archives without publishing.

Once a release is published, the *Release bundle* workflow adds `openrage-<tag>-linux-windows.zip`: both versions in one
download (`linux/`, `windows/`, a short `README.txt` and the license files), for mod sites that host one file per release.
Once a release is published, the *Release bundle* workflow adds `openrage-<tag>-all-platforms.zip`: every system's version
in one download (`linux/`, `windows/`, `macos/` if the release has a macOS build, a short `README.txt` and the license
files), for mod sites that host one file per release.
It reuses the release's archives instead of building again and adds its checksum to `SHA256SUMS.txt`. Run it by hand
(*Actions → Release bundle → Run workflow*) with a tag to make the bundle for an older release; with *upload* off it is
only kept as a workflow artifact.
Expand Down
2 changes: 1 addition & 1 deletion site/content/gta-vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ template = "gta-vi.html"
# **bold** parts are shown in the accent colour.
eyebrow = "Read-only preview"
headline = "Explore **GTA VI**"
lead = "Open RPF9 archives like folders, search the whole game and look at what is inside, on Linux and Windows."
lead = "Open RPF9 archives like folders, search the whole game and look at what is inside, on Linux, Windows and macOS."
features_title = "What you can do"
features_intro = "Everything is read from your own copy of the game. Nothing in it is changed."
screenshots_title = "Screenshots"
Expand Down
2 changes: 1 addition & 1 deletion site/content/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ toc = true
A plugin is a folder with a manifest (`plugin.toml`) and a WebAssembly component (`.wasm`). OpenRAGE runs it with
[wasmtime](https://wasmtime.dev/). The plugin sees only the files the user hands it, plus the game's files if the user
grants that (read-only). It has no access to other files, the network or the environment, and every call has a
memory and a time limit. The same `.wasm` runs on Linux and Windows.
memory and a time limit. The same `.wasm` runs on Linux, Windows and macOS.

> [!NOTE]
> The plugin API is at version **0.3** and may still change: plugins name the version they were built for and
Expand Down
Loading