]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
0023225: [CEA 1642] Patches for Windows version of SALOME
authorvsr <vsr@opencascade.com>
Wed, 17 Feb 2016 09:09:37 +0000 (12:09 +0300)
committervsr <vsr@opencascade.com>
Wed, 17 Feb 2016 09:09:37 +0000 (12:09 +0300)
bin/runSession.py
bin/salomeContext.py
src/AppQuickStart/app-template/CMakeLists.txt

index 3e9bc16612aa97248860b3ee788ab76857ead886..8dac79131a2c40eba8c9d5ca6da2a6e8148f444e 100644 (file)
@@ -218,7 +218,10 @@ def __runLocalSession(command):
     return ("".join(outmsg), "".join(errmsg))
   else:
     absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','')
-    cmd = ["/bin/bash",  "--rcfile", absoluteAppliPath + "/.bashrc" ]
+    if sys.platform == "win32":
+      cmd = ["cmd", "/K", "set PROMPT=[SALOME] $P$G"]
+    else:
+      cmd = ["/bin/bash",  "--rcfile", absoluteAppliPath + "/.bashrc" ]
     proc = subprocess.Popen(cmd, shell=False, close_fds=True)
     return proc.communicate()
 #
index 7a89e9666250300eeacf871ac046996629bb54e8..f30c0151e4852165f20902e8e654eaaf6978682f 100644 (file)
@@ -153,7 +153,10 @@ class SalomeContext:
 
   """Append value to LD_LIBRARY_PATH environment variable"""
   def addToLdLibraryPath(self, value):
-    self.addToVariable('LD_LIBRARY_PATH', value)
+    if platform.system() == 'Windows':
+      self.addToVariable('PATH', value)
+    else:
+      self.addToVariable('LD_LIBRARY_PATH', value)
   #
 
   """Append value to DYLD_LIBRARY_PATH environment variable"""
index 69b01a7c440579fb20aa032a807a791595f25ee2..745fa79833f961b905c1edd2d7970b8aeff69cf4 100644 (file)
@@ -117,4 +117,5 @@ SALOME_INSTALL_SCRIPTS("${_salome_context_API_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_
 SET(_salome_context_BASHRC
    ${KERNEL_ROOT_DIR}/bin/salome/appliskel/.bashrc
 )
-SALOME_INSTALL_SCRIPTS("${_salome_context_BASHRC}" $ENV{[NAME_OF_APPLICATION]_PROFILE_ROOT_DIR})
+FILE(TO_CMAKE_PATH $ENV{[NAME_OF_APPLICATION]_PROFILE_ROOT_DIR} _[NAME_OF_APPLICATION]_PROFILE_ROOT_DIR)
+SALOME_INSTALL_SCRIPTS("${_salome_context_BASHRC}" ${_[NAME_OF_APPLICATION]_PROFILE_ROOT_DIR})