1. #include <iostream>
  2. #include <filesystem>
  3. #include <sstream>
  4. #include <unordered_set>
  5. int main()
  6. {
  7. const std::unordered_set<std::string> block{ "questlib.lua", "locale.lua", "GFquestlib.lua", "oxquiz.lua" };
  8. const auto& currentpath = std::filesystem::current_path();
  9. std::filesystem::remove_all(currentpath.string() + "\\object");
  10. for (const auto& cpath : std::filesystem::directory_iterator(currentpath)) {
  11. for (const std::string& find : { ".lua", ".quest" }) {
  12. const auto& strpath = cpath.path().string();
  13. const auto& pathlen = strpath.length();
  14. if (strpath.substr(pathlen - find.length(), pathlen) == find) {
  15. const auto& questname = strpath.substr(strpath.find_last_of('\\') + 1);
  16. if (!block.count(questname)) {
  17. std::stringstream ss;
  18. ss << "start qc.exe " << questname;
  19. system(ss.str().c_str());
  20. }
  21. }
  22. }
  23. }
  24. return 0;
  25. }

blackdragonx61