# check that the command has been called with an application
src.check_config_has_application( runner.cfg )
+ # write warning if platform is not declared as supported
+ src.check_platform_is_supported( runner.cfg, logger )
+
# Print some informations
logger.write(_('Executing the compile commands in the build '
'directories of the products of '
product_pyconf_cfg[section].archive_info.archive_name =\
p_info.name + ".tgz"
- if (with_vcs) and src.product.product_is_vcs(p_info):
+ # save git repositories for vcs products, even if archive is not in VCS mode
+ # in this case the user will be able to change get_source flag and work with git
+ if src.product.product_is_vcs(p_info):
# in vcs mode we must replace explicitely the git server url
# (or it will not be found later because project files are not exported in archives)
for section in product_pyconf_cfg:
# check that the command has been called with an application
src.check_config_has_application( runner.cfg )
+ # write warning if platform is not declared as supported
+ src.check_platform_is_supported( runner.cfg, logger )
+
products_infos = src.product.get_products_list(options, runner.cfg, logger)
# Construct the arguments to pass to the clean, source and patch commands
## From GUI:
##
# Qt
-IF(NOT SALOME_GUI_BUILD_WITH_QT5)
- FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
-ELSE()
- FIND_PACKAGE(SalomeQt5 REQUIRED)
-ENDIF()
+FIND_PACKAGE(SalomeQt5 REQUIRED)
# Detection summary:
SALOME_PACKAGE_REPORT_AND_CHECK()
)
INSTALL(FILES ${Others_RESOURCES} DESTINATION ${SALOME_:sat:{PYCMP}_INSTALL_RES_DATA})
+INSTALL(FILES SalomeApp.xml RENAME SalomeAppSL.xml DESTINATION ${SALOME_:sat:{PYCMP}_INSTALL_RES_DATA})
details.append(message)
raise SatException( message )
+def check_platform_is_supported( config, logger ):
+ """check that the platform is supported, write warning if not.
+
+ :param config class 'common.pyconf.Config': The config.
+ """
+ if 'platform' in config.APPLICATION and config.VARS.dist not in config.APPLICATION.platform:
+ msg = "WARNING: Your application configuration is not supported on this platform (%s)\n"\
+ " Please consider using the native application!" % config.VARS.dist
+ logger.write("\n%s\n\n" % printcolors.printcWarning(msg), 1)
+ return
+
def check_config_has_profile( config, details = None ):
"""\
check that the config has the key APPLICATION.profile.
if not self.environ.is_defined("PATH"):
self.environ.set("PATH","")
+ if self.init_path:
+ self.output.write('\n'+self.indent)
+ self.add_echo("Modifier cette variable pour ne pas réinitialiser les PATHS")
+ self.output.write(self.indent+'reinitialise_paths=True\n\n')
def add_echo(self, text):
"""Add a comment
if separator in value:
raise Exception(msg % (key, value, separator))
- if (self.init_path and (not self.environ.is_defined(key))):
+ is_key_defined=self.environ.is_defined(key)
+ conditional_reinit=False
+ if (self.init_path and (not is_key_defined)):
# reinitialisation mode set to true (the default)
# for the first occurrence of key, we set it.
# therefore key will not be inherited from environment
+ self.output.write(self.indent+'if reinitialise_paths:\n'+self.indent)
self.set(key, value)
- return
+ self.output.write(self.indent+'else:\n'+self.indent)
+ conditional_reinit=True # in this case do not register value in self.environ a second time
# in all other cases we use append (except if value is already the key
do_append=True
- if self.environ.is_defined(key):
+ if is_key_defined:
value_list = self.environ.get(key).split(sep)
# rem : value cannot be expanded (unlike bash/bat case) - but it doesn't matter.
if value in value_list:
do_append=False # value is already in key path : we don't append it again
if do_append:
- self.environ.append_value(key, value,sep) # register value in self.environ
+ if not conditional_reinit:
+ self.environ.append_value(key, value,sep) # register value in self.environ
if key in self.specialKeys.keys():
#for these special keys we use the specific salomeContext function
self.output.write(self.begin+'addTo%s(r"%s")\n' %
if separator in value:
raise Exception(msg % (key, value, separator))
- if (self.init_path and (not self.environ.is_defined(key))):
+ is_key_defined=self.environ.is_defined(key)
+ conditional_reinit=False
+ if (self.init_path and (not is_key_defined)):
# reinitialisation mode set to true (the default)
# for the first occurrence of key, we set it.
# therefore key will not be inherited from environment
+ self.output.write(self.indent+'if reinitialise_paths:\n'+self.indent)
self.set(key, value)
- return
+ self.output.write(self.indent+'else:\n'+self.indent)
+ conditional_reinit=True # in this case do not register value in self.environ a second time
+
# in all other cases we use append (except if value is already the key
do_append=True
- if self.environ.is_defined(key):
+ if is_key_defined:
value_list = self.environ.get(key).split(sep)
# rem : value cannot be expanded (unlike bash/bat case) - but it doesn't matter.
if value in value_list:
do_append=False # value is already in key path : we don't append it again
if do_append:
- self.environ.append_value(key, value,sep) # register value in self.environ
+ if not conditional_reinit:
+ self.environ.append_value(key, value,sep) # register value in self.environ
if key in self.specialKeys.keys():
#for these special keys we use the specific salomeContext function
self.output.write(self.begin+'addTo%s(r"%s")\n' %
If some of these packages are missing on your system, the execution may fail.
If this is the case, please install the missing ones with your ¤{operatingSystem} package manager.
Note that you can use sat to check if the native prerequisites are installed on your system. The command is :
- ${ROOT}/sat config ¤{application} --check_system
+ ${ROOT}/sat/sat config ¤{application} --check_system
sat is located in $ROOT and you can read its documentation in
$ROOT/sat/doc or by using:
-> $ROOT/sat --help
+> $ROOT/sat/sat --help
If you use bash, you can have completion for sat by sourcing $ROOT/sat/complete_sat.sh:
> source $ROOT/sat/complete_sat.sh
a) Preparing the sources of your application
============================================
Type the following command to get the source and apply the patches:
-> $ROOT/sat prepare ¤{application}
+> $ROOT/sat/sat prepare ¤{application}
The sources are retrieved from tgz archives located in ARCHIVES directory (or from VCS tools
if they were included)
b) Build ¤{application}
=======================
Type the following command to compile and install the products of your application:
-> $ROOT/sat -t compile ¤{application}
+> $ROOT/sat/sat -t compile ¤{application}
The -t option displays the compilation logs in the terminal.
c) Set environment for libraries inside ¤{application}
======================================================
Type the following command to produce the environment files:
-> $ROOT/sat environ ¤{application}
+> $ROOT/sat/sat environ ¤{application}
d) Create a SALOME launcher
===========================
Create the launcher:
-> $ROOT/sat launcher ¤{application}
+> $ROOT/sat/sat launcher ¤{application}
IMPORTANT :
If your package already contains a binary installation