From: crouzet Date: Thu, 20 Jul 2017 13:48:01 +0000 (+0200) Subject: maj du template X-Git-Tag: 5.0.0b2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d53ab78e7b11e451f195355521878ecf0cfd08f;p=tools%2Fsat.git maj du template --- diff --git a/commands/application.py b/commands/application.py index ddb3bb7..783fac4 100644 --- a/commands/application.py +++ b/commands/application.py @@ -234,7 +234,7 @@ def create_application(config, appli_dir, catalog, logger, display=True): SALOME_modules) if retcode == 0: - cmd = src.printcolors.printcLabel("%s/runAppli" % appli_dir) + cmd = src.printcolors.printcLabel("%s/salome" % appli_dir) if display: logger.write("\n", 3, False) diff --git a/data/templates/Cpp_Template/template.info b/data/templates/Cpp_Template/template.info index d9d639e..bb727b0 100644 --- a/data/templates/Cpp_Template/template.info +++ b/data/templates/Cpp_Template/template.info @@ -27,7 +27,7 @@ ignore_filters = '*.png' # a tuple = (parameter name, default value, prompt, validation method) parameters = [ (file_subst, "%(NAME)s"), - ("get_method", "archive", "get method for prepare", lambda l: l in ['cvs', 'git', 'archive']) + ("get_method", "dir", "archive", "get method for prepare", lambda l: l in ['cvs', 'git', 'archive', 'dir']) ] # configuration to use this component with sat @@ -36,7 +36,7 @@ pyconf = """ { name : "%(NAME)sCPP" component_name : "%(NAME)s" - get_sources : '%(get_method)s' + get_source : '%(get_method)s' build_source : 'autotools' git_info: { @@ -47,6 +47,10 @@ pyconf = """ { archive_name : '%(target)s' } + dir_info: + { + dir : '%(target)s' + } source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name depend : [ @@ -65,8 +69,8 @@ pyconf = """ opt_depend : [] properties : { - is_cpp : "yes" - environment : "salome" + cpp : "yes" + generate : "yes" has_salome_gui : "yes" logo : $source_dir + "/resources/%(NAME)s.png" } diff --git a/src/environment.py b/src/environment.py index 4adeb11..e397b99 100644 --- a/src/environment.py +++ b/src/environment.py @@ -393,16 +393,16 @@ class SalomeEnviron: l_binpath_libpath = [] # create additional ROOT_DIR for CPP components - if src.product.product_is_cpp(pi): - assert 'component_name' in pi, 'Error : CPP component should have a component_name field' + if 'component_name' in pi: compo_name = pi.component_name - compo_root_dir = compo_name + "_ROOT_DIR" - envcompo_root_dir = os.path.join( - self.cfg.TOOLS.common.install_root, compo_name ) - self.set(compo_root_dir , envcompo_root_dir) - bin_path = os.path.join(envcompo_root_dir, 'bin', 'salome') - lib_path = os.path.join(envcompo_root_dir, 'lib', 'salome') - l_binpath_libpath.append( (bin_path, lib_path) ) + if compo_name + "CPP" == pi.name: + compo_root_dir = compo_name + "_ROOT_DIR" + envcompo_root_dir = os.path.join( + self.cfg.TOOLS.common.install_root, compo_name ) + self.set(compo_root_dir , envcompo_root_dir) + bin_path = os.path.join(envcompo_root_dir, 'bin', 'salome') + lib_path = os.path.join(envcompo_root_dir, 'lib', 'salome') + l_binpath_libpath.append( (bin_path, lib_path) ) bin_path = os.path.join(env_root_dir, 'bin', 'salome') if src.get_property_in_product_cfg(pi, "fhs"):