Conversation
|
This is incomplete btw - there are references to |
| PreferencesManager::load(string(getenv("HOME")) + "/.emptyepsilon/options.ini"); | ||
| else | ||
| PreferencesManager::load("options.ini"); | ||
| if (getenv("APPDATA")) |
There was a problem hiding this comment.
Instead of additional branches, it would probably make more sense to swap HOME for APPDATA on windows.
Better yet - store the result of getenv(<home or appdata>) once, and use that throughout.
There was a problem hiding this comment.
Yeah, copypasta... HOME is also not a thing on Windows either... I just extended the current solution rather than re-implementing a better one.
| #ifdef _WIN32 | ||
| mkdir((string(getenv("APPDATA")) + "/emptyepsilon").c_str()); | ||
| #else | ||
| mkdir((string(getenv("APPDATA")) + "/emptyepsilon").c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); |
There was a problem hiding this comment.
This feels like happy-go-lucky copypasta: which platform is this supposed to handle?
I don't think APPDATA really is a thing to worry about on anything but windows :)
There was a problem hiding this comment.
Yeah, copypasta is what it was. A more eloquent solution would be ideal.
Shoot, I got lazy and didn't look, I can add those. |
When installing Empty Epsilon in the system Program Files folder (like #1003 would) it requires administrator privileges to write to the local folder. Using the appdata folder also makes
options.iniand such user specific, which is a good thing.I have not tested this, if someone who already has a Windows development environment setup would do so, I would appreciate it.