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:55:02 +01:00
commit 0efce16d3c

View file

@ -69,36 +69,33 @@ int main(int argc, char* argv[]) {
Project project(std::move(projectPath)); Project project(std::move(projectPath));
if(command == "build") { if(command == "build") {
std::tuple<Configuration&, BuildResult> config; std::tuple<Configuration&, BuildResult> config = project.Build(argument);
try { try {
config = project.Build(argument); if(std::get<1>(config).errors.empty()) {
} catch(std::exception& e) { if(run){
std::cout << e.what() << std::endl; std::string binDir = std::format("{}/{}", project.binDir.string(), std::get<0>(config).name);
} if(std::get<0>(config).target == "x86_64-w64-mingw32") {
if(std::get<0>(config).debug) {
if(std::get<1>(config).errors.empty()) { system(std::format("cd {} && wine ./{}.exe", (project.path.parent_path()/binDir).string(), project.name).c_str());
if(run){ //system(std::format("cd {} && lldb -o run {}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
std::string binDir = std::format("{}/{}", project.binDir.string(), std::get<0>(config).name); } else {
if(std::get<0>(config).target == "x86_64-w64-mingw32") { system(std::format("cd {} && wine ./{}.exe", (project.path.parent_path()/binDir).string(), project.name).c_str());
if(std::get<0>(config).debug) { }
system(std::format("cd {} && wine ./{}.exe", (project.path.parent_path()/binDir).string(), project.name).c_str());
//system(std::format("cd {} && lldb -o run {}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
} else { } else {
system(std::format("cd {} && wine ./{}.exe", (project.path.parent_path()/binDir).string(), project.name).c_str()); if(std::get<0>(config).debug) {
} system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str());
} else { //system(std::format("cd {} && lldb -o run {}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
if(std::get<0>(config).debug) { } else {
system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str()); system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str());
//system(std::format("cd {} && lldb -o run {}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str()); }
} else {
system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str());
} }
} }
} else {
std::cout << std::get<1>(config).errors << std::endl;
return 1;
} }
} else { } catch(std::exception& e) {
std::cout << std::get<1>(config).errors << std::endl; std::cout << e.what() << std::endl;
return 1;
} }
} else if(command == "test") { } else if(command == "test") {
bool anyFailed = false; bool anyFailed = false;