chroniclesextractor.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * chroniclesextractor.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "../StdInc.h"
  12. class ChroniclesExtractor : public QObject
  13. {
  14. Q_OBJECT
  15. QWidget *parent;
  16. std::function<void(float percent)> cb;
  17. QDir tempDir;
  18. int extractionFile;
  19. int fileCount;
  20. bool createTempDir();
  21. void removeTempDir();
  22. std::vector<int> getChronicleNo();
  23. bool extractGogInstaller(QString filePath);
  24. void createBaseMod() const;
  25. void createChronicleMod(int no);
  26. void extractFiles(int no) const;
  27. const QStringList chronicles = {
  28. {}, // fake 0th "chronicle", to create 1-based list
  29. "Warlords of the Wasteland",
  30. "Conquest of the Underworld",
  31. "Masters of the Elements",
  32. "Clash of the Dragons",
  33. "The World Tree",
  34. "The Fiery Moon",
  35. "Revolt of the Beastmasters",
  36. "The Sword of Frost",
  37. };
  38. public:
  39. void installChronicles(QStringList exe);
  40. ChroniclesExtractor(QWidget *p, std::function<void(float percent)> cb = nullptr);
  41. };