cvfosammmm / Setzer

LaTeX editor written in Python with Gtk
https://www.cvfosammmm.org/setzer/
Other
388 stars 34 forks source link

Split TeXLive into an app extension #327

Closed oscfdezdz closed 1 year ago

oscfdezdz commented 1 year ago

Based on the manifests of the applications mentioned in the issue that this PR solves.

The warning for the user can surely be improved, let me know what you think.

Fixes #220

oscfdezdz commented 1 year ago

Attempting to run it with GNOME Builder hits this issue of missing TeXLive SDK extension when building a pdf file. It has to be run manually with flatpak-builder command.

cvfosammmm commented 1 year ago

Is this extension automatically installed with Setzer, like the runtime?

oscfdezdz commented 1 year ago

It should, although I have not been able to test it because I have not found a way to install the extension in the same local Flatpak repository as Setzer and it seems they have to be in the same one. With Gummi, it installs automatically, it should happen here too.

oscfdezdz commented 1 year ago

This is the only thing I have been able to test with flatpak-builder. flatpak install doesn't offer options to install dependencies from another repository that I know of.

$ flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo _build org.cvfosammmm.Setzer.json 
Dependency Sdk: org.gnome.Sdk 44
Updating org.gnome.Sdk/x86_64/44
Updating runtime/org.gnome.Sdk.Locale/x86_64/44
Dependency Runtime: org.gnome.Platform 44
Updating org.gnome.Platform/x86_64/44

Nothing to do.
Dependency Extension: org.freedesktop.Sdk.Extension.texlive 22.08
Installing org.freedesktop.Sdk.Extension.texlive/x86_64/22.08 from flathub
Installing runtime/org.freedesktop.Sdk.Extension.texlive/x86_64/22.08
cvfosammmm commented 1 year ago

Can you test it by opening a PR in the flathub repo? https://github.com/flathub/org.cvfosammmm.Setzer

oscfdezdz commented 1 year ago

It works the same as in local, it has generated another remote.

cvfosammmm commented 1 year ago

So you don't think that will be a problem when it goes live?

oscfdezdz commented 1 year ago

Checking the manifests of other LaTeX editors, for example, Gummi is the only one having TeXLive extension on both sdk-extensions and add-extensions properties and it always installs it if it isn't already. The rest (TeXstudio and TeXworks, among others) only add it to add-extensions, that's why it doesn't install it and doesn't even ask to.

$ flatpak install app.gummi.gummi
Looking for matches…

app.gummi.gummi permissions:
    ipc    fallback-x11    x11    file access [1]

    [1] xdg-documents

        ID                                               Branch            Op            Remote            Download
 1.     app.gummi.gummi.Locale                           stable            i             flathub           < 339,4 kB (partial)
 2.     org.freedesktop.Sdk.Extension.texlive            22.08             i             flathub             < 5,4 GB
 3.     app.gummi.gummi                                  stable            i             flathub             < 3,8 MB
$ flatpak install org.texstudio.TeXstudio
Looking for matches…
Required runtime for org.texstudio.TeXstudio/x86_64/stable (runtime/org.kde.Platform/x86_64/6.4) found in remote flathub
Do you want to install it? [Y/n]: 

org.texstudio.TeXstudio permissions:
    ipc      fallback-x11      wayland      x11      dri      file access [1]      dbus access [2]

    [1] /tmp, host, xdg-config/kdeglobals:ro
    [2] com.canonical.AppMenu.Registrar, org.freedesktop.Flatpak

        ID                                                               Branch              Op             Remote              Download
 1.     org.kde.KStyle.Adwaita                                           6.4                 i              flathub               < 7,9 MB
 2.     org.kde.Platform.Locale                                          6.4                 i              flathub             < 333,3 MB (partial)
 3.     org.kde.PlatformTheme.QGnomePlatform                             6.4                 i              flathub               < 9,6 MB
 4.     org.kde.WaylandDecoration.QGnomePlatform-decoration              6.4                 i              flathub              < 10,2 MB
 5.     org.kde.Platform                                                 6.4                 i              flathub             < 264,0 MB
 6.     org.texstudio.TeXstudio                                          stable              i              flathub             < 386,5 MB

There is no documentation on this that I've found, this is what I've been able to find comparing other manifests.

I expect it to work when it goes live as Setzer and TeXLive extension will be on flathub remote.

cvfosammmm commented 1 year ago

Is there still a problem? I merged the change to the manifest on flathub. Seems to work beautifully.

oscfdezdz commented 1 year ago

Is there still a problem? I merged the change to the manifest on flathub. Seems to work beautifully.

I have updated the warning to use Xdp, which is the correct way to do it.

cvfosammmm commented 1 year ago

Thanks