mogan
mogan copied to clipboard
Binary builds for other Linux distros
https://github.com/XmacsLabs/mogan/blob/main/docs/Install.en.md#gnulinux only has instructions for Arch Linux (AUR) and openSUSE (OBS), which may hinder users of other distros to use mogan.
It's troublesome to build packages separately for every distro. However, now there are some methods to build cross-distro packages, such as Flatpak and AppImage.
- Flatpak: Submit app to Flathub and then all users with flatpak installed could install the app through
flatpak install mogan
, or through graphical apps like GNOME software or KDE discover. - AppImage: Just build and distribute appimage file through GitHub Release. Users can download the executable from releases,
chmod +x
and run.
I have tested building mogan flatpak package with sqlitebrowser's manifest as reference. It could work but remains some problems:
- Mogan directly writes configuration to ~/.Xmacs which does not follow XDG base directories specs, so flatpak cannot keep configuration isolated without some troubles:
- If we expose whole home directory to flatpak sandbox (
--filesystem=home
), conf of different installations of mogan will conflict with each other, which is not recommended ("Retaining and sharing configuration with non-Flatpak installations is to be avoided.") - If we don't expose home directory, and separate
~/.Xmacs
with--persist=.Xmacs
, users will not be able to access files in their home directories even Qt5 actually has transparent support for portals (Portals, instead of app itself, will give the file dialog for users to select files and send to applications). I guess that it's becauseQFileDialog::DontUseNativeDialog
is used (not verified).
- If we expose whole home directory to flatpak sandbox (
- It seems like mogan does not have an AppData XML file. As an example, this is an AppData for Discord on Flathub.
- Should Fandol bundled in (FlatHub) releases to provide CJK document support on Linux?
As for AppImage, I haven't tested it but it should be easy to configure CI to build an AppImage bundle.
Should Fandol bundled in (FlatHub) releases to provide CJK document support on Linux?
No. For Mogan v1.1.2, we are trying to set to default Chinese font to Noto CJK.
See http://forum.texmacs.cn/t/mogan-v1-1-2-roadmap/1174
Since #447, Fandol is not required on GNU/Linux.
A Flatpak build would be great. It would make Mogan much more visible on Linux.
One more issue to think about is how to run plugins: we'd need to detect binaries and spawn them on the host system. This is a similar problem to what IDEs face when they want to run tools from outside the flatpak sandbox.
There are some tools, flatpak-spawn
and host-spawn that could be used to do this, but Mogan would need to be patched to use them.