Skip to content

[Feature Request] Distribute via flatpak #113

@MrMugame

Description

@MrMugame

Currently installing texpresso is a headache and properly removing texpresso and all its dependencies is an even bigger headache, if not impossible. It would be great if texpresso could be provided as a bundled app, for easy installation. After all every second issue on here, seems to be someone failing to build texpresso. I would advocate for flatpak, as it seems to be a fairly easy way to bundle and distribute an app to a wide range of distributions at least for linux.
I don't have a lot of (to not say no) experience bundling stuff with flatpak, but after some trial and error, this is what I could come up with

# io.github.texpresso.yml
id: io.github.texpresso
runtime: org.freedesktop.Platform
runtime-version: "25.08"
sdk: org.freedesktop.Sdk
command: texpresso
finish-args:
  - --device=dri
  - --share=ipc
  - --socket=fallback-x11
  - --socket=wayland
  - --filesystem=host
  # Needed so tectonic can downloaded needed ressources
  - --share=network

modules:
  - name: texpresso
    buildsystem: autotools
    no-autogen: true
    no-make-install: true
    build-options:
      env:
        LIBRARY_PATH: /app/lib/
    post-install:
      - install -Dm755 build/texpresso /app/bin/texpresso
      - install -Dm755 build/texpresso-xetex /app/bin/texpresso-xetex
    sources:
      - type: git
        url: https://github.com/let-def/texpresso
        commit: dde807eccb19917fbd49683decc1d003d7684e03
        # branch: detectonic
    modules:
      - name: tectonic
        buildsystem: simple
        build-commands:
          - install -Dm755 tectonic /app/bin/tectonic
        sources:
          - type: archive
            url: https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%400.15.0/tectonic-0.15.0-x86_64-unknown-linux-gnu.tar.gz
            sha256: 875fbbc9ab48560d7776088c608e0beee49197b57ab4a2f6c5385b2c661c842f
            strip-components: 0
      - name: mupdf
        no-autogen: true
        build-options:
          cflags: "-fPIC"
          cxxflags: "-fPIC"
        make-args:
          - shared=yes
          - build=release
        make-install-args:
          - shared=yes
          - build=release
          - prefix=${FLATPAK_DEST}
        post-install:
          - ldconfig -v
        sources:
          - type: archive
            url: https://casper.mupdf.com/downloads/archive/mupdf-1.26.10-source.tar.gz
            sha256: 1653f35bd8fbd970f05523efdc7f86e41e9728e2564a3295296e03cf59a51437
        cleanup:
          - /bin
          - /share
          - /include
        modules:
          - name: glu
            buildsystem: meson
            sources:
              - type: archive
                url: https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz
                sha256: bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f
            cleanup:
              - /include
              - /lib/*.a
              - /lib/*.la
              - /lib/pkgconfig

This can simply be build as described in the docs. This is also the docs page that describes the process of submitting a new flatpak. I have never done this before (maybe you have?), but it seems decently straight forward. There are only two issues:

  • You would probably need to create the github pages page texpresso.github.io as flatpak requires some unique domain. I've seen people just use io.github.username.repository, but this doesn't work with your username, as it contains a dash. 🫠
  • It seems like you need to request an exception for file system access ... but this is described in the docs.

Anyway, it would be great if you could distribute texpresso using flatpak/flathub, as it would make using it a lot simpler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions