build: split user and data folder, moving user data to Application Support on Mac
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
// #include "src\lib_gui\includes.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define NOMINMAX
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#include "utility/UserPaths.h"
|
||||
|
||||
std::string UserPaths::s_userDataPath = "user/";
|
||||
|
||||
std::string UserPaths::getUserDataPath()
|
||||
{
|
||||
return s_userDataPath;
|
||||
}
|
||||
|
||||
void UserPaths::setUserDataPath(const std::string& path)
|
||||
{
|
||||
s_userDataPath = path;
|
||||
}
|
||||
|
||||
std::string UserPaths::getAppSettingsPath()
|
||||
{
|
||||
return getUserDataPath() + "ApplicationSettings.xml";
|
||||
}
|
||||
|
||||
std::string UserPaths::getWindowSettingsPath()
|
||||
{
|
||||
return getUserDataPath() + "window_settings.ini";
|
||||
}
|
||||
|
||||
std::string UserPaths::getLogPath()
|
||||
{
|
||||
return getUserDataPath() + "log/";
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef USER_PATHS_H
|
||||
#define USER_PATHS_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class UserPaths
|
||||
{
|
||||
public:
|
||||
static std::string getUserDataPath();
|
||||
static void setUserDataPath(const std::string& path);
|
||||
|
||||
static std::string getAppSettingsPath();
|
||||
static std::string getWindowSettingsPath();
|
||||
static std::string getLogPath();
|
||||
|
||||
private:
|
||||
static std::string s_userDataPath;
|
||||
};
|
||||
|
||||
#endif // USER_PATHS_H
|
||||
Reference in New Issue
Block a user