|
|
|
@ -386,7 +386,6 @@ void Project::LLDB::debug_start() { |
|
|
|
if(exit_status != EXIT_SUCCESS) |
|
|
|
if(exit_status != EXIT_SUCCESS) |
|
|
|
debugging = false; |
|
|
|
debugging = false; |
|
|
|
else { |
|
|
|
else { |
|
|
|
self->dispatcher.post([self, run_arguments, project_path] { |
|
|
|
|
|
|
|
std::vector<std::pair<boost::filesystem::path, int>> breakpoints; |
|
|
|
std::vector<std::pair<boost::filesystem::path, int>> breakpoints; |
|
|
|
for(size_t c = 0; c < Notebook::get().size(); c++) { |
|
|
|
for(size_t c = 0; c < Notebook::get().size(); c++) { |
|
|
|
auto view = Notebook::get().get_view(c); |
|
|
|
auto view = Notebook::get().get_view(c); |
|
|
|
@ -488,7 +487,6 @@ void Project::LLDB::debug_start() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Debug::LLDB::get().start(*run_arguments, *project_path, breakpoints, startup_commands, remote_host); |
|
|
|
Debug::LLDB::get().start(*run_arguments, *project_path, breakpoints, startup_commands, remote_host); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -893,7 +891,7 @@ void Project::Clang::compile_and_run() { |
|
|
|
compiling = false; |
|
|
|
compiling = false; |
|
|
|
if(exit_status == 0) { |
|
|
|
if(exit_status == 0) { |
|
|
|
Terminal::get().async_process(arguments, project_path, [arguments](int exit_status) { |
|
|
|
Terminal::get().async_process(arguments, project_path, [arguments](int exit_status) { |
|
|
|
Terminal::get().async_print("\e[2m" + arguments + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2m" + arguments + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -973,7 +971,7 @@ void Project::Markdown::compile_and_run() { |
|
|
|
Terminal::get().async_process( |
|
|
|
Terminal::get().async_process( |
|
|
|
command, "", [command](int exit_status) { |
|
|
|
command, "", [command](int exit_status) { |
|
|
|
if(exit_status == 127) |
|
|
|
if(exit_status == 127) |
|
|
|
Terminal::get().async_print("\e[31mError\e[m: executable not found: " + command + "\n", true); |
|
|
|
Terminal::get().print("\e[31mError\e[m: executable not found: " + command + "\n", true); |
|
|
|
}, |
|
|
|
}, |
|
|
|
true); |
|
|
|
true); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1001,7 +999,7 @@ void Project::Python::compile_and_run() { |
|
|
|
|
|
|
|
|
|
|
|
Terminal::get().print("\e[2mRunning " + command + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2mRunning " + command + "\e[m\n"); |
|
|
|
Terminal::get().async_process(command, path, [command](int exit_status) { |
|
|
|
Terminal::get().async_process(command, path, [command](int exit_status) { |
|
|
|
Terminal::get().async_print("\e[2m" + command + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2m" + command + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1027,7 +1025,7 @@ void Project::JavaScript::compile_and_run() { |
|
|
|
|
|
|
|
|
|
|
|
Terminal::get().print("\e[2mRunning " + command + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2mRunning " + command + "\e[m\n"); |
|
|
|
Terminal::get().async_process(command, path, [command](int exit_status) { |
|
|
|
Terminal::get().async_process(command, path, [command](int exit_status) { |
|
|
|
Terminal::get().async_print("\e[2m" + command + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2m" + command + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1040,7 +1038,7 @@ void Project::HTML::compile_and_run() { |
|
|
|
|
|
|
|
|
|
|
|
Terminal::get().print("\e[2mRunning " + command + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2mRunning " + command + "\e[m\n"); |
|
|
|
Terminal::get().async_process(command, build->project_path, [command](int exit_status) { |
|
|
|
Terminal::get().async_process(command, build->project_path, [command](int exit_status) { |
|
|
|
Terminal::get().async_print("\e[2m" + command + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2m" + command + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
else if(auto view = Notebook::get().get_current_view()) |
|
|
|
else if(auto view = Notebook::get().get_current_view()) |
|
|
|
@ -1088,7 +1086,7 @@ void Project::Rust::compile_and_run() { |
|
|
|
compiling = false; |
|
|
|
compiling = false; |
|
|
|
if(exit_status == 0) { |
|
|
|
if(exit_status == 0) { |
|
|
|
Terminal::get().async_process(arguments, self->build->project_path, [arguments](int exit_status) { |
|
|
|
Terminal::get().async_process(arguments, self->build->project_path, [arguments](int exit_status) { |
|
|
|
Terminal::get().async_print("\e[2m" + arguments + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
Terminal::get().print("\e[2m" + arguments + " returned: " + (exit_status == 0 ? "\e[32m" : "\e[31m") + std::to_string(exit_status) + "\e[m\n"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|