- #environment file: configGUI.sh
- f =open(os.path.join(home_dir,'env.d','configGUI.sh'),'w')
- command = """export SalomeAppConfig=${HOME}/${APPLI}
+ # Create environment file: configSalome.sh
+ with open(os.path.join(home_dir, 'env.d', 'configSalome.sh'),'w') as f:
+ for module in _config.get("modules", []):
+ command = 'export '+ module + '_ROOT_DIR=${HOME}/${APPLI}\n'
+ f.write(command)
+ pass
+ if _config.has_key("samples_path"):
+ command = 'export DATA_DIR=' + _config["samples_path"] +'\n'
+ f.write(command)
+ pass
+ if _config.has_key("resources_path") and os.path.isfile(_config["resources_path"]):
+ command = 'export USER_CATALOG_RESOURCES_FILE=' + os.path.abspath(_config["resources_path"]) +'\n'
+ f.write(command)
+
+ # Create configuration file: configSalome.cfg
+ with open(os.path.join(home_dir, 'env.d', 'configSalome.cfg'),'w') as f:
+ command = "[SALOME ROOT_DIR (modules) Configuration]\n"
+ f.write(command)
+ for module in _config.get("modules", []):
+ command = module + '_ROOT_DIR=${HOME}/${APPLI}\n'
+ f.write(command)
+ pass
+ if _config.has_key("samples_path"):
+ command = 'DATA_DIR=' + _config["samples_path"] +'\n'
+ f.write(command)
+ pass
+ if _config.has_key("resources_path") and os.path.isfile(_config["resources_path"]):
+ command = 'USER_CATALOG_RESOURCES_FILE=' + os.path.abspath(_config["resources_path"]) +'\n'
+ f.write(command)
+
+
+ # Create environment file: configGUI.sh
+ with open(os.path.join(home_dir, 'env.d', 'configGUI.sh'),'w') as f:
+ command = """export SalomeAppConfig=${HOME}/${APPLI}