DadSchoorse / vkBasalt

a vulkan post processing layer for linux
zlib License
1.24k stars 52 forks source link

Need option for set destdir of shader files #25

Closed tim77 closed 4 years ago

tim77 commented 4 years ago

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";

Calinou commented 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";
DadSchoorse commented 4 years ago

So since 03b8c21ae1ecc4fc4817a787c6f77291fe886a16, there are 4 Options for the shader directory:

Is that enough for your use case, or do still want the option to set it during build?

tim77 commented 4 years ago

@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