mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
5cbec833c2
BIG NOTE TO LINUX USERS All user data has been moved according to XDG specs: - Game data (H3 files and mods) and saves: from ~/.vcmi to ~/.local/ - Temporary files, including logs: from ~/.vcmi to ~/.cache/vcmi - Config files: from ~/.vcmi/config to ~/.config/vcmi For compatibility VCMI will read game data from ~/.vcmi as well but this is temporary behavior and will be removed
28 lines
526 B
C++
28 lines
526 B
C++
#include "StdInc.h"
|
|
#include "launcherdirs.h"
|
|
|
|
#include "../lib/VCMIDirs.h"
|
|
|
|
static CLauncherDirs launcherDirsGlobal;
|
|
|
|
CLauncherDirs::CLauncherDirs()
|
|
{
|
|
QDir().mkdir(downloadsPath());
|
|
QDir().mkdir(modsPath());
|
|
}
|
|
|
|
CLauncherDirs & CLauncherDirs::get()
|
|
{
|
|
return launcherDirsGlobal;
|
|
}
|
|
|
|
QString CLauncherDirs::downloadsPath()
|
|
{
|
|
return QString::fromUtf8(VCMIDirs::get().userCachePath().c_str()) + "/downloads";
|
|
}
|
|
|
|
QString CLauncherDirs::modsPath()
|
|
{
|
|
return QString::fromUtf8(VCMIDirs::get().userDataPath().c_str()) + "/Mods";
|
|
}
|