Salome HOME
Pick-up environment for KERNEL
authorvsr <vsr@opencascade.com>
Tue, 23 Mar 2004 16:20:20 +0000 (16:20 +0000)
committervsr <vsr@opencascade.com>
Tue, 23 Mar 2004 16:20:20 +0000 (16:20 +0000)
runInstall

index c6e5bdf8f0cad9fca3e25d78f99820d8d6e0fbd5..50aaa59c6838ad31e1733940a2776e5a1fa53f1b 100755 (executable)
@@ -365,6 +365,12 @@ class ConfigParser(xmllib.XMLParser):
     def end_path(self):
         pass
 
+    def getProduct(self, prod):
+        for product in self.products:
+            if product.name == prod:
+                return product
+        return None
+
 #================================================================
 # get the path using file name
 #================================================================
@@ -555,5 +561,20 @@ if __name__ == "__main__":
             res = os.system(cmd)
             if res : break;
 
+        shFile  = target_dir + "/env_products.sh"
+        cshFile = target_dir + "/env_products.csh"
+        binProduct = parser.getProduct("KERNEL-Bin")
+        srcProduct = parser.getProduct("KERNEL-Src")
+        if binProduct:
+            if os.path.exists(shFile):
+                os.system( "cp " + shFile + " " + target_dir + "/KERNEL_" + binProduct.version + "/salome.sh" )
+            if os.path.exists(cshFile):
+                os.system( "cp " + cshFile + " " + target_dir + "/KERNEL_" + binProduct.version + "/salome.csh" )
+        if srcProduct:
+            if os.path.exists(shFile):
+                os.system( "cp " + shFile + " " + target_dir + "/KERNEL_SRC_" + binProduct.version + "/salome.sh" )
+            if os.path.exists(cshFile):
+                os.system( "cp " + cshFile + " " + target_dir + "/KERNEL_SRC_" + binProduct.version + "/salome.csh" )
+
     if len(root_path) and os.path.exists(root_path):
         os.system("rm -r -f "+ root_path)