Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
1e9e422
Removed logic to build/release a standalone flatpak file
TB516 Mar 3, 2026
c0cea6a
Add flatpal-node-generator workflow to create flatpak manifest module…
TB516 Mar 3, 2026
821e86d
Added script to skip packaging when building
TB516 Mar 3, 2026
062ee42
Added flatpak check to auto updater for safety
TB516 Mar 3, 2026
6b18f81
Updated flatpak-node-generator workflow to publish sources to release…
TB516 Mar 3, 2026
0716e2b
Removed workflow dispatch from flatpak-node-generator
TB516 Mar 3, 2026
0f627ec
Add main field to package.json pointing to electron-main.ts
TB516 Mar 3, 2026
665651d
Added images to docs folder for appstream metadata
TB516 Mar 5, 2026
193cf69
Added yarn release and yarn path to have a consistent yarn version as…
TB516 Mar 11, 2026
6775897
Updated build-unpackaged to be more clear and include electron binaries
TB516 Mar 11, 2026
e675e7b
Fix env var naming difference in quasar config
TB516 Mar 11, 2026
3f93abe
Reverted script name to unpacked to align with electron-builder
TB516 Mar 11, 2026
2ecfb6e
Merge branch 'ebkr:develop' into develop
TB516 Mar 11, 2026
08caf4c
Updated build unpacked script to specify linux
TB516 Mar 17, 2026
0607f7c
Merge branch 'ebkr:develop' into develop
TB516 Mar 17, 2026
21a30a3
Removed main from package.json
TB516 Mar 18, 2026
d96613c
Fixed import quotes in quasar config
TB516 Mar 18, 2026
66965c3
Updated all quotes to single quotes in quasar config
TB516 Mar 18, 2026
edeaa27
Added flatpak files to main repo
TB516 Mar 19, 2026
009d7fa
Removed yarn release from repo
TB516 Mar 19, 2026
145025a
Update flatpak node generator to commit updated file directly to repo
TB516 Mar 19, 2026
8d76306
Added commit message to flatpak-node-generator
TB516 Mar 19, 2026
cea0c1a
Updated flatpak-node-generator workflow to run on pushes where lockfi…
TB516 Mar 19, 2026
57bc370
Added extra workflow dispatch to flatpak-node-generator workflow
TB516 Mar 19, 2026
5e149eb
Update flatpak/generated-sources.json
TB516 Mar 19, 2026
f3d8f90
Removed .yarn dir and updated workflow to only commit generated sourc…
TB516 Mar 19, 2026
a7c37f3
Updated manifest to include its own yarn source
TB516 Mar 20, 2026
bf79bae
Changed the current manifest to a template and added a manifest gener…
TB516 Mar 20, 2026
9ff533b
Added scripts to generate the manifest
TB516 Mar 20, 2026
dd6b0ef
Updated manifest tooling to have default manifest in repo, and genera…
TB516 Mar 20, 2026
3ff9e89
Added flatpak job to release workflow to create flatpak release and u…
TB516 Mar 20, 2026
df7368e
Fix git error in release workflow hopefully
TB516 Mar 20, 2026
9ff9eea
Updated flatpak/README.md
TB516 Mar 21, 2026
be4941e
Updated flatpak/readme to include info on script
TB516 Mar 21, 2026
df48723
Fixed formatting in release workflow
TB516 Mar 21, 2026
f7d4b03
Added build flatpak workflow to ensure flatpak builds
TB516 Mar 21, 2026
c9ab3cc
Added comments to flatpak-node-generator workflow
TB516 Mar 26, 2026
92e1f63
Fixed YAML.parse to be in try catch
TB516 Mar 26, 2026
0cf1524
Updated gitignore
TB516 Mar 26, 2026
94d56d4
Replaced install-flatpak command with build-flatpak, and added flatpa…
TB516 Mar 26, 2026
fe4a8d9
Merge remote-tracking branch 'upstream/develop' into develop
TB516 Mar 27, 2026
9008d06
Update flatpak/generated-sources.json
TB516 Mar 27, 2026
9966f10
Removed electron-installer-flatpak dependency
TB516 Mar 27, 2026
44f7ef6
Update flatpak/generated-sources.json
TB516 Mar 27, 2026
006f51f
Delete flatpak/generated-sources.json
TB516 Apr 4, 2026
5efe5c8
updated gitignore
TB516 Apr 4, 2026
140b6dc
Updated mise.toml to include pipx
TB516 Apr 4, 2026
4ce652c
added running flatpak-node-generator yarn script to generate sources
TB516 Apr 4, 2026
d0e54aa
remove workflow
TB516 Apr 4, 2026
0f5a411
Update building.md
TB516 Apr 4, 2026
08ace1d
Added script to install flatpak-node-generator
TB516 Apr 4, 2026
c66649e
Update build/release workflows
TB516 Apr 4, 2026
b142743
Add uv to mise to install flatpak-node-generator
TB516 Apr 5, 2026
b274648
Merge branch 'ebkr:develop' into develop
TB516 Apr 5, 2026
43fc665
fixed flatpak-node-generator to use uv version
TB516 Apr 5, 2026
f6c80f4
updated flatpak building ci to use lighter base image
TB516 Apr 5, 2026
7a69a45
Removed explicit uv tool install in favor of just using uvx
TB516 Apr 5, 2026
bced53e
add test commands to build-flatpak workflow
TB516 Apr 6, 2026
c11b0ae
updated test commands for build-flatpak workflow
TB516 Apr 6, 2026
52d2cee
removed testing from build-flatpak workflow
TB516 Apr 6, 2026
35ec78b
Try pinning flatpak-node-generator version
TB516 Apr 6, 2026
782e9bd
test debug step
TB516 Apr 6, 2026
ed2e005
more workflow testing
TB516 Apr 6, 2026
81e6f7f
even more ci testing
TB516 Apr 6, 2026
3edecc1
fix attempt for flatpak-node-generator version being wrong
TB516 Apr 6, 2026
a17e90e
more workflow debugging
TB516 Apr 6, 2026
7ccafa5
more workflow debugging p2
TB516 Apr 6, 2026
f0bf5fe
final testing solution for workflow
TB516 Apr 6, 2026
187d531
reenable cache in flatpak build workflow
TB516 Apr 6, 2026
6744189
add python as mise dep that auto installs pipx
TB516 Apr 6, 2026
c31bb8d
update yarn script to use pipx
TB516 Apr 6, 2026
be7d068
add --install-deps-from flag to build-flatpak-repo script
TB516 Apr 6, 2026
21b6c7f
Revert workflow images to gnome based
TB516 Apr 6, 2026
8e94ecf
fix typo in container tag
TB516 Apr 6, 2026
67415b4
Revert workflows to offload building process to flatpak builder action
TB516 Apr 6, 2026
0f5f446
updated documentation files
TB516 Apr 6, 2026
d68ed44
Update flatpak/README.md
TB516 Apr 6, 2026
b6f1ffe
Update generate-release-manifest.js to find the local directory block…
TB516 Apr 6, 2026
3a1120e
Added flatpak release steps
TB516 Apr 8, 2026
f649e98
Updated finish args and meta info for having host filesystem access
TB516 Apr 9, 2026
1b6ddac
fixed script name in error log
TB516 Apr 9, 2026
2a3a67a
Update yarn lock to fix weird dependency differences
TB516 Apr 14, 2026
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
35 changes: 35 additions & 0 deletions .github/workflows/build-flatpak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Flatpak

on:
workflow_dispatch:

jobs:
build-flatpak:
name: Build the Flatpak app
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
options: --privileged
steps:
- uses: actions/checkout@v4

- uses: jdx/mise-action@v3
with:
install: true
cache: true
log_level: debug

- name: Install Yarn dependencies
run: yarn install --immutable

- name: Generate release manifest
run: yarn generate-release-manifest

- name: Generate node sources
run: yarn generate-node-sources

- name: Build flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: r2modman.flatpak
manifest-path: flatpak/io.github.ebkr.r2modman.release.yaml
24 changes: 3 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
- kind: windows
os: windows-latest
platform: win
- kind: flatpak
os: ubuntu-latest
platform: flatpak
# Macos-11 is deprecated, macos-12 would require package updates, see PR #1409
# - kind: mac
# os: macos-11
Expand All @@ -35,27 +32,12 @@ jobs:
- name: Install Yarn dependencies
run: yarn install --immutable

- if: matrix.platform == 'linux' || matrix.platform == 'flatpak'
- if: matrix.platform == 'linux'
name: Install bsdtar # Required by electron-builder when targeting pacman.
run: |
sudo apt-get update -y
sudo apt-get install -y libarchive-tools

- if: matrix.platform == 'flatpak'
name: Cache Flatpak runtimes
uses: actions/cache@v4
with:
path: ~/.local/share/flatpak
key: flatpak-${{ runner.os }}-25.08

- if: matrix.platform == 'flatpak'
name: Install Flatpak and flatpak-builder
run: |
sudo apt-get install -y flatpak flatpak-builder
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08
flatpak install --user -y flathub org.electronjs.Electron2.BaseApp//25.08

- name: Build project
id: build
uses: StarUbiquitous/command-output@v1.0.1 # Store stdout/stderr to outputs.
Expand All @@ -82,5 +64,5 @@ jobs:
name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: 'dist/electron/Packaged'
name: 'r2modman-${{ matrix.platform }}-build-${{ github.sha }}'
path: "dist/electron/Packaged"
name: "r2modman-${{ matrix.platform }}-build-${{ github.sha }}"
68 changes: 48 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
- kind: windows
os: windows-latest
platform: win
- kind: flatpak
os: ubuntu-latest
platform: flatpak
steps:
- uses: actions/checkout@v4

Expand All @@ -32,28 +29,12 @@ jobs:
- name: Install Yarn dependencies
run: yarn install --immutable

- if: matrix.platform == 'linux' || matrix.platform == 'flatpak'
- if: matrix.platform == 'linux'
name: Install bsdtar # Required by electron-builder when targeting pacman.
run: |
sudo apt-get update -y
sudo apt-get install -y libarchive-tools

- if: matrix.platform == 'flatpak'
name: Cache Flatpak runtimes
uses: actions/cache@v4
with:
path: ~/.local/share/flatpak
key: flatpak-${{ runner.os }}-25.08

- if: matrix.platform == 'flatpak'
name: Install Flatpak and flatpak-builder
run: |
sudo apt-get install -y flatpak flatpak-builder
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --user -y flathub org.freedesktop.Platform//25.08 org.freedesktop.Sdk//25.08
flatpak install --user -y flathub org.electronjs.Electron2.BaseApp//25.08

- name: Release project
id: build
uses: StarUbiquitous/command-output@v1.0.1
Expand All @@ -74,3 +55,50 @@ jobs:
uses: actions/github-script@v6
with:
script: core.setFailed('It seems the build process failed silently. See previous step for more info.')

release-flatpak:
name: Release for Flatpak
needs: release
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
options: --privileged
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: jdx/mise-action@v3
with:
install: true
cache: true
log_level: debug

- name: Install Yarn dependencies
run: yarn install --immutable

- name: Generate release manifest
run: yarn generate-release-manifest

- name: Generate node sources
run: yarn generate-node-sources

- name: Build flatpak
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: r2modman.flatpak
manifest-path: flatpak/io.github.ebkr.r2modman.release.yaml

- name: Compute release tag
id: tag
run: echo "tag=v$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"

- name: Mark checkout as safe for git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Append standalone flatpak to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ steps.tag.outputs.tag }}
run: |
gh release upload "$TAG_NAME" r2modman.flatpak --clobber
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ yarn-error.log*
log.txt
.env.json

flatpak/io.github.ebkr.r2modman.release.yaml
flatpak/repo
flatpak/build
.flatpak-builder
flatpak/r2modman.flatpak
flatpak/generated-sources.json

# Editor directories and files
.idea
.vscode
Expand Down
1 change: 1 addition & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Yarn
- Quasar CLI (Install using `yarn global add @quasar/cli`)
- Python 2
- pipx/flatpak-node-generator (if doing a local flatpak build)

#### Linux Build
- rpm builder
Expand Down
Binary file added docs/images/configeditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/downloadablemods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/gameselection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/installedmodview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/profiles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions flatpak/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*]
indent_style=space
indent_size=2
41 changes: 41 additions & 0 deletions flatpak/README.md
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be good to include a chain of steps involved in a release.

EG:

# Making a release

1. Update `io.github.ebkr.r2modman.metainfo.xml` with the new release information
2. ... Commands to run

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only extra step should be to update the metainfo.xml, but if there is a location that has the release steps, I'll update it real quick.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# r2modman Flatpak files

Files for the r2modman flatpak release. Contains all the files needed for a full Flathub release, or a standalone flatpak with a custom repository.

## Directory breakdown

- [`io.github.ebkr.r2modman.yaml`](./io.github.ebkr.r2modman.yaml) is the Flatpak manifest that contains the instructions to build the Flatpak
- This manifest is the one committed to git, and is used for local development, as it gets the source code from the filesystem

- [`io.github.ebkr.r2modman.release.yaml`](./io.github.ebkr.r2modman.release.yaml) is a generated version of the manifest that is used in CI runners
- This manifest fetches the source code from a git repository and commit hash, and thus should NOT be committed to the repo, as it would need to be frequently updated for each release

- [`io.github.ebkr.r2modman.metainfo.xml`](./io.github.ebkr.r2modman.metainfo.xml) is the appstream metadata used by storefronts
- This metadata is mostly self sufficient, but should have a new release block added before a release is made (this will probably be done when updating the changelog and bumping versions)

- [`io.github.ebkr.r2modman.desktop`](./io.github.ebkr.r2modman.desktop) is the .desktop file that is distributed with the Flatpak and used to launch the app

- [`io.github.ebkr.r2modman`](./io.github.ebkr.r2modman) is a launch script that is used to run the r2modman binary inside of the Flatpak

- [`generated-sources.json`](./generated-sources.json) is a list of the yarn dependencies, formatted so they can be fetched by yarn during build time
- This file shouldn't be committed to the repo
- Flatpaks don't have network access while building, so the files are fetched before building starts
- This file is regenerated automatically when building locally, but a manual regeneration can be triggered via `yarn generate-node-sources`

- [`generate-release-manifest.js`](./generate-release-manifest.js) is a small script to take the manifest that is in the git repo, and update the sources to pull from git instead of using the local file system
- This script does use the `yaml` package, which is already used by r2modman, but this means you need to have ran `yarn install` at least once


## Building locally

For building and installing locally, [Flatpak](https://flatpak.org/) and [Flatpak Builder](https://docs.flatpak.org/en/latest/flatpak-builder.html) are needed. For generating the node sources, `flatpak-node-generator` is invoked via pipx, so that is also needed. Additional tooling for linting related files can be gotten with the [`org.flatpak.Builder`](https://flathub.org/en/apps/org.flatpak.Builder) Flatpak.

### Building

To build and install the Flatpak, the `yarn build-flatpak` command can be ran from the repository root. This script uses the `flatpak-builder` cli, along with `flatpak`, so make sure they are installed.

### Linting

To lint the manifest, this command can be ran from the repository root: `flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest flatpak/io.github.ebkr.r2modman.yaml`. Some extra errors might come up due to the source code being fetched from a local directory, but this can be ignored as it is changed in the manifest used in CI.

To lint the appstream metainfo, this command can be ran from the repository root: `flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream flatpak/io.github.ebkr.r2modman.metainfo.xml`
33 changes: 33 additions & 0 deletions flatpak/RELEASE-FLATPAK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Flatpak release steps

There aren't many steps for the Flatpak/Flathub version to be released. The main steps to take are to prep the release, then, run the normal release workflow. This will trigger other workflows to generate a standalone Flatpak release (and eventually push to the Flathub repo).

## Preparation

This assumes that version text and changelog has been updated already.

The only preparation required is to add the new release to the [metainfo.xml file](./io.github.ebkr.r2modman.metainfo.xml).

Full documentation for the releases section can be found [here](https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines#release).

### Required steps

1. Go to the [metainfo.xml file](./io.github.ebkr.r2modman.metainfo.xml)
2. Navigate to the `releases` xml tag
3. Add a new `<release></release>` tag to the top of the list
1. In this release tag, add a `version` attribute, corresponding to the app version
2. Also in the release tag, add a `date` attribute, with the date of the release

Thats it!

### Optional steps

- Add a `<description></description>` tag
- Write a short description of the changes and paste them here
- Add a `<url type="details"></url>` tag with a link to the current changelog

## Release steps

Once the preparation is complete, then the release workflow can be ran, which will append a `.flatpak` file to the releases tag.

There will probably be more steps needed once a workflow to push to Flathub is added, but thats not currently implemented, so this documentation will be updated when its added.
91 changes: 91 additions & 0 deletions flatpak/generate-release-manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#!/usr/bin/env node

import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import YAML from 'yaml';

function fail(msg) {
console.error(msg);
process.exit(1);
}

function parseArgs(argv) {
const args = {
input: null,
output: null,
repo: null,
commit: null,
};

for (let i = 2; i < argv.length; i++) {
const arg = argv[i];

if (arg === '--input') args.input = argv[++i];
else if (arg === '--output') args.output = argv[++i];
else if (arg === '--repo') args.repo = argv[++i];
else if (arg === '--commit') args.commit = argv[++i];
else fail(`Unknown argument: ${arg}`);
}

if (!args.input || !args.output || !args.repo || !args.commit) {
fail(`
Usage:
node generate-release-manifest.js \
--input <path> \
--output <path> \
--repo <git-url> \
--commit <sha>
`);
}

return args;
}

const { input, output, repo, commit } = parseArgs(process.argv);

const raw = fs.readFileSync(input, 'utf8');

let manifest;

try {
manifest = YAML.parse(raw);
} catch {
fail('Invalid YAML manifest');
}

if (!Array.isArray(manifest.modules)) {
fail('Manifest missing "modules"');
}

const module = manifest.modules.find(
(m) => m && m.name === 'r2modmanPlus'
);

if (!module) {
fail('Could not find module "r2modmanPlus"');
}

if (!Array.isArray(module.sources) || module.sources.length === 0) {
fail('Module has no sources');
}

const dirIndex = module.sources.findIndex((source) => {
return source.type === "dir" && source.path === "..";
});


module.sources[dirIndex] = {
type: 'git',
url: repo,
commit: commit,
};

fs.mkdirSync(path.dirname(output), { recursive: true });
fs.writeFileSync(output, YAML.stringify(manifest), 'utf8');

console.log('Generated manifest:');
console.log(` Input: ${input}`);
console.log(` Output: ${output}`);
console.log(` Repo: ${repo}`);
console.log(` Commit: ${commit}`);
11 changes: 11 additions & 0 deletions flatpak/io.github.ebkr.r2modman
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

if [ -n "$WAYLAND_DISPLAY" ]; then
exec zypak-wrapper /app/r2modman \
--no-sandbox \
--enable-features=UseOzonePlatform \
--ozone-platform=wayland \
"$@"
else
exec zypak-wrapper /app/r2modman --no-sandbox "$@"
fi
10 changes: 10 additions & 0 deletions flatpak/io.github.ebkr.r2modman.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application

Name=r2modman
Comment=A simple and easy to use mod manager for many games using Thunderstore
Categories=Game;GameTool;

Icon=io.github.ebkr.r2modman
Exec=io.github.ebkr.r2modman
Terminal=false
Loading