From 50ee204b027dc92530e979fccf25de2cf4d57064 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Sun, 1 Mar 2026 15:42:21 +0100 Subject: [PATCH] windows build fixes --- implementations/Crafter.Build-Command.cpp | 2 ++ implementations/Crafter.Build-Configuration.cpp | 2 -- implementations/Crafter.Build-Project.cpp | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/implementations/Crafter.Build-Command.cpp b/implementations/Crafter.Build-Command.cpp index ec404bc..0500bbc 100644 --- a/implementations/Crafter.Build-Command.cpp +++ b/implementations/Crafter.Build-Command.cpp @@ -105,7 +105,9 @@ namespace Crafter { std::filesystem::path GetPath() { char path[MAX_PATH]; DWORD length = GetModuleFileNameA(NULL, path, MAX_PATH); + std::cout << lenght << std::endl; if (length == 0) { + std::cout << "failed" << std::endl; throw std::runtime_error("Failed to get executable path"); } path[length] = '\0'; diff --git a/implementations/Crafter.Build-Configuration.cpp b/implementations/Crafter.Build-Configuration.cpp index 2e1a10e..7770845 100644 --- a/implementations/Crafter.Build-Configuration.cpp +++ b/implementations/Crafter.Build-Configuration.cpp @@ -36,7 +36,6 @@ namespace Crafter { } Configuration::Configuration(const nlohmann::json& configs, const nlohmann::json& config, fs::path workingDir, const Project& project) : type(CRAFTER_CONFIGURATION_TYPE_EXECUTABLE), debug(false) { - std::cout << "bruh2" << std::endl; SetDataFromJson(configs, config, workingDir, project); } @@ -51,7 +50,6 @@ namespace Crafter { } } } - std::cout << "bruh" << std::endl; if(config.contains("name")) { name = config["name"].get(); } else { diff --git a/implementations/Crafter.Build-Project.cpp b/implementations/Crafter.Build-Project.cpp index ed34629..76577a4 100644 --- a/implementations/Crafter.Build-Project.cpp +++ b/implementations/Crafter.Build-Project.cpp @@ -35,16 +35,13 @@ namespace Crafter { throw std::runtime_error(std::format("Project file: {} not found.", this->path.generic_string())); } - std::cout << "bruh3" << std::endl; std::ifstream f(this->path); - std::cout << this->path << std::endl; nlohmann::json data; try { data = nlohmann::json::parse(f); } catch(std::exception& e) { std::cout << e.what() << std::endl; } - std::cout << "bruh4" << std::endl; name = data["name"].get(); this->path.remove_filename(); @@ -241,8 +238,10 @@ namespace Crafter { } }); + std::cout << "before dir" << std::endl; fs::path exeDir = GetPath(); + std::cout << "before std" << std::endl; BuildStdPcm(*this, config); std::string editedTarget = config.target;