I created a manifest for creating a cross-distro Flatpak package (http://flatpak.org):
https://github.com/Alexander-Wilms/flatpak-manifests/blob/master/org.texstudio.texstudio.json
I had to reupload the texstudio.tar.xz, since I couldn't use the Sourceforge download link.
You can test this by installing flatpak and flatpak-builder, downloading the json file and then running:
flatpak remote-add kde --from https://distribute.kde.org/kderuntime.flatpakrepo
flatpak install kde org.kde.Platform
flatpak install kde org.kde.Sdk
flatpak-builder --repo=test texstudio org.texstudio.texstudio.json
flatpak remote-add --no-gpg-verify test
flatpak install test org.texstudio.texstudio
flatpak run org.texstudio.texstudio
If you decide to use Flatpak, what remains to be done is determining how to ship TeX Live. There was a discussion between the LaTeXila author and the main Flatpak developer here: https://lists.freedesktop.org/archives/xdg-app/2016-June/000255.html A potential solution mentioned is that LaTeX-editors ship TeX Live with their Flatpaks. Due to the way Flatpak works under the hood, installing another editor that bundles the same version of TeX Live won't require redownloading TeX Live.
Anonymous
Last edit: Alexander Wilms 2017-03-28
Looks nice! (I can't test it since my distro currently doesn't provide Flatpak.)
About TeX Live: would it be as flexible as "vanilla" installed TL? I mean in particular: would it be possible to update it thanks to its package manager?
Right now there's an issue with mktexfmt, not sure if it's worth fixing as long as it's not clear whether bundling TL is the way forward.
If TL is shipped with the TeXstudio bundle, then it can't be updated seperately since the /app and /usr directories inside the sandbox are read-only.
One way to update TL would be to rebuild the entire flatpak. An update would then only require downloading files that have been added or changed. Maybe this should be discussed in a Flatpak issue: https://github.com/flatpak/flatpak/issues
Even by root?
But TL is updated almost every day.
May not be as straightforward as it seems it should be: If I were you, I would ask opinion of TL developpers first.
I found out that there's a way to execute commands on the host, like mentioned here: https://blogs.gnome.org/chergert/2016/09/16/builder-nightly-flatpak/
That might the best and easiest way to go forward. Looks like this method would need to be called here using Qt D-Bus
Last edit: Alexander Wilms 2017-07-27
I just discovered that /app and /usr can be made writable: https://github.com/flatpak/flatpak/wiki/Sandbox (search for Make /app writable)
Edit: I just talked with the developers and that's only during the build phase.
Since Flatpak is build on OStree, ("git for operating systems", https://github.com/flatpak/flatpak/wiki/Filesystem), on one hand, the delta updates would work out of the box. But just writing to the application directories would probably mess that up.
One dev mentioned that they are considering to add a method for apps to update themselves, without running flatpak update on the host OS.
Last edit: Alexander Wilms 2017-03-30