2017-07-13 10:26:03 +02:00
|
|
|
/*
|
|
|
|
* launcherdirs.cpp, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2013-08-22 17:22:49 +03:00
|
|
|
#include "StdInc.h"
|
|
|
|
#include "launcherdirs.h"
|
|
|
|
|
|
|
|
#include "../lib/VCMIDirs.h"
|
|
|
|
|
|
|
|
static CLauncherDirs launcherDirsGlobal;
|
|
|
|
|
|
|
|
CLauncherDirs::CLauncherDirs()
|
|
|
|
{
|
|
|
|
QDir().mkdir(downloadsPath());
|
2014-03-04 17:51:10 +03:00
|
|
|
QDir().mkdir(modsPath());
|
2013-08-22 17:22:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
CLauncherDirs & CLauncherDirs::get()
|
|
|
|
{
|
|
|
|
return launcherDirsGlobal;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString CLauncherDirs::downloadsPath()
|
|
|
|
{
|
2014-08-21 23:26:28 +03:00
|
|
|
return pathToQString(VCMIDirs::get().userCachePath() / "downloads");
|
2013-08-22 17:22:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
QString CLauncherDirs::modsPath()
|
|
|
|
{
|
2014-08-21 23:26:28 +03:00
|
|
|
return pathToQString(VCMIDirs::get().userDataPath() / "Mods");
|
2013-08-22 17:22:49 +03:00
|
|
|
}
|
2023-12-25 19:53:02 +02:00
|
|
|
|
|
|
|
QString CLauncherDirs::mapsPath()
|
|
|
|
{
|
|
|
|
return pathToQString(VCMIDirs::get().userDataPath() / "Maps");
|
|
|
|
}
|