_('Optional: The name or full path of the archive.'), None)
parser.add_option('', 'add_files', 'list2', 'add_files',
_('Optional: The list of additional files to add to the archive.'), [])
+parser.add_option('', 'without_commercial', 'boolean', 'with_commercial',
+ _('Optional: do not add commercial licence.'), False)
def add_files(tar, name_archive, d_content, logger):
'''Create an archive containing all directories and files that are given in
logger,
file_dir,
file_name,
- binaries_dir_name):
+ binaries_dir_name,
+ with_commercial=True):
'''Create a specific SALOME launcher for the binary package. This launcher
uses relative paths.
launch_file = open(filepath, "w")
launch_file.write(before)
# Write
- writer.write_cfgForPy_file(launch_file, for_package = binaries_dir_name)
+ writer.write_cfgForPy_file(launch_file,
+ for_package = binaries_dir_name,
+ with_commercial=with_commercial)
launch_file.write(after)
launch_file.close()
if "profile" in config.APPLICATION:
launcher_name = config.APPLICATION.profile.launcher_name
launcher_package = produce_relative_launcher(config,
- logger,
- tmp_working_dir,
- launcher_name,
- binaries_dir_name)
+ logger,
+ tmp_working_dir,
+ launcher_name,
+ binaries_dir_name,
+ not(options.without_commercial))
d_products["launcher"] = (launcher_package, launcher_name)
else:
"""Class to manage the environment of SALOME.
"""
- def __init__(self, cfg, environ, forBuild=False, for_package=None):
+ def __init__(self,
+ cfg,
+ environ,
+ forBuild=False,
+ for_package=None,
+ enable_simple_env_script = True):
'''Initialization.
:param cfg Config: the global config
self.cfg = cfg
self.forBuild = forBuild
self.for_package = for_package
+ self.enable_simple_env_script = enable_simple_env_script
self.silent = False
def __repr__(self):
:param script_path str: a path to an environment script
:param logger Logger: The logger instance to display messages
"""
+ if not self.enable_simple_env_script:
+ return
# Check that the script exists
if not os.path.exists(script_path):
raise src.SatException(_("Environment script not found: %s") %
def write_cfgForPy_file(self,
filename,
additional_env = {},
- for_package = None):
+ for_package = None,
+ with_commercial = True):
"""Append to current opened aFile a cfgForPy
environment (SALOME python launcher).
env = SalomeEnviron(self.config,
tmp,
forBuild=False,
- for_package=for_package)
+ for_package=for_package,
+ enable_simple_env_script = with_commercial)
env.silent = self.silent
if self.env_info is not None: