]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
variable environnement out_dir_Path selon OS
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 3 Sep 2019 11:51:03 +0000 (13:51 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 3 Sep 2019 11:51:03 +0000 (13:51 +0200)
commands/package.py
src/environment.py

index 68817fb5881c7bb5c4ce37415cb44660ace97141..0a1c84aaa53f05f7f38b349033e397d1e9df9994 100644 (file)
@@ -256,7 +256,7 @@ def produce_relative_launcher(config,
     
     # Little hack to put out_dir_Path outside the strings
     src.replace_in_file(filepath, 'r"out_dir_Path', 'out_dir_Path + r"' )
-    
+
     # A hack to put a call to a file for distene licence.
     # It does nothing to an application that has no distene product
     if distene_licence_file_name:
@@ -356,7 +356,10 @@ def produce_relative_env_files(config,
                           for_package = binaries_dir_name)
 
     # Little hack to put out_dir_Path as environment variable
-    src.replace_in_file(filepath, '"out_dir_Path', '"${out_dir_Path}' )
+    if src.architecture.is_windows():
+      src.replace_in_file(filepath, '"out_dir_Path', '"%out_dir_Path%' )
+    else:
+      src.replace_in_file(filepath, '"out_dir_Path', '"${out_dir_Path}' )
 
     # change the rights in order to make the file executable for everybody
     os.chmod(filepath,
index 20a5c1eb95dc0b4f6a58873ffa657305a57909d0..d32a7cf15a40d32a606c315474053de1bae54ace 100644 (file)
@@ -428,6 +428,12 @@ class SalomeEnviron:
         :param product_info Config: The product description
         :param logger Logger: The logger instance to display messages        
         """
+
+        if src.architecture.is_windows():
+            out_dir_Path = "%out_dir_Path%"
+        else:
+            out_dir_Path = "out_dir_Path"
+
         # set root dir
         DBG.write("set_salome_minimal_product_env", product_info)
         root_dir = product_info.name + "_ROOT_DIR"
@@ -448,7 +454,7 @@ class SalomeEnviron:
                     if not self.for_package:
                         self.set(src_dir, product_info.source_dir)
                     else:
-                        self.set(src_dir, os.path.join("out_dir_Path",
+                        self.set(src_dir, os.path.join(out_dir_Path,
                                                        "SOURCES",
                                                        product_info.name))
 
@@ -589,6 +595,11 @@ class SalomeEnviron:
         :param logger Logger: The logger instance to display messages
         """
 
+        if src.architecture.is_windows():
+            out_dir_Path = "%out_dir_Path%"
+        else:
+            out_dir_Path = "out_dir_Path"
+
         # Get the informations corresponding to the product
         pi = src.product.get_product_config(self.cfg, product)
         
@@ -612,7 +623,7 @@ class SalomeEnviron:
                
         
         if self.for_package:
-            pi.install_dir = os.path.join("out_dir_Path",
+            pi.install_dir = os.path.join(out_dir_Path,
                                           self.for_package,
                                           pi.name)