- # create the relative launcher and add it to the files to add
- if ("profile" in config.APPLICATION and
- "product" in config.APPLICATION.profile):
- launcher_name = config.APPLICATION.profile.launcher_name
- launcher_package = produce_relative_launcher(config,
- logger,
- tmp_working_dir,
- launcher_name,
- binaries_dir_name,
- not(options.without_commercial))
-
- d_products["launcher"] = (launcher_package, launcher_name)
- if options.sources:
- # if we mix binaries and sources, we add a copy of the launcher,
- # prefixed with "bin",in order to avoid clashes
- d_products["launcher (copy)"] = (launcher_package, "bin"+launcher_name)
- else:
- # Provide a script for the creation of an application EDF style
- appli_script = product_appli_creation_script(config,
- logger,
- tmp_working_dir,
- binaries_dir_name)
-
- d_products["appli script"] = (appli_script, "create_appli.py")
+ # create an archives of compilation logs, and insert it into the tarball
+ logpath=os.path.join(config.APPLICATION.workdir, "LOGS")
+ path_targz_logs = os.path.join(tmp_working_dir, "logs.tgz")
+ tar_log = tarfile.open(path_targz_logs, mode='w:gz')
+ tar_log.add(logpath, arcname="LOGS")
+ tar_log.close()
+ d_products["LOGS"] = (path_targz_logs, "logs.tgz")
+
+ # for packages of SALOME applications including KERNEL,
+ # we produce a salome launcher or a virtual application (depending on salome version)
+ if 'KERNEL' in config.APPLICATION.products:
+ VersionSalome = src.get_salome_version(config)
+ # Case where SALOME has the launcher that uses the SalomeContext API
+ if VersionSalome >= 730:
+ # create the relative launcher and add it to the files to add
+ launcher_name = src.get_launcher_name(config)
+ launcher_package = produce_relative_launcher(config,
+ logger,
+ tmp_working_dir,
+ launcher_name,
+ binaries_dir_name)
+ d_products["launcher"] = (launcher_package, launcher_name)
+
+ # if the application contains mesa products, we generate in addition to the
+ # classical salome launcher a launcher using mesa and called mesa_salome
+ # (the mesa launcher will be used for remote usage through ssh).
+ if generate_mesa_launcher:
+ #if there is one : store the use_mesa property
+ restore_use_mesa_option=None
+ if ('properties' in config.APPLICATION and
+ 'use_mesa' in config.APPLICATION.properties):
+ restore_use_mesa_option = config.APPLICATION.properties.use_mesa
+
+ # activate mesa property, and generate a mesa launcher
+ src.activate_mesa_property(config) #activate use_mesa property
+ launcher_mesa_name="mesa_"+launcher_name
+ launcher_package_mesa = produce_relative_launcher(config,
+ logger,
+ tmp_working_dir,
+ launcher_mesa_name,
+ binaries_dir_name)
+ d_products["launcher (mesa)"] = (launcher_package_mesa, launcher_mesa_name)
+
+ # if there was a use_mesa value, we restore it
+ # else we set it to the default value "no"
+ if restore_use_mesa_option != None:
+ config.APPLICATION.properties.use_mesa=restore_use_mesa_option
+ else:
+ config.APPLICATION.properties.use_mesa="no"
+
+ if options.sources:
+ # if we mix binaries and sources, we add a copy of the launcher,
+ # prefixed with "bin",in order to avoid clashes
+ launcher_copy_name="bin"+launcher_name
+ launcher_package_copy = produce_relative_launcher(config,
+ logger,
+ tmp_working_dir,
+ launcher_copy_name,
+ binaries_dir_name)
+ d_products["launcher (copy)"] = (launcher_package_copy, launcher_copy_name)
+ else:
+ # Provide a script for the creation of an application EDF style
+ appli_script = product_appli_creation_script(config,
+ logger,
+ tmp_working_dir,
+ binaries_dir_name)
+
+ d_products["appli script"] = (appli_script, "create_appli.py")