]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Patrial fix of the issue 21727: [CEA 584] sending a Yacs graph from Windows to a... V6_5_BR
authorrnv <rnv@opencascade.com>
Mon, 8 Oct 2012 08:45:23 +0000 (08:45 +0000)
committerrnv <rnv@opencascade.com>
Mon, 8 Oct 2012 08:45:23 +0000 (08:45 +0000)
src/Launcher/Launcher_Job.cxx
src/Launcher/Launcher_Job_Command.cxx
src/Launcher/Launcher_Job_SALOME.cxx

index ae7d4814e11fb15b684e94bfa34b6c38e45e9255..1307fbf2274d056c6e57c67214c623024126cddf 100644 (file)
@@ -502,7 +502,11 @@ Launcher::Job::common_job_params()
     if (file.substr(0, 1) == std::string("/"))
       local_file = file;
     else
+#ifndef WIN32
       local_file = _local_directory + "/" + file;
+#else
+         local_file = file;
+#endif
     
     // remote file -> get only file name from in_files
     size_t found = file.find_last_of("/");
index f325898ed5b2bdf5187ee71cdcdd9173d18dedca..6f2fecebd12f2d2769d892b5718d45292d5631ab 100644 (file)
@@ -20,6 +20,7 @@
 // Author: André RIBES - EDF R&D
 //
 #include "Launcher_Job_Command.hxx"
+#include "Basics_DirUtils.hxx"
 
 #ifdef WITH_LIBBATCH
 #include <Batch/Batch_Constants.hxx>
@@ -54,7 +55,7 @@ Launcher::Job_Command::buildCommandScript(Batch::Parametre params, std::string l
 
   // File name
   std::string launch_date_port_file = launch_date;
-  std::string launch_script = "/tmp/runCommand_" + _job_file_name + "_" + launch_date + ".sh";
+  std::string launch_script = Kernel_Utils::GetTmpDir() + "runCommand_" + _job_file_name + "_" + launch_date + ".sh";
   std::ofstream launch_script_stream;
   launch_script_stream.open(launch_script.c_str(), std::ofstream::out);
    
index 5e80649d0cc71da5beef3d9d5d4ca3815977388d..85f6e1015eb2f6bae1e7b20c983252c3c94f5eae 100644 (file)
@@ -20,6 +20,7 @@
 // Author: André RIBES - EDF R&D
 //
 #include "Launcher_Job_SALOME.hxx"
+#include "Basics_DirUtils.hxx"
 
 #ifdef WITH_LIBBATCH
 #include <Batch/Batch_Constants.hxx>
@@ -64,9 +65,14 @@ Launcher::Job_SALOME::buildSalomeScript(Batch::Parametre params)
   // parameters
   std::string work_directory = params[Batch::WORKDIR].str();
 
-  std::string launch_script = "/tmp/runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
+  std::string launch_script = Kernel_Utils::GetTmpDir() + "runSalome_" + _job_file_name + "_" + _launch_date + ".sh";
   std::ofstream launch_script_stream;
-  launch_script_stream.open(launch_script.c_str(), std::ofstream::out);
+  launch_script_stream.open(launch_script.c_str(), 
+                            std::ofstream::out
+#ifdef WIN32           
+ | std::ofstream::binary   //rnv: to avoid CL+RF end of line on windows
+#endif
+                           );
    
   // Begin of script
   launch_script_stream << "#!/bin/sh -f" << std::endl;