What would be the best way to refer to the Flatpak XDG data home in a config file?
hazelnot:
Because I don’t want to ask users to create folders and install the game data in
/var/lib/flatpak/app/com.github.vanillaconquer.Vanilla-Conquer/x86_64/master/26fefaf6c137637293569700598454a6749cb1ef0bc445355d087f60d970e0ec/files/sharebecause that’s silly,
You cannot touch this path, that stores the checkout of the actual app and is managed by Flatpak. So the correct path is this indeed
barebone config files pointing to
/home/hazelnot/.var/app/com.github.vanillaconquer.Vanilla-Conquer/data/vanillatd/.
since it seems like the config files only point the executables to the exact path defined in the file. I assume there has to be some shell script-y way of defining it before installing the config file, but I’m not sure how to do that?
It’s not entirely clear what the problem is here or how it relates to Flatpak. The above correct path would be XDG_DATA_HOME inside the sandbox so simply create your game folder relative to that variable in the source code.
Since if I hardcode it in the file itself it looks like it would have to directly use the username of the current user
No just resolve it relative to XDG_DATA_HOME in your code. It will automatically expand to the absolute path.
Discussion in the ATmosphere