-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shaders / docs path parameters #177
Comments
Good idea, I think the problems you've pointed out (ie, allow user-editable persistent shaders, and running during development, without installing) are annoying and are worth solving. I'm not quite sure command line arguments are the best way to address them though, because I think this is more a developer-level feature than something that should be in the main user interface. Here's how I'd unpack the several needs related to this change:
Some ways to address these:
Out of the options, I think it's probably best to use environment variables to address use case (3). I think use case (1) might be best addressed in a different way, probably via a persistent GUI setting. |
So how about we have a environment variable |
Shaders are stored at INSTALL_DIR\shaders (INSTALL_DIR\doc)
It can be improved using new command line arguments -shadersDir and -docsDir:
The arguments can be useful in the following scenarios:
Before this change INSTALL_DIR was the path where binary is installed minus its last four symbols. This path was created using QCoreApplication::applicationDirPath(). It did not work when Displaz was started from Visual Studio IDE. In this case this function returns something like
C:\repos\displaz\build\bin\Debug
The last four symbols of the path were not "/bin", and as a result loading shaders and documents failed and there is no good way to make the program to use another path.
There was one one more small issue there, which also was fixed. There was a misleading error message. If INSTALL_DIR did not finish with "/bin" then the program wrote a message that shaders cannot be loaded. But in fact in that case shaders AND documentation cannot be loaded.
Note: this change was written and tested on Window. It would be good to make sure that it also work on Linux.
The text was updated successfully, but these errors were encountered: