From: Cédric Aguerre Date: Thu, 10 Apr 2014 13:26:52 +0000 (+0200) Subject: add context file X-Git-Tag: V7_4_0b1~4^2~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a467be1b4cbf4dadf555c49d2a01d3913b4334a1;p=modules%2Fkernel.git add context file --- diff --git a/bin/appli_gen.py b/bin/appli_gen.py index a1d58af08..922a8b661 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -41,6 +41,7 @@ import virtual_salome # --- names of tags in XML configuration file appli_tag = "application" prereq_tag = "prerequisites" +context_tag = "context" system_conf_tag = "system_conf" modules_tag = "modules" module_tag = "module" @@ -84,6 +85,10 @@ class xml_parser: if self.space == [appli_tag, prereq_tag] and path_att in attrs.getNames(): self.config["prereq_path"] = attrs.getValue( path_att ) pass + # --- if we are analyzing "context" element then store its "path" attribute + if self.space == [appli_tag, context_tag] and path_att in attrs.getNames(): + self.config["context_path"] = attrs.getValue( path_att ) + pass # --- if we are analyzing "system_conf" element then store its "path" attribute if self.space == [appli_tag, system_conf_tag] and path_att in attrs.getNames(): self.config["system_conf_path"] = attrs.getValue( path_att ) @@ -217,15 +222,21 @@ def install(prefix,config_file,verbose=0): else: print "WARNING: prerequisite file does not exist" pass - # :NOTE: For the new launch procedure, we do not use a "physical" .cfg - # file for prerequisites; the launch procedure automatically reads and - # converts the envProducts.sh file. + + if os.path.isfile(_config["context_path"]): + command='cp -p ' + _config["context_path"] + ' ' + os.path.join(home_dir,'env.d','envProducts.cfg') + os.system(command) + pass + else: + print "WARNING: context file does not exist" + pass if _config.has_key("system_conf_path") and os.path.isfile(_config["system_conf_path"]): command='cp -p ' + _config["system_conf_path"] + ' ' + os.path.join(home_dir,'env.d','envConfSystem.sh') os.system(command) pass + # Create environment file: configSalome.sh f =open(os.path.join(home_dir,'env.d','configSalome.sh'),'w') for module in _config["modules"]: