- 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)
+ #if res : break; # try_preinstalled can return 1
+
+ # pickup environment
+ message("Creating environment files")
+ for product in parser.products :
+
+ if check_bool(product.disable): continue
+
+ if check_bool(product.pickupEnv):
+ 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)
+
+ message("Cleaning temporary directory")
+ remove_dir(root_path)
+ message("Finished!")