This commit is contained in:
doitux
2007-04-11 22:01:49 +00:00
parent 85280a931c
commit a08f5c2161
10 changed files with 60 additions and 39 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
#todo items for future releases #todo items for future releases
- save games to continue at the saved game-state - save games to continue at the saved game-state#
- blinking start-stop button when click start is needed for next round
+21 -3
View File
@@ -39,9 +39,27 @@ ConfigFile::ConfigFile()
// Pfad und Dateinamen setzen // Pfad und Dateinamen setzen
#ifdef _WIN32 #ifdef _WIN32
const char *appDataPath = getenv("AppData"); const char *appDataPath = getenv("AppData");
if (appDataPath) if (appDataPath && appDataPath[0] != 0) {
{ //Programmordner erstellen
configFileName = appDataPath; configFileName = appDataPath;
}
else {
configFileName = getcwd();
//Testen ob das Verzeichnis beschreibbar ist
ofstream tmpFile;
         const char *tmpFileName = "pokerth_test.tmp";
         tmpFile.open(tmpFileName);
if (tmpFile) {
// Erfolgreich, Verzeichnis beschreibbar.
// Datei wieder loeschen.
tmpFile.close();
remove(tmpFileName);
}
else {
// Fehlgeschlagen, Verzeichnis nicht beschreibbar
configFileName = "C:\\Windows\\Temp\\";
}
}
//Programmordner erstellen
configFileName += "\\pokerth\\"; configFileName += "\\pokerth\\";
mkdir(configFileName.c_str()); mkdir(configFileName.c_str());
//Log-File Ordner auch erstellen //Log-File Ordner auch erstellen
@@ -52,7 +70,7 @@ ConfigFile::ConfigFile()
dataDir = configFileName; dataDir = configFileName;
dataDir += "data\\"; dataDir += "data\\";
mkdir(dataDir.c_str()); mkdir(dataDir.c_str());
}
#else #else
//Programmordner erstellen //Programmordner erstellen
const char *homePath = getenv("HOME"); const char *homePath = getenv("HOME");
+3 -1
View File
@@ -56,7 +56,6 @@ Log::Log(mainWindowImpl* w) : myW(w)
myLogFile->close(); myLogFile->close();
linesInFile = 3; linesInFile = 3;
}
//Zu alte Dateien löschen!!! //Zu alte Dateien löschen!!!
int daysUntilWaste = myConfig->readConfigInt("LogStoreDuration"); int daysUntilWaste = myConfig->readConfigInt("LogStoreDuration");
@@ -87,6 +86,9 @@ Log::Log(mainWindowImpl* w) : myW(w)
} }
}
else { cout << "Log directory doesn't exists. Cannot create log files"; }
} }
Log::~Log() Log::~Log()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 728 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB