X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FmodelCDMProject.cpp;h=aa6fdebcfe45432d06dce302ce0a4e05a4064dfe;hb=edff8f949ff69c2c720478437a65bf1beff7923d;hp=a021a1025a7424a6c6e1149de3a21ff9f5e54a64;hpb=78a3d08edf8e9b8b11ba87c5a6a4f9211ae107d3;p=crea.git diff --git a/lib/creaDevManagerLib/modelCDMProject.cpp b/lib/creaDevManagerLib/modelCDMProject.cpp index a021a10..aa6fdeb 100644 --- a/lib/creaDevManagerLib/modelCDMProject.cpp +++ b/lib/creaDevManagerLib/modelCDMProject.cpp @@ -833,13 +833,34 @@ bool modelCDMProject::Connect(std::string*& result, const std::string& folder) return false; } //create plug command - std::string plugComm = "bbPlugPackage \"" + this->buildPath + "\" > \"" + this->buildPath + CDMUtilities::SLASH + "plugging.log\" 2>&1"; - std::cout << "executing '" << plugComm << "'" << std::endl; + std::string plugComm = "bbPlugPackage \"" + this->buildPath + "\""; + + std::string Comm = "gnome-terminal -e \"bash -c \\\""; + for (int i = 0; i < plugComm.size(); i++) + { + if(plugComm[i] == '"') + { + Comm+="\\\\\\\""; + } + else if(plugComm[i] == '\\') + { + Comm+="\\\\\\\\"; + } + else + { + Comm.push_back(plugComm[i]); + } + } + Comm += "; echo -e '\\a'; bash"; + Comm += "\\\"\""; + + + std::cout << "executing '" << Comm << "'" << std::endl; //execute plug command - if(system(plugComm.c_str())) + if(system(Comm.c_str())) { //if there was an error then report it - result = new std::string("There was an error plugging the packages of the project, please check the plugging.log in the build folder file to read more about the problem."); + result = new std::string("There was an error plugging the packages of the project, please check the console to read more about the problem."); return false; } #endif