ändere macros zu stablieren macros

This commit is contained in:
Markus 2019-09-23 16:41:30 +02:00
parent 5a6f85dd09
commit 75deb260de
2 changed files with 6 additions and 6 deletions

View File

@ -5,12 +5,12 @@ int setPaths(Settings &settings)
//Path settings //Path settings
std::string CacheDir, SettingsDir; std::string CacheDir, SettingsDir;


#ifdef linux #ifdef __linux__
CacheDir = std::string(getenv("HOME")) + "/.cache/S_New4/"; CacheDir = std::string(getenv("HOME")) + "/.cache/S_New4/";
SettingsDir = std::string( getenv("HOME") ) + "/.config/S_New4/"; SettingsDir = std::string( getenv("HOME") ) + "/.config/S_New4/";
settings.pathSymbol = '/'; settings.pathSymbol = '/';
#endif #endif
#ifdef __WIN32 #ifdef _WIN32
CacheDir = std::string(getenv("APPDATA")) + "\\Local\\S_New4\\"; CacheDir = std::string(getenv("APPDATA")) + "\\Local\\S_New4\\";
SettingsDir = std::string( getenv("APPDATA") ) + "\\Roaming\\S_New4\\"; SettingsDir = std::string( getenv("APPDATA") ) + "\\Roaming\\S_New4\\";
settings.pathSymbol = '\\'; settings.pathSymbol = '\\';
@ -1052,7 +1052,7 @@ bool makePathIsOk(std::string path)


bool createDirIsOk(std::string path) bool createDirIsOk(std::string path)
{ {
#ifdef linux #ifdef __linux__
if(mkdir(path.c_str(), 0777) != 0) { if(mkdir(path.c_str(), 0777) != 0) {
#endif #endif
#ifdef _WIN32 #ifdef _WIN32

View File

@ -1,9 +1,9 @@
#ifndef PARAMETERMANAGER_H #ifndef PARAMETERMANAGER_H
#define PARAMETERMANAGER_H #define PARAMETERMANAGER_H


#ifndef linux #ifndef __linux__
#ifndef __WIN32 #ifndef _WIN32
#define linux Error Invalid System: Only for Linux and Windows systems
#endif #endif
#endif #endif