]> 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 63beb0c99eb947c43fe20cfddf75de534b9caf7a..919e1975f0cfc379eb142428982b8a8bba15b209 100755 (executable)
@@ -46,10 +46,13 @@ namespace bbstd
   void ExecSystemCommand::bbUserSetDefaultValues() 
   { 
     bbSetInputIn("help");
+       bbSetInputVerbose(true);
   }
+
   void ExecSystemCommand::bbUserInitializeProcessing() 
   { 
   }
+
   void ExecSystemCommand::bbUserFinalizeProcessing() 
   {
   }
@@ -79,10 +82,18 @@ namespace bbstd
       }
 //      #if defined(_WIN32)
 //         ccommand="start /b "+ccommand;
-//      #endif // defined(_WIN32)      
-         std::cout << "*** Executing system command : '"<<ccommand<<"'"<<std::endl;
-         
-         result = system ( ccommand.c_str() );
+//      #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;