This commit is contained in:
parent
94db4f2780
commit
0819baf6d3
8 changed files with 170 additions and 117 deletions
|
|
@ -66,19 +66,18 @@ int main(int argc, char* argv[]) {
|
|||
projectPath = filepath;
|
||||
}
|
||||
|
||||
Project project = Project::LoadFromJSON(projectPath);
|
||||
Project project(std::move(projectPath));
|
||||
|
||||
if(command == "build") {
|
||||
std::tuple<Configuration&, BuildResult> config = project.Build(argument);
|
||||
std::cout << "amogus" << std::endl;
|
||||
if(std::get<1>(config).errors.empty()) {
|
||||
if(run){
|
||||
std::string binDir = std::format("{}/{}", project.binDir.string(), std::get<0>(config).name);
|
||||
if(std::get<0>(config).debug) {
|
||||
system(std::format("cd {} && ./{}", (fs::path(projectPath).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 {} && ./{}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
|
||||
system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue