mirror of
https://github.com/open-goal/jak-project
synced 2026-08-16 13:17:34 -04:00
extractor: cleanup, support unicode properly, and add multi-game support (#1609)
* extractor: refactor and cleanup for multi-game support * deps: switch to `ghc::filesystem` as it is utf-8 everywhere by default * extractor: finally working with unicode * unicode: fix unicode cli args on windows in all `main` functions
This commit is contained in:
+14
-4
@@ -1,8 +1,9 @@
|
||||
#include <filesystem>
|
||||
|
||||
|
||||
#include "common/log/log.h"
|
||||
#include "common/util/FileUtil.h"
|
||||
#include "common/util/os.h"
|
||||
#include <common/util/unicode_util.h>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -18,6 +19,15 @@
|
||||
// to make it easier to test a subset of tests
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
#ifdef _WIN32
|
||||
auto args = get_widechar_cli_args();
|
||||
std::vector<char*> string_ptrs;
|
||||
for (auto& str : args) {
|
||||
string_ptrs.push_back(str.data());
|
||||
}
|
||||
argv = string_ptrs.data();
|
||||
#endif
|
||||
|
||||
// hopefully get a debug print on github actions
|
||||
setup_cpu_info();
|
||||
file_util::setup_project_path(std::nullopt);
|
||||
@@ -27,10 +37,10 @@ int main(int argc, char** argv) {
|
||||
|
||||
// Re-init failed folder
|
||||
std::string failedFolder = file_util::get_file_path({"test/goalc/source_generated/failed/"});
|
||||
if (std::filesystem::exists(failedFolder)) {
|
||||
std::filesystem::remove_all(failedFolder);
|
||||
if (fs::exists(failedFolder)) {
|
||||
fs::remove_all(failedFolder);
|
||||
}
|
||||
std::filesystem::create_directory(failedFolder);
|
||||
fs::create_directory(failedFolder);
|
||||
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user