Skip to content
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

Binary builds for other Linux distros #393

Open
taoky opened this issue Nov 28, 2022 · 7 comments
Open

Binary builds for other Linux distros #393

taoky opened this issue Nov 28, 2022 · 7 comments
Labels
Community help wanted Extra attention is needed

Comments

@taoky
Copy link

taoky commented Nov 28, 2022

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.
@da-liii da-liii added Community help wanted Extra attention is needed labels Nov 28, 2022
@taoky
Copy link
Author

taoky commented Dec 12, 2022

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 because QFileDialog::DontUseNativeDialog is used (not verified).
  • 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.

@da-liii
Copy link
Contributor

da-liii commented Dec 12, 2022

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

@da-liii
Copy link
Contributor

da-liii commented Dec 18, 2022

Since #447, Fandol is not required on GNU/Linux.

@woutersj
Copy link
Contributor

woutersj commented Jun 5, 2023

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.

@9ao9ai9ar
Copy link

Flatpak is Red Hat centric and not installed by default on Debian-based Linux distros, for example. For reference, both JetBrains Toolbox and Theia IDE provide AppImage and not Flatpak for their Linux users. I think it's a shame that Mogan switched from Autotools to Xmake; otherwise, it's a simple ./configure && make && make install on most Unix operating systems out there in the wild. Autotools is just easier on the users and package maintainers, not to mention it's probably still more battle-tested and portable than most build tools we have currently.

@taoky
Copy link
Author

taoky commented Dec 9, 2024

Flatpak is Red Hat centric and not installed by default on Debian-based Linux distros, for example.

It is user's own choice to install Flatpak, Snap, or neither on distros without them pre-installed -- this does not mean that Flatpak is "incompatible" or "unsuitable" for non-RHEL/Fedora distros. Linux Mint, as a Debian-based Linux distro, pre-installs Flatpak. I'm also using Flatpak on Arch Linux and it does not have any issue.

For reference, both JetBrains Toolbox and Theia IDE provide AppImage and not Flatpak for their Linux users.

Devs have the right to choose how their software shall be officially distributed. Though JetBrains IDEs (GoLand, DataGrip, PyCharm...) are already on FlatHub by third-party maintainers.

@9ao9ai9ar
Copy link

It is user's own choice to install Flatpak, Snap, or neither on distros without them pre-installed

Because they're not enforced by most distros, most people just don't learn to use them. AppImage, from my perspective as a user, is simpler: just add the executable bit and run it. Also, when an application is installed through Flatpak or Snap, the directory layout is different from those installed using the system package managers, so it's another context switch for the average Linux users.

I'm offering my opinion on the path of least resistance to technically resolve this issue. I don't think the devs should spend too much time on platform availability at this stage of the product cycle, when Mogan hasn't yet proven itself to be unquestionably preferable to TeXmacs, especially when its only save file format, TMU, is not currently interoperable with TeXmacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants