-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support files for Flatpak builds #3723
Conversation
One thought about the application identifier: probably it should be |
I have added AppStream metadata:
|
the application ID should definitely be im.vector.Riot - Riot's not made by Matrix.org but Vector. (Matrix.org is the non-profit; Vector is a separate startup building apps & services on top of Matrix). This is looking really good. We can provide some 'official' screenshots and check the description field once you're ready for the PR to be reviewed and landed :) |
I have just added a few changes:
|
@aperezdc is there anything to be done on this other than screenshots from us? |
@ara4n From my hitlist above, there are only two things missing: Making CI do Flatpak builds, and making a Flatpak repository available. Probably we can just merge this PR, and skip these two for now. I think that figuring out how to provide a Flatpak repository for people to use can be done separately and shouldn't keep this from being merged. Probably it needs some discussion before and it may take a while to set up something. As for the CI, would it make sense to make Travis-CI do also Flatpak builds? I suppose it's fine to skip this, but it would be nice to have. So far I haven't had some free time to sit down to figure out how to get |
You might want to have a look at Flathub. However I'm not sure if this is already ready for real usage. https://github.com/flathub/flathub/wiki |
Packager for Flathub here. So the main blocker at a glance is you currently pass |
As for Travis CI, that won't be easy because Travis is too old for Flatpak and running |
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.
electron has been moved to electron_app
so these new files will need moving accordingly
Type=Application | ||
Icon=im.vector.Riot | ||
StartupWMClass="Riot" | ||
Categories=Network;InstantMessaging;Chat;IRCClient |
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.
This doesn't match the cats being used in the Linux app, (though Chat should be in them and I missed it)
i.e remove IRCClient
I have added a couple of commits to move the files under Could we merge this as it is now for a first pass, and then improve things in follow-up PRs if needed? |
Install the dependency base Electron bundle with: flatpak --user remote-add endless-electron-apps --from \ https://s3-us-west-2.amazonaws.com/electron-flatpak.endlessm.com/endless-electron-apps.flatpakrepo flatpak --user install endless-electron-apps io.atom.electron.BaseApp then Riot can be built and saved to a Flatpak repository with: flatpak-builder --repo=flatpak-repo flaptak-build electron/build/im.riot.Riot.json and installed locally for testing with: flatpak --user remote-add --no-gpg-verify riot-local file://`pwd`/flatpak-repo flatpak --user install riot-local im.riot.Riot flatpak run im.riot.Riot
NodeJS is built and installed only to be able to build Riot. The generated Electron application does not need it to be installed at runtime, therefore we can instruct flatpak-builder to zap all the files of the module.
This is needed for Flatpak packages to appear in software centers like GNOME Software.
This is needed for Electron's unique instance checks. Without this, re-launching the application brings up a new instance, instead of the already running one.
Allow talking over to the notification daemon over D-Bus from inside the sandbox makes desktop notifications work.
Updated to build v0.12.2, and also fixed the paths ( |
This looks nice, although I'm struggling to find any kind of docs on what the various options in the manifest are and the --share options seems to make no appearance in the flatpak-builder man page (I'm assuming it allows network access for the build process so npm can download the rest of the deps?) Main thing here is wondering if this would be better in its own repo? ie. the same layout as a build hosted on flathub (see https://github.com/flathub/org.blender.Blender or indeed https://github.com/flathub/im.riot.Riot) If that sounds good, I can pull all this out into its own repo. |
"finish-args": [ | ||
"--device=dri", | ||
"--filesystem=home", | ||
"--filesystem=/tmp", |
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.
You should set $TMPDIR
at runtime to $XDG_CACHE_HOME
|
{ | ||
"type": "file", | ||
"path": "flatpak-Makefile", | ||
"dest-filename": "Makefile" |
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.
In general these are avoided these days. You can do:
{
"name": "riot-web",
"buildsystem": "simple",
"build-commands": [
"install -Dm644 foo /app/share/foo",
"etc"
]
}
@TingPing thanks! I had completely failed to realise |
@dbkr |
Is anyone still working on this PR? |
I think this is superseded by element-hq/element-desktop#293 |
This is a working proof of concept, but I want to share it to request feedbackIn particular, I would like to iron out at least the following:
im.riot.Riot
, but maybe something else is more appropriate (comments welcome).im.vector.Riot
as per Matthew's comment.Install the dependency base Electron bundle with:
then Riot can be built and saved to a Flatpak repository with (it takes a bit, it will build NodeJS inside the Flatpak sandbox):
and installed locally for testing with:
flatpak --user remote-add --no-gpg-verify \ riot-local file://`pwd`/flatpak-repo flatpak --user install riot-local im.riot.Riot flatpak run im.riot.Riot