abb128 / LiveCaptions

Linux Desktop application that provides live captioning
GNU General Public License v3.0
1.15k stars 31 forks source link

Non-Flatpak path for models #69

Open phodina opened 1 year ago

phodina commented 1 year ago

Hi @abb128 ,

as packaging this software there is issue with the FHS.

The path to the data model is under /app which is not compatible with packaging model of most distributions.

Would it be possible not to hardcode the path and rather either specify it when the tool starts or it's loaded from configuration file?

https://github.com/abb128/LiveCaptions/blob/3b0a8c85cafcf9e32c6e33214b8bd54491f63740/src/common.h#L26 https://github.com/abb128/LiveCaptions/blob/3b0a8c85cafcf9e32c6e33214b8bd54491f63740/src/livecaptions-settings.c#L257 https://github.com/abb128/LiveCaptions/blob/3b0a8c85cafcf9e32c6e33214b8bd54491f63740/build-aux/flatpak/net.sapples.LiveCaptions.json#L28 https://github.com/abb128/LiveCaptions/blob/3b0a8c85cafcf9e32c6e33214b8bd54491f63740/data/net.sapples.LiveCaptions.gschema.xml#L63

abb128 commented 1 year ago

I'm not sure the best way to approach making the model path configurable. I'd like to avoid using a separate configuration file because I'm already using gsettings, but it seems like there may be no way around it for packaging. Specifying it when starting livecaptions might be a bit odd. You can already change it by specifying the APRIL_MODEL_PATH environment variable (although I believe this may have issues with the model switcher), but I'm not sure whether that's good enough for packaging