Browse Source

fixing terminal bugs

merge-requests/365/head
oyvang 11 years ago
parent
commit
7ef8ff0893
  1. 1
      juci/config.json
  2. 2
      juci/terminal.cc
  3. 3
      juci/terminal.h

1
juci/config.json

@ -57,6 +57,7 @@
] ]
}, },
"project": { "project": {
"compile_commands": [ "compile_commands": [
"rm -rf ./.build", "rm -rf ./.build",
"mkdir build", "mkdir build",

2
juci/terminal.cc

@ -55,7 +55,7 @@ void Terminal::Controller::Run(std::string executable) {
PrintMessage("juCi++ execute: " + executable + "\n"); PrintMessage("juCi++ execute: " + executable + "\n");
DEBUG("Terminal: Compile: running run command: "); DEBUG("Terminal: Compile: running run command: ");
DEBUG_VAR(executable); DEBUG_VAR(executable);
ExecuteCommand("cd ./.build/; ./"+executable, "r"); ExecuteCommand("cd"+config().run_command() + "; ./"+executable, "r");
PrintMessage("\n"); PrintMessage("\n");
} }

3
juci/terminal.h

@ -13,8 +13,11 @@ namespace Terminal {
Config(Terminal::Config& original); Config(Terminal::Config& original);
std::vector<std::string>& compile_commands() { return compile_commands_; } std::vector<std::string>& compile_commands() { return compile_commands_; }
void InsertCompileCommand(std::string command); void InsertCompileCommand(std::string command);
std::string& run_command() { return run_command_; }
void SetRunCommand(std::string command);
private: private:
std::vector<std::string> compile_commands_; std::vector<std::string> compile_commands_;
std::string run_command_;
}; };
class View { class View {

Loading…
Cancel
Save