Skip to content

Make default locations of executable dependencies configurable

Hunter Jones requested to merge hdjones/kstars:split-prefixes into master

KStars currently assumes that executable dependencies like indiserver, xplanet, and astrometry are located in a single prefix (like /usr on Linux). While they may be configurable via GUI once KStars launches, it makes it difficult to provide a high quality OOTB experience in non-standard setups.

I maintain the KStars package for NixOS/nixpkgs and we're currently having to patch ksutils.cpp to split the prefixes for each dependency. For NixOS the matter is even more complicated, a hard coded NixOS specific path is inadequate since the prefix is generated by taking a hash of the source files of all dependencies. You can see what we're currently doing here

I've worked out a more general solution using cmake's autogenerated header feature that should be useful to any packaging effort that uses non-standard and/or split prefixes for executable deps. I wasn't sure if I should put the generated macros in the existing config-kstars.h.cmake file or create a new one, for now I went with the former.

Merge request reports