Salome HOME
correction de sat package pour pouvoir créer des paquets sans lanceur (cas MEDCOUPLIN...
authorcrouzet <nicolas.crouzet@cea.fr>
Mon, 31 Jul 2017 12:00:53 +0000 (14:00 +0200)
committercrouzet <nicolas.crouzet@cea.fr>
Mon, 31 Jul 2017 12:00:53 +0000 (14:00 +0200)
commands/package.py
src/internal_config/README_BIN.template
src/internal_config/README_BIN_NO_PROFILE.template [deleted file]
src/internal_config/README_BIN_VIRTUAL_APP.template [new file with mode: 0644]
src/internal_config/README_LAUNCHER.template [new file with mode: 0644]
src/internal_config/README_PROJECT.template
src/internal_config/README_SAT.template

index ed58691f4677313722c7107df6dc85fdd32051e5..5c2da38c8c86430ac9f9a2b51b02c1a437cb7aea 100644 (file)
@@ -543,31 +543,34 @@ def binary_package(config, logger, options, tmp_working_dir):
         path_in_archive = os.path.join("SOURCES", prod_name)
         d_products[prod_name + " (sources)"] = (source_dir, path_in_archive)
 
-    # create the relative launcher and add it to the files to add
-    VersionSalome = src.get_salome_version(config)
-    # Case where SALOME has the launcher that uses the SalomeContext API
-    if VersionSalome >= 730:
-        launcher_name = src.get_launcher_name(config)
-        launcher_package = produce_relative_launcher(config,
-                                             logger,
-                                             tmp_working_dir,
-                                             launcher_name,
-                                             binaries_dir_name,
-                                             not(options.without_commercial))
-    
-        d_products["launcher"] = (launcher_package, launcher_name)
-        if options.sources:
-            # if we mix binaries and sources, we add a copy of the launcher, 
-            # prefixed  with "bin",in order to avoid clashes
-            d_products["launcher (copy)"] = (launcher_package, "bin"+launcher_name)
-    else:
-        # Provide a script for the creation of an application EDF style
-        appli_script = product_appli_creation_script(config,
-                                                    logger,
-                                                    tmp_working_dir,
-                                                    binaries_dir_name)
+    # for packages of SALOME applications including KERNEL, 
+    # we produce a salome launcher or a virtual application (depending on salome version)
+    if 'KERNEL' in config.APPLICATION.products:
+        VersionSalome = src.get_salome_version(config)
+        # Case where SALOME has the launcher that uses the SalomeContext API
+        if VersionSalome >= 730:
+            # create the relative launcher and add it to the files to add
+            launcher_name = src.get_launcher_name(config)
+            launcher_package = produce_relative_launcher(config,
+                                                 logger,
+                                                 tmp_working_dir,
+                                                 launcher_name,
+                                                 binaries_dir_name,
+                                                 not(options.without_commercial))
         
-        d_products["appli script"] = (appli_script, "create_appli.py")
+            d_products["launcher"] = (launcher_package, launcher_name)
+            if options.sources:
+                # if we mix binaries and sources, we add a copy of the launcher, 
+                # prefixed  with "bin",in order to avoid clashes
+                d_products["launcher (copy)"] = (launcher_package, "bin"+launcher_name)
+        else:
+            # Provide a script for the creation of an application EDF style
+            appli_script = product_appli_creation_script(config,
+                                                        logger,
+                                                        tmp_working_dir,
+                                                        binaries_dir_name)
+            
+            d_products["appli script"] = (appli_script, "create_appli.py")
 
     # Put also the environment file
     env_file = produce_relative_env_files(config,
@@ -1040,10 +1043,12 @@ The procedure to do it is:
 
 """
         readme_header_tpl=string.Template(readme_header)
-        readme_template_path_bin_prof = os.path.join(config.VARS.internal_dir,
+        readme_template_path_bin = os.path.join(config.VARS.internal_dir,
                 "README_BIN.template")
-        readme_template_path_bin_noprof = os.path.join(config.VARS.internal_dir,
-                "README_BIN_NO_PROFILE.template")
+        readme_template_path_bin_launcher = os.path.join(config.VARS.internal_dir,
+                "README_LAUNCHER.template")
+        readme_template_path_bin_virtapp = os.path.join(config.VARS.internal_dir,
+                "README_BIN_VIRTUAL_APP.template")
         readme_template_path_src = os.path.join(config.VARS.internal_dir,
                 "README_SRC.template")
         readme_template_path_pro = os.path.join(config.VARS.internal_dir,
@@ -1061,18 +1066,22 @@ The procedure to do it is:
 
         if options.binaries or options.sources:
             d['application'] = config.VARS.application
-            f.write("# Application: " + d['application'])
-            if 'profile' in config.APPLICATION:
-                d['launcher'] = config.APPLICATION.profile.launcher_name
-            else:
-                d['env_file'] = 'env_launch.sh'
+            f.write("# Application: " + d['application'] + "\n")
+            if 'KERNEL' in config.APPLICATION.products:
+                VersionSalome = src.get_salome_version(config)
+                # Case where SALOME has the launcher that uses the SalomeContext API
+                if VersionSalome >= 730:
+                    d['launcher'] = config.APPLICATION.profile.launcher_name
+                else:
+                    d['virtual_app'] = 'runAppli' # this info is not used now)
 
         # write the specific sections
         if options.binaries:
-            if "env_file" in d:
-                f.write(src.template.substitute(readme_template_path_bin_noprof, d))
-            else:
-                f.write(src.template.substitute(readme_template_path_bin_prof, d))
+            f.write(src.template.substitute(readme_template_path_bin, d))
+            if "virtual_app" in d:
+                f.write(src.template.substitute(readme_template_path_bin_virtapp, d))
+            if "launcher" in d:
+                f.write(src.template.substitute(readme_template_path_bin_launcher, d))
 
         if options.sources:
             f.write(src.template.substitute(readme_template_path_src, d))
index 23171e6f0ac7d9cc4eeefab0b39f36ffa89d118e..5307eb24206121037a048ed5ab3d265d4f42fc06 100644 (file)
@@ -1,16 +1,13 @@
 
-Binairies
-=========
+Binaries
+========
 
 This package includes a binary installation of the application ¤{application}.
 The binaries are stored in BINARIES directory.
 
-To run the application, launch the following command:
-> $ROOT/¤{launcher}
-
-This binary installation depends upon some native packages. 
+Warning : This binary installation depends upon some native packages. 
 If some of these packages are missing on your system, the execution may fail. 
-If this is the case, please check the file *_dep_sys_rpms.txt (it contains the known dependencies), 
+If this is the case, please check if the file *_dep_sys_rpms.txt is present (it contains the known dependencies), 
 and install the missing ones.
 
 
diff --git a/src/internal_config/README_BIN_NO_PROFILE.template b/src/internal_config/README_BIN_NO_PROFILE.template
deleted file mode 100644 (file)
index 13d0dbc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Binairies
-=========
-
-This package includes a binary installation of the application ¤{application}.
-The binaries are stored in BINARIES directory.
-
-You can produce a SALOME application (old style) by launching the following 
-command:
-
-> $ROOT/create_appli.py
-
-This command creates a SALOME application directory APPLI which contains a launcher.
-To start the application, run:
-> $ROOT/APPLI/runAppli
-
-
diff --git a/src/internal_config/README_BIN_VIRTUAL_APP.template b/src/internal_config/README_BIN_VIRTUAL_APP.template
new file mode 100644 (file)
index 0000000..8a1b0bd
--- /dev/null
@@ -0,0 +1,9 @@
+
+You can produce a SALOME virtual application by launching the following command:
+
+> $ROOT/create_appli.py
+
+This command creates a SALOME application directory APPLI which contains a launcher.
+To start the application, run:
+> $ROOT/APPLI/runAppli
+
diff --git a/src/internal_config/README_LAUNCHER.template b/src/internal_config/README_LAUNCHER.template
new file mode 100644 (file)
index 0000000..966b615
--- /dev/null
@@ -0,0 +1,4 @@
+
+To run the application, launch the following command:
+> $ROOT/¤{launcher}
+
index 0daff8a893252a27b21be409959075c13a963add..ec46821423694e9fff36dda67f4651904f1f625a 100644 (file)
@@ -1,4 +1,2 @@
 
-In the following, $ROOT represents the directory where this file is located.
-
 This package includes a salomeTools project.
index 96f6d3572cb5421d226700820b3ff3d9a5442c01..88ecbbc7ebee480bc5ccbd1319a959b3a4ae2eeb 100644 (file)
@@ -1,3 +1,4 @@
+
 This package includes salomeTools.
 
 You can add a project to salomeTools by editing the file $ROOT/data/site.pyconf