Salome HOME
fix import src.salomeTools in job.py
[tools/sat.git] / commands / application.py
index 4a0d9b9a681f2e169d675c7ebb838c0c9bb42ef9..b5f1ac9583e403bb46ed936dbef5d3c5783529e8 100644 (file)
@@ -42,6 +42,9 @@ parser.add_option('', 'gencat', 'string', 'gencat',
 parser.add_option('m', 'module', 'list2', 'modules',
     _("Optional: the restricted list of module(s) to include in the "
       "application"))
+parser.add_option('', 'use_mesa', 'boolean', 'use_mesa',
+    _("Optional: Create a launcher that will use mesa products\n\t"
+      "It can be usefull whan salome is used on a remote machine through ssh"))
 
 ##
 # Creates an alias for runAppli.
@@ -89,6 +92,13 @@ def create_config_file(config, modules, env_file, logger):
     flagline = False
     for m in modules:
         mm = src.product.get_product_config(config, m)
+        # do not include in virtual application application module!
+        if src.get_property_in_product_cfg(mm, "is_salome_application") == "yes":
+            continue
+        # do not include products that do not compile
+        if not src.product.product_compiles(mm):
+            continue
+        #obsolete?
         if src.product.product_is_smesh_plugin(mm):
             continue
 
@@ -416,6 +426,10 @@ def run(args, runner, logger):
     if options.modules:
         runner.cfg.APPLICATION.virtual_app['modules'] = options.modules
 
+    # activate mesa use in the generated application
+    if options.use_mesa:
+        src.activate_mesa_property(runner.cfg)
+
     # set name and application_name
     if options.name:
         runner.cfg.APPLICATION.virtual_app['name'] = options.name