Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

build: add flatpak build via electron-forge#1130

Merged
eliandoran merged 8 commits intodevelopfrom
build_add-flatpak-electron
Feb 7, 2025
Merged

build: add flatpak build via electron-forge#1130
eliandoran merged 8 commits intodevelopfrom
build_add-flatpak-electron

Conversation

@pano9000
Copy link
Copy Markdown
Contributor

@pano9000 pano9000 commented Feb 6, 2025

Hi,

this PR adds the ability to build a Flatpak package via Github CI using electron-forge.
arm64 support is currently broken, but a PR is opened at electron-forge, to fix that issue.

What we might need to agree still:
is the ID I've used here "acceptable"?
com.github.triliumnext.notes

The original Trilium was using com.github.zadam.trilium

this closes TriliumNext/Trilium#5078

previously it was defaulting to an EOL version of the Platform/SDK

Explicitly setting it to 24.08 however makes the build fail, because it defaults to using an outdated "zypak" module, so we need to explicitly mention the latest version here too
arm64 currently is broken due to a bug in electron-forge's maker-flatpak, but PR with a fix was submitted already
@pano9000
Copy link
Copy Markdown
Contributor Author

pano9000 commented Feb 6, 2025

one tiny thing I still need to do there as well: kinda "hack" my fix for arm64 into the workflow, as we don't know how fast the change will land in upstream.
If I don't add this "temporary workaround" the arm64 build workflow will fail fully, and we won't have any built arm64.

I will commit tomorrow morning (should be a matter of a small sed command to make the changes "on the fly".)

currently required, because Flatpak arm64 build currently fails – and if it fails, the remaining builds (deb, rpm, zip) fail as well, as they are created in the same run.
once the fix is released in the next electron-forge, we can get rid of this again.
@pano9000 pano9000 marked this pull request as ready for review February 7, 2025 07:25
@pano9000
Copy link
Copy Markdown
Contributor Author

pano9000 commented Feb 7, 2025

temporary fix commited and builds fine for both x64 and arm64 on my fork :-)

grafik

You can find the files here:
https://github.com/pano9000/TriliumNextNotes/releases/tag/test-workflow-flatpak

they seem to install and work fine on my Ubuntu system:

grafik

will keep an eye on the upstream PR and monitor, when it will be part of the next electron-forge release, so that we can get rid of the temporary fix again.

Copy link
Copy Markdown
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

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

:shipit:

@eliandoran eliandoran merged commit 97b7033 into develop Feb 7, 2025
5 checks passed
@eliandoran eliandoran deleted the build_add-flatpak-electron branch February 7, 2025 16:13
@eliandoran
Copy link
Copy Markdown
Contributor

@pano9000 , we'll go for com.triliumnext.notes instead as we own the domain. Not very fond of GitHub-based names.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate Flatpak builds

2 participants