Browse Source

added run commands to config

master
tedjk 11 years ago
parent
commit
bc94a3bb3f
  1. 9
      juci/config.cc
  2. 3
      juci/config.json

9
juci/config.cc

@ -31,11 +31,16 @@ void MainConfig::GenerateSource() {
void MainConfig::GenerateTerminalCommands() { void MainConfig::GenerateTerminalCommands() {
boost::property_tree::ptree source_json = cfg_.get_child("project"); boost::property_tree::ptree source_json = cfg_.get_child("project");
boost::property_tree::ptree commands_json = source_json.get_child("compile_commands"); boost::property_tree::ptree compile_commands_json = source_json.get_child("compile_commands");
for (auto &i : commands_json) { boost::property_tree::ptree run_commands_json = source_json.get_child("run_commands");
for (auto &i : compile_commands_json) {
terminal_cfg_.InsertCompileCommand(i.second.get_value<std::string>()); terminal_cfg_.InsertCompileCommand(i.second.get_value<std::string>());
} }
for (auto &i : run_commands_json) {
terminal_cfg_.SetRunCommand(i.second.get_value<std::string>());
}
} }
}
void MainConfig::GenerateKeybindings() { void MainConfig::GenerateKeybindings() {
DEBUG("Fetching keybindings"); DEBUG("Fetching keybindings");

3
juci/config.json

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

Loading…
Cancel
Save