From: vsr Date: Wed, 24 Mar 2004 15:16:33 +0000 (+0000) Subject: Improve pick-up environment mechanizm X-Git-Tag: PAL_1_4_1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eb87ab81ad0bcc615fdd5c7c02401da7470e9d1f;p=tools%2Finstall.git Improve pick-up environment mechanizm --- diff --git a/runInstall b/runInstall index 50aaa59..2f81342 100755 --- a/runInstall +++ b/runInstall @@ -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)