This commit is contained in:
parent
f0548165b9
commit
0efce16d3c
1 changed files with 22 additions and 25 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue