launcherdirs.cpp 526 B

123456789101112131415161718192021222324252627
  1. #include "StdInc.h"
  2. #include "launcherdirs.h"
  3. #include "../lib/VCMIDirs.h"
  4. static CLauncherDirs launcherDirsGlobal;
  5. CLauncherDirs::CLauncherDirs()
  6. {
  7. QDir().mkdir(downloadsPath());
  8. QDir().mkdir(modsPath());
  9. }
  10. CLauncherDirs & CLauncherDirs::get()
  11. {
  12. return launcherDirsGlobal;
  13. }
  14. QString CLauncherDirs::downloadsPath()
  15. {
  16. return QString::fromUtf8(VCMIDirs::get().userCachePath().c_str()) + "/downloads";
  17. }
  18. QString CLauncherDirs::modsPath()
  19. {
  20. return QString::fromUtf8(VCMIDirs::get().userDataPath().c_str()) + "/Mods";
  21. }