Closed tim77 closed 4 years ago
Speaking of which, we should also try to follow the XDG base directory specification. This could be done like as follows (pseudocode):
std::string casFile = std::string(getenv("XDG_DATA_HOME") || getenv("HOME") + "/.local/share") + "/vkBasalt/shader/cas.comp.spv";
So since 03b8c21ae1ecc4fc4817a787c6f77291fe886a16, there are 4 Options for the shader directory:
VKBASALT_SHADER_PATH=/path/to/vkBasalt/shader
environment variable$HOME/.local/share/vkBasalt/shader/
or $XDG_DATA_HOME/vkBasalt/shader/
/usr/share/vkBasalt/shader
/usr/local/share/vkBasalt/shader
Is that enough for your use case, or do still want the option to set it during build?
@DadSchoorse i would say this is enough for this case but there is still needed many things to do and improvements in makefile and build process and better track this in separate tickets. So closing now this. Thank you for continue to work on this project.
Note: for this who struggle after this update shader directory and using non default location - need to remove first rm -r ~/.local/share/vkBasalt/shader
Now cas file installs into home dir, but we need option during build to set install prefix.
https://github.com/DadSchoorse/vkBasalt/blob/master/src/basalt.cpp#L34 std::string casFile = std::string(getenv("HOME")) + "/.local/share/vkBasalt/shader/cas.comp.spv";