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:
Tyler Wilding
2022-07-05 20:38:13 -04:00
committed by GitHub
parent ac1e620161
commit 6446389263
70 changed files with 7010 additions and 765 deletions
+2 -4
View File
@@ -1,7 +1,5 @@
#include "MakeSystem.h"
#include <filesystem>
#include "common/goos/ParseHelpers.h"
#include "common/util/FileUtil.h"
#include "common/util/Timer.h"
@@ -179,7 +177,7 @@ goos::Object MakeSystem::handle_basename(const goos::Object& form,
const std::shared_ptr<goos::EnvironmentObject>& env) {
m_goos.eval_args(&args, env);
va_check(form, args, {goos::ObjectType::STRING}, {});
std::filesystem::path input(args.unnamed.at(0).as_string()->data);
fs::path input(args.unnamed.at(0).as_string()->data);
return goos::StringObject::make_new(input.filename().u8string());
}
@@ -189,7 +187,7 @@ goos::Object MakeSystem::handle_stem(const goos::Object& form,
const std::shared_ptr<goos::EnvironmentObject>& env) {
m_goos.eval_args(&args, env);
va_check(form, args, {goos::ObjectType::STRING}, {});
std::filesystem::path input(args.unnamed.at(0).as_string()->data);
fs::path input(args.unnamed.at(0).as_string()->data);
return goos::StringObject::make_new(input.stem().u8string());
}