Add extractor tool (#1276)

* first attempt

* fix

* zip to tar

* windows

* try again, std::filesystem sucks

* std::filesystem is still garbage

* std::filesystem is terrible

* std::filesystem continues to waste my time

* again

* neadsflaldksal;df
This commit is contained in:
water111
2022-04-03 19:17:03 -04:00
committed by GitHub
parent f14b7aa0cd
commit 5bd0b735a5
20 changed files with 311 additions and 60 deletions
+12
View File
@@ -9,6 +9,7 @@
#include "common/util/Timer.h"
#include "goalc/make/Tools.h"
#include "common/util/FileUtil.h"
std::string MakeStep::print() const {
std::string result = fmt::format("Tool {} with inputs", tool);
@@ -55,6 +56,9 @@ MakeSystem::MakeSystem() {
m_goos.set_global_variable_to_symbol("ASSETS", "#t");
set_constant("*iso-data*", file_util::get_file_path({"iso_data"}));
set_constant("*use-iso-data-path*", false);
add_tool<DgoTool>();
add_tool<TpageDirTool>();
add_tool<CopyTool>();
@@ -365,3 +369,11 @@ bool MakeSystem::make(const std::string& target, bool force, bool verbose) {
make_timer.getSeconds());
return true;
}
void MakeSystem::set_constant(const std::string& name, const std::string& value) {
m_goos.set_global_variable_by_name(name, goos::StringObject::make_new(value));
}
void MakeSystem::set_constant(const std::string& name, bool value) {
m_goos.set_global_variable_to_symbol(name, value ? "#t" : "#f");
}