-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add flatpak builds #1230
feat: add flatpak builds #1230
Conversation
I went in a different route by trying to get the app to build for flatpak specifically, but it does seem to create some problems of its own, not to mention the considerable increase in build time (which is probably a concern with GitHub actions) |
@ZhenyaPav Heya. I've got a good idea of how I'd do this, but I'd love to see how you decided to do it. Making the Flatpak bundle takes a while already and I'd rather keep the builds short, as runners aren't cheap and if the project ever moves to something without free runners that would be an issue (which is why I'm also testing what amounts of caching works and what doesn't). I'll let you know when the PR is ready to merge and I'm open to any comments or suggestions. Yes, there's a CI generated Flatpak in the Linux zip of the runner artifacts on my fork. |
What I came up with is this:
I was able to build the flatpak with this, but it didn't launch due to |
Checked it out on Fedora Silverblue, seems to be working |
@ZhenyaPav Yeah, the idea of building it within the Flatpak runtime is nice for reproducibility, but it doesn't really add any security guarantees and it seems to add too much overhead (longer build times, more technical debt). Having it existing would be nice, however. I think someone in the community is attempting to do a build with Guix, that could potentially help.
I don't see any immediate issues but I'd imagine you need to (and should) use a full path in the |
making |
The sample Flatpak repo solution using flat-manager instead of GH pages took a lot of files and config to work, so I moved it and the accompanying docs to https://gitlab.com/Jabster28/flatman-haveno-test since I wasn't sure if it belonged here. |
@TheTollingBell has rebased the AppImage PR. Do you mind to squash your commits and rebase on the AppImage PR, so there are a total of two commits, please? Otherwise I can test / merge their AppImage PR, then you'll need to rebase your changes on master, but was hoping to see how both look together. |
Sure, and I'll try to minimise the number of commits afterwards. |
@Jabster28 The AppImage PR has been merged to master, so this is ready to rebase on master to resolve the merge conflict, then I can do final testing. |
Seems to install and work for me. Just needs a bit of testing and final looks over. |
@ZhenyaPav Maybe you want to review this? |
@@ -42,7 +48,7 @@ Haveno data folder on Mac: `/Users/<username>/Library/Application Support/Haveno | |||
6. Click "OK" to save the changes and exit the dialog box. | |||
7. Windows will download and install the required files and components to enable the .NET Framework 3.5. This may take several minutes, depending on your internet connection speed and system configuration. | |||
8. Once the installation is complete, you will need to restart your computer to apply the changes. | |||
2. Install Wix Toolset 3: https://github.com/wixtoolset/wix3/releases/tag/wix314rtm | |||
2. Install Wix Toolset 3: <https://github.com/wixtoolset/wix3/releases/tag/wix314rtm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add <>
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that was my automatic linter. MD034 says that some MarkDown parsers don't understand bare URLs and that angle brackets are the "proper" syntax to use.
</description> | ||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://files.catbox.moe/8pahgg.png</image> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be fetching this screenshot from a remote repo imo, which could become unavailable.
Can we read it locally from the desktop package instead, if it's useful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flatpak docs say that it needs a public URL, but we could just host it on the github and get a raw link to the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also good catch, almost forgot about this 😅
@Jabster28 Thanks very much for the update! Some changes requested and I think it's ready to merge. |
Edit: Nevermind, I rebased incorrectly, it's working :) |
The process is a little bit finicky at the moment, but the general idea is:
core/src/main/java/haveno/core/app/HavenoExecutable.java
with a janky regex--filesystem=
that matches the app name.deb
file (should use the app-image (not appimage) from jpackage in the future)If you're repackaging Haveno and would like to change the name and other things:
desktop/src/main/resources/images/task_bar_icon_windows.png
.exchange.haveno.Haveno
and replace them with something else (perhapsexchange.haveno.${APPNAME}
or something similar), as leaving them the same will cause issues with installs~/.local/share/${APPNAME}
, so ensure your app name isn't Steam or something commonfilesystem
to apersist
(the data will stay in Flatpak's sandbox instead of your home dir)desktop/package/linux/exchange.haveno.Haveno.yml
desktop/package/linux/exchange.haveno.Haveno.metainfo.xml
I've never used Gradle before and a lot of weird choices were from myself and Stack Overflow so if something looks wrong, please let me know.