Browse Source

Revert "Introduced a method to clean build directory"

This reverts commit 329c7e53a1b0e1e578d1a28ab5d0aee4903591f1.
merge-requests/365/head
d3rrial 9 years ago committed by eidheim
parent
commit
0be32747b4
  1. 4
      src/menu.cc
  2. 15
      src/project.cc
  3. 1
      src/project.h
  4. 13
      src/window.cc

4
src/menu.cc

@ -244,10 +244,6 @@ Menu::Menu() {
<attribute name='label' translatable='yes'>_Compile</attribute> <attribute name='label' translatable='yes'>_Compile</attribute>
<attribute name='action'>app.compile</attribute> <attribute name='action'>app.compile</attribute>
</item> </item>
<item>
<attribute name='label' translatable='yes'>_Clean _Project</attribute>
<attribute name='action'>app.clean_project</attribute>
</item>
</section> </section>
<section> <section>
<item> <item>

15
src/project.cc

@ -147,21 +147,6 @@ void Project::Base::compile_and_run() {
Info::get().print("Could not find a supported project"); Info::get().print("Could not find a supported project");
} }
void Project::Base::clean_project() {
auto default_build_path=build->get_default_path();
if(default_build_path.empty() || !build->update_default())
return;
if(Config::get().project.clear_terminal_on_compile)
Terminal::get().clear();
Terminal::get().print("Cleaning build directory: ");
Terminal::get().print(default_build_path.c_str());
Terminal::get().print("\n");
boost::filesystem::remove_all(default_build_path);
boost::filesystem::create_directory(default_build_path);
Terminal::get().print("Build directory cleaned!\n");
}
std::pair<std::string, std::string> Project::Base::debug_get_run_arguments() { std::pair<std::string, std::string> Project::Base::debug_get_run_arguments() {
Info::get().print("Could not find a supported project"); Info::get().print("Could not find a supported project");
return {"", ""}; return {"", ""};

1
src/project.h

@ -43,7 +43,6 @@ namespace Project {
virtual std::pair<std::string, std::string> get_run_arguments(); virtual std::pair<std::string, std::string> get_run_arguments();
virtual void compile(); virtual void compile();
virtual void compile_and_run(); virtual void compile_and_run();
virtual void clean_project();
virtual std::pair<std::string, std::string> debug_get_run_arguments(); virtual std::pair<std::string, std::string> debug_get_run_arguments();
virtual Gtk::Popover *debug_get_options() { return nullptr; } virtual Gtk::Popover *debug_get_options() { return nullptr; }

13
src/window.cc

@ -855,19 +855,6 @@ void Window::set_menu_actions() {
Project::current->compile(); Project::current->compile();
}); });
menu.add_action("clean_project", [this]() {
if(Project::compiling || Project::debugging) {
Info::get().print("Compile or debug in progress");
return;
}
Project::current=Project::create();
if(Config::get().project.save_on_compile_or_run)
Project::save_files(Project::current->build->project_path);
Project::current->clean_project();
});
menu.add_action("run_command", [this]() { menu.add_action("run_command", [this]() {
EntryBox::get().clear(); EntryBox::get().clear();

Loading…
Cancel
Save