]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMProject.cpp
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / modelCDMProject.cpp
index a021a1025a7424a6c6e1149de3a21ff9f5e54a64..aa6fdebcfe45432d06dce302ce0a4e05a4064dfe 100644 (file)
@@ -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