From: Serge Rehbinder Date: Thu, 16 Feb 2017 14:42:01 +0000 (+0100) Subject: FSAt package --binaries: substitute also the generated components paths X-Git-Tag: 5.0.0a1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1a0c0d6a9ab0e1becbc7a5a0d521bffac0c77475;p=tools%2Fsat.git FSAt package --binaries: substitute also the generated components paths --- diff --git a/commands/package.py b/commands/package.py index 4472fd4..14694f1 100644 --- a/commands/package.py +++ b/commands/package.py @@ -384,7 +384,8 @@ def binary_package(config, logger, options, tmp_working_dir): d_products[prod_name] = (install_dir, path_in_archive) # create the relative launcher and add it to the files to add - if "profile" in config.APPLICATION: + 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, diff --git a/src/environment.py b/src/environment.py index 0634ec5..a203a48 100644 --- a/src/environment.py +++ b/src/environment.py @@ -363,23 +363,7 @@ class SalomeEnviron: self.run_env_script("APPLICATION_%s" % sname, self.cfg.APPLICATION.environ_script[pscript], logger) - self.add_line(1) - - # If there is profile (SALOME), then define additional variables - if ('profile' in self.cfg.APPLICATION and - "product" in self.cfg.APPLICATION.profile): - profile_product = self.cfg.APPLICATION.profile.product - product_info_profile = src.product.get_product_config(self.cfg, - profile_product) - profile_share_salome = os.path.join(product_info_profile.install_dir, - "share", - "salome" ) - self.set( "SUITRoot", profile_share_salome ) - self.set( "SalomeAppConfig", - os.path.join(profile_share_salome, - "resources", - profile_product.lower() ) ) - + self.add_line(1) def set_salome_minimal_product_env(self, product_info, logger): """Sets the minimal environment for a SALOME product. @@ -568,6 +552,10 @@ class SalomeEnviron: pi.install_dir = os.path.join(self.cfg.APPLICATION.workdir, "INSTALL", pi.component_name) + if self.for_package: + pi.install_dir = os.path.join("out_dir_Path", + self.for_package, + pi.component_name) pi.source_dir = os.path.join(self.cfg.APPLICATION.workdir, "GENERATED", pi.component_name) @@ -672,18 +660,6 @@ class SalomeEnviron: self.add_line(1) self.add_comment('setting environ for all products') - # Set the application working directory - if src_root is None: - src_root = self.cfg.APPLICATION.workdir - self.set('SRC_ROOT', src_root) - - # SALOME variables - appli_name = "APPLI" - if "APPLI" in self.cfg and "application_name" in self.cfg.APPLI: - appli_name = self.cfg.APPLI.application_name - self.set("SALOME_APPLI_ROOT", - os.path.join(self.cfg.APPLICATION.workdir, appli_name)) - # Make sure that the python lib dirs are set after python if "Python" in self.cfg.APPLICATION.products: self.set_a_product("Python", logger) @@ -708,7 +684,7 @@ class SalomeEnviron: self.set_python_libdirs() - # set products + # set products for product in env_info: self.set_a_product(product, logger) @@ -847,4 +823,4 @@ def load_environment(config, build, logger): environ = SalomeEnviron(config, Environ(os.environ), build) environ.set_application_env(logger) environ.set_products(logger) - environ.finish(True) + environ.finish(True) \ No newline at end of file