From: vsr Date: Wed, 17 Feb 2016 09:09:37 +0000 (+0300) Subject: 0023225: [CEA 1642] Patches for Windows version of SALOME X-Git-Tag: V8_0_0rc2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=95fee90e1965dd00555234025bcf825a0bd4a8ad;p=modules%2Fkernel.git 0023225: [CEA 1642] Patches for Windows version of SALOME --- diff --git a/bin/runSession.py b/bin/runSession.py index 3e9bc1661..8dac79131 100644 --- a/bin/runSession.py +++ b/bin/runSession.py @@ -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() # diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 7a89e9666..f30c0151e 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -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""" diff --git a/src/AppQuickStart/app-template/CMakeLists.txt b/src/AppQuickStart/app-template/CMakeLists.txt index 8e70282c5..4b1769555 100644 --- a/src/AppQuickStart/app-template/CMakeLists.txt +++ b/src/AppQuickStart/app-template/CMakeLists.txt @@ -119,4 +119,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})