windows build fixes
Some checks failed
demo.yaml / windows build fixes (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-03-01 15:42:21 +01:00
commit 50ee204b02
3 changed files with 4 additions and 5 deletions

View file

@ -105,7 +105,9 @@ namespace Crafter {
std::filesystem::path GetPath() { std::filesystem::path GetPath() {
char path[MAX_PATH]; char path[MAX_PATH];
DWORD length = GetModuleFileNameA(NULL, path, MAX_PATH); DWORD length = GetModuleFileNameA(NULL, path, MAX_PATH);
std::cout << lenght << std::endl;
if (length == 0) { if (length == 0) {
std::cout << "failed" << std::endl;
throw std::runtime_error("Failed to get executable path"); throw std::runtime_error("Failed to get executable path");
} }
path[length] = '\0'; path[length] = '\0';

View file

@ -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) { 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); SetDataFromJson(configs, config, workingDir, project);
} }
@ -51,7 +50,6 @@ namespace Crafter {
} }
} }
} }
std::cout << "bruh" << std::endl;
if(config.contains("name")) { if(config.contains("name")) {
name = config["name"].get<std::string>(); name = config["name"].get<std::string>();
} else { } else {

View file

@ -35,16 +35,13 @@ namespace Crafter {
throw std::runtime_error(std::format("Project file: {} not found.", this->path.generic_string())); 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::ifstream f(this->path);
std::cout << this->path << std::endl;
nlohmann::json data; nlohmann::json data;
try { try {
data = nlohmann::json::parse(f); data = nlohmann::json::parse(f);
} catch(std::exception& e) { } catch(std::exception& e) {
std::cout << e.what() << std::endl; std::cout << e.what() << std::endl;
} }
std::cout << "bruh4" << std::endl;
name = data["name"].get<std::string>(); name = data["name"].get<std::string>();
this->path.remove_filename(); this->path.remove_filename();
@ -241,8 +238,10 @@ namespace Crafter {
} }
}); });
std::cout << "before dir" << std::endl;
fs::path exeDir = GetPath(); fs::path exeDir = GetPath();
std::cout << "before std" << std::endl;
BuildStdPcm(*this, config); BuildStdPcm(*this, config);
std::string editedTarget = config.target; std::string editedTarget = config.target;