-
Notifications
You must be signed in to change notification settings - Fork 10
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
Flatpak package and Flathub publication #86
Comments
Sounds like a good idea to me! I'm not really a linux user myself. Is this something you're knowledgeable on / would mind helping out with? |
No, infortunately I haven't done anything like this before. But I'll try looking into it, my guess is that it shouldn't be too difficult. |
Alright, I did some initial research and I'm trying to throw a manifest together. I have a question tho. Would you like to publish the finished application on Flathub yourself? Flathub's policy is that users are allowed to submit applications that they're not the developer of. https://docs.flathub.org/docs/for-app-authors/submission#theres-an-app-that-id-like-to-see-on-flathub-but-im-not-the-developer But it seems that having the developer publish the application is preferred. https://docs.flathub.org/docs/for-app-authors/submission#someone-else-has-put-my-app-on-flathubwhat-do-i-do This is still in the future, the manifest is nowhere near ready yet. I just wanted to shoot this question out beforehand. I'm hoping this might not even matter because once a repository in https://github.com/flathub has been created the publisher gets write permissions and I hope more people can be invited to also have write access. This way we could both manage the application on Flathub. https://docs.flathub.org/docs/for-app-authors/submission/#after-submission |
I have no strong preferences about being the primary publisher. If you or anybody else want to help out here, I'd be quite pleased! That's why Tangent is open source now. |
I might have spoken too soon 😅 Tangent being an Electron app using In case anyone wants to pick this up, feel free to do so. I'll post an update if I manage to get any further, but my hopes aren't so high anymore 😔 This is what I have so far: id: io.github.suchnsuch.Tangent
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
base: org.electronjs.Electron2.BaseApp
base-version: '23.08'
sdk-extensions:
- org.freedesktop.Sdk.Extension.node18
# Electron doesn't use a traditional locale format
separate-locales: false
writable-sdk: true
command: run.sh
finish-args:
- --device=dri
- --share=ipc
- --socket=x11
- --socket=pulseaudio
# Probably not needed
#- --share=network
- --filesystem=home
modules:
- name: tangent
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node18/bin
env:
NPM_CONFIG_LOGLEVEL: info
XDG_CACHE_HOME: /run/build/tangent/flatpak-node/cache
npm_config_cache: /run/build/tangent/flatpak-node/npm-cache
npm_config_nodedir: /usr/lib/sdk/node18
npm_config_offline: 'true'
subdir: main
sources:
- type: git
url: https://github.com/suchnsuch/Tangent
tag: tangent-v0.7.6
- type: script
dest-filename: run.sh
commands:
- zypak-wrapper.sh /app/main/electron-sample-app "$@"
#- type: file
# path: io.github.suchnsuch.Tangent.desktop
#- type: file
# path: io.github.suchnsuch.Tangent.svg
#- type: file
# path: io.github.suchnsuch.Tangent.metainfo.xml
build-commands:
# build linux
- npm install --offline
# install
#- install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ io.github.suchnsuch.Tangent.svg
#- install -Dm644 -t /app/share/applications io.github.suchnsuch.Tangent.desktop
#- install -Dm644 -t /app/share/metainfo io.github.suchnsuch.Tangent.metainfo.xml
#- install -Dm755 -t /app/bin/ run.sh |
Does recursive mode help at all? What kind of errors are you getting? |
Initially I had an issue with the Typewriter fork, but that was my fault. I didn't realize it was a submodule and that it isn't cloned by default. Now I cloned the Tangent repo at version 0.7.6 including the submodules ( I'm getting
|
I think this could be a forgotten package in the
|
I tried looking around, but I don't know where that URL comes from. |
That looks like it's trying to pull binaries for the development dependencies. Playwright is used for automated testing.
After doing some poking around, you might be hitting this issue? |
Yes, that seems to be it exactly. Nice find. Regarding |
Ah! I should probably do a package update to refresh |
If you do so, could you please backport it to the |
Hmm.. would it be kosher to move ahead with the v0.8.x version as a test case and release on Flathub when v0.8 is ready? |
They only have a policy that says no unstable releases, so I'd say yes. We can work with 0.8.x and release the package along with 0.8. |
I was kinda hoping they would have fixed that error in After manually removing the missing |
Alright, I've run into another thing. Every time I try to build the Flatpak, I get to I tried building https://github.com/flathub/electron-sample-app as well, but I get the same result. I've also tried to build the Flatpak in a privileged Docker container to make sure this isn't an issue specific to Arch or my system install. The only related issue I was able to find is flathub/com.visualstudio.code-oss#78, but that's pretty old and was solved by using a newer |
Nevermind, that issue was caused by the |
I have great news, I was finally able to build and run Tangent in a Flatpak! Now it's just a matter of going through the Flathub guidelines and making sure it passes them. I'll post a link to the Flatpak packaging repo here once it's at least somewhat ready. |
I was also able to test Tangent on a mobile phone. I couldn't before because it runs Alpine and Alpine doesn't exactly see eye-to-eye with AppImages. Likely because it uses musl. Now with the Flatpak it works flawlessly. Tangent even scales down pretty nicely. The note takes up a lot of horizontal space, forcing the user to scroll. Works great in landscape mode tho. Just thought I'd share. |
This is awesome news! Thank you for all your hard work! Using it with a phone is pretty interesting. Try turning down the "min panel width" in the settings. That should help! |
I did have to make some changes in this repo as well, I'll open a PR for those. |
@taylorhadden Here are the Flatpak sources in their current state, I recommend looking at the Metainfo file, it contains most of the metadata that will be visible on Flathub and in stores. I wasn't able to find a .desktop file in the main repo, so I made one as well. The .desktop file and Metainfo are the two main things where I could have made a mistake, I encourage you to check both and let me know it you don't like something or if you'd like something added. |
This is super cool! I'll take a look at the description. |
@taylorhadden I have one issue to report and that's that the spell-checking doesn't seem to work. Does Tangent use some kind of system-wide dictionary that could be missing in the Flatpak? I know some programs use the files in |
Huh, that's odd. It just uses the default Chromium spellcheck system. |
Alright, it turns out the spell-checking system automatically downloads the language files needed. This means it needs internet access. When I initially put the manifest together I disabled networking because I thought an editor probably doesn't need it. Well, I was wrong 😅 I'll update the manifest to include network access. After doing this spell-checking works again. |
Hmm, we probably also want some flag to disable the built-in auto-update behavior, right? Are you seeing any issues with that? |
I thought that this behavior was controlled by the I see this during startup:
I'm not sure how the app behaves when it tries to update itself. I haven't seen that happen yet. But yes, it would make sense to disable auto-updates when running in Flatpak. |
@taylorhadden Do you have a plan for the next stable release? If you have a date in mind, keep me posted please. It's possible some new issue may pop up with the new release and I'd like to be ready for it. |
Nevermind, I just checked the releases page 😄 I'll try to get to finishing up the publication as soon as I can. |
Flathub PR open! ⬆️ |
@taylorhadden Quick update in case you're not following the PR: They had an issue with the screenshots being in the flatpak repo and not somewhere upstream. I'll fix that by using the screenshots from the website. Second more serious issue is that they would like the .desktop and metainfo files to also be upstream. I'll try getting a PR ready when I get to it. Is there a good place for these files in the project? I don't want to break your existing packaging by adding them. We'll also need to do another release after these are added, or we can wait until you release 0.9.0. I'll leave that up to you, although I'm a bit afraid if the changes take too long the PR will fall into a pile of TODO PRs. I was a bit shocked when I saw the number of open PRs on Flathub. |
Thanks for pushing this through! Those files can live in the "build" folder of Tangent. Maybe in "build/flatpak"? There are some bug fixes that want to get into a 0.8.2, so no worries there. |
Thanks for the merge. Do you think you could re-tag the last commit? Either that or create another tag. I feel like we're really close here 🤞 |
Done! |
Seems like we're blocked until Electron is able to fix this electron/electron#43819 Either we wait for this to get resolved or we use an older version. |
@taylorhadden Seems like the fix isn't going to get backported to older versions of Electron any time soon. Is there any significant amount of work that would need to be done to use Electron 34 when it releases? |
I wouldn't expect it to be a problem. Electron updates have been largely painless. In fact, I think they've fixed some |
Awesome, I'd rather wait for 34 to release instead of downgrading it just to pass on Flathub. But it's your project, so this decision is up to you. We could find a working version in the issue report, a few were mentioned as working. |
Given that my last upgrade fixed some other bugs, I don't really want to downgrade. I'm okay waiting on 34. |
Really liking the app so far, it would be nice if the project was available as a Flatpak.
The text was updated successfully, but these errors were encountered: