X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=commands%2Flauncher.py;h=3367535aa604b85f01d8997276477dfdb9cba4ed;hb=8907858912a4ceb6358a1f6659e8b9dbd6ef4ef4;hp=a353a6719e5f3335a4d2e1cd5c58975fcec8fbd0;hpb=7f20ea98ea0ed549cf45175d6f1edb5124829220;p=tools%2Fsat.git diff --git a/commands/launcher.py b/commands/launcher.py index a353a67..3367535 100644 --- a/commands/launcher.py +++ b/commands/launcher.py @@ -27,12 +27,13 @@ import src parser = src.options.Options() -parser.add_option('n', 'name', 'string', 'name', _('The name of the launcher ' - '(default is APPLICATION.profile.launcher_name)')) +parser.add_option('n', 'name', 'string', 'name', _('Optional: The name of the' + ' launcher (default is ' + 'APPLICATION.profile.launcher_name)')) parser.add_option('c', 'catalog', 'string', 'catalog', - _('The resources catalog to use')) + _('Optional: The resources catalog to use')) parser.add_option('', 'gencat', 'string', 'gencat', - _("Create a resources catalog for the specified machines " + _("Optional: Create a resources catalog for the specified machines " "(separated with ',') \n\tNOTICE: this command will ssh to retrieve" " information to each machine in the list")) @@ -96,7 +97,7 @@ def generate_launch_file(config, # Write the launcher file logger.write(_("Generating launcher for %s :\n") % src.printcolors.printcLabel(config.VARS.application), 1) - logger.write(" %s\n" %src.printcolors.printcLabel(filepath), 1) + logger.write(" %s\n" % src.printcolors.printcLabel(filepath), 1) # open the file and write into it launch_file = open(filepath, "w") @@ -349,7 +350,8 @@ def finish_profile_install(config, launcherPath): ## # Describes the command def description(): - return _("The launcher command generates a salome launcher.") + return _("The launcher command generates a SALOME launcher.\n\nexample:" + "\nsat launcher SALOME-master") ## # Runs the command. @@ -364,6 +366,15 @@ def run(args, runner, logger): # Verify that the APPLICATION section has a profile section src.check_config_has_profile( runner.cfg ) + # Verify that the profile is installed + if not src.product.check_installation( + src.product.get_product_config( + runner.cfg, + runner.cfg.APPLICATION.profile.product)): + msg = _("The profile of the application is not correctly installed.") + logger.write(src.printcolors.printcError(msg), 1) + return 1 + # Change the name of the file to create # if the corresponding option was called if options.name: