]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Improve pick-up environment mechanizm
authorvsr <vsr@opencascade.com>
Wed, 24 Mar 2004 15:16:33 +0000 (15:16 +0000)
committervsr <vsr@opencascade.com>
Wed, 24 Mar 2004 15:16:33 +0000 (15:16 +0000)
runInstall

index 50aaa59c6838ad31e1733940a2776e5a1fa53f1b..2f81342139fa2f57b02e0127b677b87a251bcb20 100755 (executable)
@@ -284,7 +284,8 @@ class Product :
                  theDependencies       = None,
                  theInstalldiskspace   = None,
                  theTemporarydiskspace = None,
-                 theScript             = None):
+                 theScript             = None,
+                 thePickUpEnvironment  = None):
         
 
         self.name               = theName
@@ -296,6 +297,7 @@ class Product :
         self.installdiskspace   = theInstalldiskspace
         self.temporarydiskspace = theTemporarydiskspace
         self.script             = theScript
+        self.pickupEnv          = thePickUpEnvironment
 
 #===================================================================
 # class Config
@@ -343,6 +345,9 @@ class ConfigParser(xmllib.XMLParser):
                            attrs['temporarydiskspace'],
                            attrs['script'])
 
+        if attrs.has_key( 'pickupenv' ):
+            aProduct.pickupEnv = attrs['pickupenv']
+
         self.products.append(aProduct)
 
     def end_product(self):
@@ -545,7 +550,8 @@ if __name__ == "__main__":
     #list_of_dep =  get_dependencies_set(parser.products)
 
     if check_disk_space(parser.products, scripts_dir, target_dir, tmp_dir) :
+
+        # install products
         for product in parser.products :
 
             if product.disable == "true": continue
@@ -561,20 +567,21 @@ 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" )
+        # pickup environment
+        for product in parser.products :
+
+            if product.disable == "true": continue
+
+            if product.pickupEnv == "true":
+                cmd = scripts_dir +  product.script + " " + \
+                      "pickup_env " + \
+                      tmp_dir + " " + \
+                      source_dir + "/" + subdir[product.install] + " " + \
+                      target_dir + " " + \
+                      '"' + list_of_dep + '"' + " " + \
+                      product.name
+                
+                res = os.system(cmd)
 
     if len(root_path) and os.path.exists(root_path):
         os.system("rm -r -f "+ root_path)