Salome HOME
fix import src.salomeTools in job.py
[tools/sat.git] / commands / application.py
index 55d2d30d1153f226fe8799abbdac63cd47fd93db..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
 
@@ -247,7 +257,7 @@ def get_SALOME_modules(config):
     l_modules = []
     for product in config.APPLICATION.products:
         product_info = src.product.get_product_config(config, product)
-        if (src.product.product_is_SALOME(product_info) or 
+        if (src.product.product_is_salome(product_info) or 
                src.product.product_is_generated(product_info)):
             l_modules.append(product)
     return l_modules
@@ -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