launcherdirs.cpp 500 B

1234567891011121314151617181920212223242526
  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. }
  9. CLauncherDirs & CLauncherDirs::get()
  10. {
  11. return launcherDirsGlobal;
  12. }
  13. QString CLauncherDirs::downloadsPath()
  14. {
  15. return QString::fromUtf8(VCMIDirs::get().userCachePath().c_str()) + "/downloads";
  16. }
  17. QString CLauncherDirs::modsPath()
  18. {
  19. return QString::fromUtf8(VCMIDirs::get().userCachePath().c_str()) + "/Mods";
  20. }