mirror of
https://github.com/open-goal/jak-project
synced 2026-07-08 14:36:52 -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:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user