else:
bin_kernel_install_dir = os.path.join(kernel_root_dir,"bin","salome")
+ # check if the application contains an application module
+ l_product_info = src.product.get_products_infos(config.APPLICATION.products.keys(),
+ config)
+ salome_application_name="Not defined"
+ for prod_name, prod_info in l_product_info:
+ # look for a salome application
+ if src.get_property_in_product_cfg(prod_info, "is_salome_application") == "yes":
+ salome_application_name=prod_info.name
+ continue
+ # if the application contains an application module, we set ABSOLUTE_APPLI_PATH to it
+ # if not we set it to KERNEL_INSTALL_DIR, which is sufficient, except for salome test
+ if salome_application_name == "Not defined":
+ app_root_dir=kernel_root_dir
+ else:
+ app_root_dir=os.path.join(binaries_dir_name, salome_application_name)
+
# Get the launcher template and do substitutions
withProfile = src.fileEnviron.withProfile
withProfile = withProfile.replace(
"ABSOLUTE_APPLI_PATH'] = 'KERNEL_INSTALL_DIR'",
- "ABSOLUTE_APPLI_PATH'] = out_dir_Path + '" + config.VARS.sep + kernel_root_dir + "'")
+ "ABSOLUTE_APPLI_PATH'] = out_dir_Path + '" + config.VARS.sep + app_root_dir + "'")
withProfile = withProfile.replace(
" 'BIN_KERNEL_INSTALL_DIR'",
" out_dir_Path + '" + config.VARS.sep + bin_kernel_install_dir + "'")
:return: The text to display for the package command description.
:rtype: str
'''
- return _("The package command creates an archive.\nThere are 4 kinds of "
- "archive, which can be mixed:\n 1- The binary archive. It contains all the product "
- "installation directories and a launcher,\n 2- The sources archive."
- " It contains the products archives, a project corresponding to "
- "the application and salomeTools,\n 3- The project archive. It "
- "contains a project (give the project file path as argument),\n 4-"
- " The salomeTools archive. It contains salomeTools.\n\nexample:"
- "\nsat package SALOME-master --bineries --sources")
+ return _("""
+The package command creates a tar file archive of a product.
+There are four kinds of archive, which can be mixed:
+
+ 1 - The binary archive.
+ It contains the product installation directories plus a launcher.
+ 2 - The sources archive.
+ It contains the product archives, a project (the application plus salomeTools).
+ 3 - The project archive.
+ It contains a project (give the project file path as argument).
+ 4 - The salomeTools archive.
+ It contains code utility salomeTools.
+
+example:
+ >> sat package SALOME-master --binaries --sources""")
def run(args, runner, logger):
'''method that is called when salomeTools is called with package parameter.