Skip to content

Add flatpak manifest

doe300 requested to merge doe300/jucipp:flatpak into master

The flatpak installation can be built/installed locally with flatpak-builder --user --install <install/dir> jucipp.yaml (takes some time, since it has to build all dependencies from source) and then run with flatpak run com.gitlab.cppit.jucipp (or via the desktop managers applications menu).

Due to the sandbox nature of flatpak, access to the host system is very limited. This is why eidheim/tiny-process-library!45 (merged) is required to explicitly break out of the sandbox to run the development tools like cmake, ninja, rustc, .... Also the host filesystem is (with the exception of $HOME) not mapped with their original paths, but a prefix (i.e. host's root is mapped under /var/run/host), thus the file paths on the host and the sandbox differ. This could cause issues when we try to read a file path inside the sandbox which is generated from outside of it (e.g. for paths in compile_commands.json file generated by the host's cmake).

Although all of the (tested) functionality works, there are a few things to discuss/fix:

  • The GTK design is off, some default design is used instead of the system design. This is a known problem with flatpak UI applications, although fixes exist.
  • Host filesystem access has been granted for files located under $HOME. If a user wants to handle source projects not located in $HOME, they will need to map these folders explicitly via e.g. flatpak override [--user] --filesystem=<path/to/project> com.gitlab.cppit.jucipp. As stated above, due to the path prefix for mapped host folders, this might lead to issues across the board.
  • Also due to the sandbox, the application cannot access the system spell checks. English is provided in the manifest, other languages are so far not available. There seems to be some flatpak-way of providing locales for applications (via the *.Locale package(s)), but I could not find out how to package them.
  • Does jucipp need remote-access support for the git2 library (e.g. push/pull)? If so, the manifest needs to be extended to build ssh and include it in the git2 dependency.
  • Doxygen is found in the development platform, but without dot, which the jucipp CMake warns about. AFAUI, as long as we don't want to build the documentation, we don't care, right?

Depends on eidheim/tiny-process-library!45 (merged), implements #341 (closed), closes #403 (closed).

Merge request reports