]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdExecSystemCommand.cxx
#3474 bug profile_creatools in Linux/Win32
[bbtk.git] / packages / std / src / bbstdExecSystemCommand.cxx
index 182fd342426885dac9607765af8938c679109317..919e1975f0cfc379eb142428982b8a8bba15b209 100755 (executable)
@@ -46,10 +46,13 @@ namespace bbstd
   void ExecSystemCommand::bbUserSetDefaultValues() 
   { 
     bbSetInputIn("help");
+       bbSetInputVerbose(true);
   }
+
   void ExecSystemCommand::bbUserInitializeProcessing() 
   { 
   }
+
   void ExecSystemCommand::bbUserFinalizeProcessing() 
   {
   }
@@ -77,14 +80,22 @@ namespace bbstd
                  ccommand[i]=34;
         }
       }
-      #if defined(_WIN32)
-           ccommand="start /b "+ccommand;
-      #endif // defined(_WIN32)        
-         std::cout << "*** Executing system command : '"<<ccommand<<"'"<<std::endl;
-         
-         result = system ( ccommand.c_str() );
+//      #if defined(_WIN32)
+//         ccommand="start /b "+ccommand;
+//      #endif // defined(_WIN32)
+
+        
+#ifdef __APPLE__
+        ccommand = "source ~/.bbtk/profile_creatools ; " + ccommand;
+#endif
+        
+               if (bbGetInputVerbose()==true) 
+               {
+                       std::cout << "*** Executing system command : '"<<ccommand<<"'"<<std::endl;
+               }  
+        result = system ( ccommand.c_str() );
          
-         std::cout << "DFGO - ExecSystemCommand::DoProcess result=" << result << std::endl;
+         //std::cout << "DFGO - ExecSystemCommand::DoProcess result=" << result << std::endl;
          
          //DFGO - if return code is different than 0 result is equal 1