jjazzboss / JJazzLab

A complete and open application for automatic backing tracks generation.
https://www.jjazzlab.org
GNU Lesser General Public License v2.1
376 stars 22 forks source link

Distribute as Flatpak #418

Closed wvengen closed 4 months ago

wvengen commented 5 months ago

For ease of installation on multiple Linux distributions, it would be great to have a Flatpak, published on Flathub.

wvengen commented 5 months ago

I've started packaging in this repository. Currently it builds and runs, but needs additional permissions for good desktop integration, installing fluidsynth + soundfont, as well as icon, desktop file and such.

wvengen commented 5 months ago

Is there are preferred package identifier? I've used org.jjazzlab as prefix, since that is used in pom.xml as groupId.

jjazzboss commented 5 months ago

Thanks. "org.jjazzlab" is fine.

wvengen commented 4 months ago

Some questions that came up:

Other than the above, I think the Flatpak packaging is ready for submission.

jjazzboss commented 4 months ago

I'm not familiar with flatpak and don't have much free time recently, so thank you very much !

I do own jjazzlab.com and jjazzlab.org. Actually I am in the process of migrating everything to jjazzlab.org.

For the .desktop/comment on metainfo.xml/Summary, I would prefer "Generate backing tracks for any song"

I have a release bash script which uses nbpackage (Netbeans packager) to manage win/linux/MacOS stuff (JDK bundling + some minor tweaks), but I don't think it will help you much here. For 4.0.2 you would just need to add flag -J-Dmp.token=a67ed8aa58b306c1336dcf74fb99b2f69f1 in the sed command line 65 of jjazzlab.yml file. This is the public MixPanel API key. In the next release this won't be needed anymore.

Dark theme is by default, not synced to OS setting.

You can use https://github.com/jjazzboss/JJazzLab/blob/master/graphics/JJazzLab-1000x700.png

wvengen commented 4 months ago

Thanks for your reply!

I've applied your suggestions and submitted it to Flathub, and got a response that the desktop and metainfo file are expected upstream. Could you put them in the JJazzLab project, e.g. in misc? That also means you would need to add new releases to the metainfo file.

wvengen commented 4 months ago

One other thing that came up: regarding jjazzlab.org, could you add a placeholder text or redirect to jjazzlab.com? The reviewer doesn't approve of its current state and using it for the application id.

That's a bit problematic, since there's no way to verify ownership. If for some reason the transfer did not happen, the application ends up with the wrong id preventing future verification etc.

jjazzboss commented 4 months ago

Migration to jjazzlab.org should be complete next week I think, let's wait a little bit. I'll add the 2 files in my repo.

That also means you would need to add new releases to the metainfo file.

What do you mean ?

wvengen commented 4 months ago

Migration to jjazzlab.org should be complete next week I think, let's wait a little bit.

Super, that sounds great :+1:. If I could be of help, let me know.

I'll add the 2 files in my repo.

Thanks, I'll update the Flatpak manifest. From the next version on, it can be obtained from the source tarball directly.

That also means you would need to add new releases to the metainfo file.

The metainfo file has a list of releases: version, date, and optional info like a changelog. See Flathub's description of releases and Freedesktop's appstream on releases. Note that AppStream is used for various packaging methods, incl. Flatpak, Snap and AppImage.

Looking at existing apps on Flathub, this can also be auto-generated from git tags, e.g. as in this script (though that misses a changelog, I see this for multiple existing apps om Flathub).

jjazzboss commented 4 months ago

I just finished the migration, jjazzlab.com is gone, long live to jjazzlab.org ! :-)
I added the 2 files on master branch in misc/flatpak.

wvengen commented 4 months ago

Thank you, great to see! The desktop and metainfo files are not really Flatpak-specific, they should ideally also be present in other Linux packages. Typically, the desktop file can be installed in /usr/share/applications and the metainfo file in /usr/share/metainfo (Debian wiki, Fedora packaging guidelines). Maybe it's better to put them in misc/ (or misc/desktop/ or even misc/linux) instead of misc/flatpak?

wvengen commented 4 months ago

Note that the desktop file is used to show a launcher in the desktop launcher (think: start menu), and the metainfo file to show the application in something like an appstore (like Gnome Software; useful to read more about installed applications, and if someone includes your packaged program in a repository, then it will be findable in appstore-like programs).

jjazzboss commented 4 months ago

ah ok, moved to misc/

jjazzboss commented 4 months ago

Thanks for the submission, this is cool ! I'll test it tonight. image

jjazzboss commented 4 months ago

One question: when I was developing JJazzLab 4, I tested it on a few Linux distros, fluidsynth sometimes made some crackling noise. I googled the issue and found that I had to update some Linux audio settings as explained here: https://jackaudio.org/faq/linux_rt_config.html. Indeed it solved the issue. Do you know if the flatpak could manage this ?

jjazzboss commented 4 months ago

By the ways if you use JJazzLab often, send me your email, I'll send you a donation code to avoid the nagging screen.

wvengen commented 4 months ago

Regarding audio crackling: I haven't found a clear way to know what to set here. For me, running pipewire, exposing the pipewire socket was enough. But under heavy load, real-time priority would be nice. I don't see a common practice in existing audio-related Flatpaks, though --device=all is usually included for MIDI (but as Java MIDI only works with low-level hardware devices, it is not that straightforward to cooperate with in a production setup - perhaps snd-virmidi, my bluetooth-MIDI device couldn't be found at all when running without Flatpak, for example). It is a little overkill, so I have excluded it until it's clearer what is needed here. Examples:

My conclusions are:


Something else: you may want to verify your developer identity for the app to show a verified badge.

p.s. During development, the screen was annoying enough for me to find a solution for it. I really hope some finances will come your way, so the screen can be less prominent. If I start using JJazzLab a lot, I would definitely consider donating. Thanks for the offer though, much appreciated!

jjazzboss commented 4 months ago

For audio crackling: ok let's see how it goes as it is. I just verified the app on flathub. Ok for the nag screen :-) Don't hesitate to ping me if you don't have the time to rebuild and patch.