]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix issue 0020160:[CEA:321] (installation wizard should make the difference between...
authorakl <akl@opencascade.com>
Fri, 27 Feb 2009 13:19:29 +0000 (13:19 +0000)
committerakl <akl@opencascade.com>
Fri, 27 Feb 2009 13:19:29 +0000 (13:19 +0000)
16 files changed:
config.xml
config_Debian_3.1.xml
config_Debian_4.0.xml
config_Debian_4.0_64bit.xml
config_Mandrake_10.1.xml
config_Mandriva_2006.0.xml
config_Mandriva_2006.0_64bit.xml
config_Mandriva_2007.0.xml
config_Mandriva_2008.0.xml
config_Mandriva_2008.0_64bit.xml
config_RedHatEnterprise_4.xml
config_RedHat_8.0.xml
config_RedHat_9.xml
config_Scientific_4.3.xml
config_Scientific_SL_4.2.xml
runInstall

index 286f60c3a82b3ac918eacd2c3d537c0827ed9172..06d61e4c60d818408287a39c651e625b299e76db 100644 (file)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Debian 4.0 64bit,Debian 3.1,Mandrake 10.1,Mandriva 2006.0,Mandriva 2006.0 64bit,Mandriva 2007.0,Mandriva 2008.0,Mandriva 2008.0 64bit,Red Hat 8.0,Red Hat 9,Red Hat Enterprise WS 4,Scientific SL 4.2,Scientific SL 4.3"
          targetdir="${HOME}/salome_4.1.2"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 5dc4fea4dd21ae55b42e532c2f1c4d6be74e9455..cd181158be04121b71cd1e1de7aa04993adf9108 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Debian 3.1"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 93eae4e2272cce87fc446e7b9ead0eef889db3a7..198dbea79bbb2b220c52054147baf8ac92c4c15b 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Debian 4.0"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index fca8979aba0bb82805fe178717a80802f809e580..a801c734fe437ac09a37a7d5b99f9dfa87417b18 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Debian 4.0 64bit"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 0c095d568e4231f5b0b266b2dc62ef52a73630f2..090a7ec8ce9e3f54bf6dce566d289aa2c1fffd99 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Mandrake 10.1"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 337879f5b0463fb33471b34a3fb872a49037e361..c14697c9f3b05cad84c1eb84a6e8361c6381c452 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Mandriva 2006.0"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 9e059a80dbe7051936230b4f507f156941c00958..f76cfc79be7080e26b9d8a202e951387bef37491 100755 (executable)
@@ -6,7 +6,8 @@
          license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Mandriva 2006.0 64bit"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index dd21050154d5a934adc2e087873a911d15d01ee0..8f3b9621fe16ebf788472da9e0dbe986d2f8a371 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Mandriva 2007.0"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 355ffba6ecfe895022c9316dddb408e3b6b89eb1..7539d5a69094acef8cf3a58affae389cb5b2caef 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Mandriva 2008.0"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 9e6f2708db7a8817aaed5e21fdf4999829f29571..fcb57f7990eafd00529df0cef8315f025aba35c7 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Mandriva 2008.0 64bit"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index f2fca5edec3ccaa0233fd449d8c614b2fbb18af6..b0dae8c5f90ef600e19d9408b1e7aa56daf6d83c 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Red Hat Enterprise WS 4"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 3ebcbe7604510779ad57813996cf2871c2e31f3e..5d5b45fcb1f3629b0fc58e4cfda1997cf9d56aa5 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Red Hat 8.0"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index fb38a90280eeb9ad225cded362de27c4f3697306..68803cdc42ad983f9c2f9769ef99c518278e2182 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Red Hat 9"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index c778a2e231cdd79761926d20aa7e62001a216747..76dcdb2ee7ace059f79c9b5a03a6ede70e67c499 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Scientific SL 4.3"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 974392bc0696fdbe9ad136d2df498b4c7d260a04..84dafc5b6984ad33794e995e6fbdbd21da3d8769 100755 (executable)
@@ -6,7 +6,8 @@
           license="&lt;h5>GNU LGPL&lt;/h5>"
          platforms="Scientific SL 4.2"
          targetdir="${HOME}/salome_4.1.4"
-         tempdir="/tmp"/>
+         tempdir="/tmp"
+         optionallibs="libcppunit,libblsurf"/>
 
   <buttons>
     <button label="Launch SALOME"
index 3f82079cd2fe104bb990f5ad95a1e1a6ac7dfc2b..70bfc6c47c4ea60d983f5601fc599020c4c9fee5 100755 (executable)
@@ -373,6 +373,7 @@ class Config :
     - SALOME platform version
     - Copyright and license info
     - Default target and temporary directories
+    - List of optional libraries for Salome
     """
     def __init__(self,
                  theVersion   = None,
@@ -381,7 +382,8 @@ class Config :
                  theLicense   = None,
                  thePlatforms = None,
                  theTargetdir = None,
-                 theTmpdir    = None):
+                 theTmpdir    = None,
+                 theOptLibs   = None):
         self.version   = strip(theVersion)
         self.caption   = strip(theCaption)
         self.copyright = strip(theCopyright)
@@ -389,6 +391,7 @@ class Config :
         self.platforms = strip(thePlatforms)
         self.targetdir = strip(theTargetdir)
         self.tmpdir    = strip(theTmpdir)
+        self.optlibs   = strip(theOptLibs)
 
 #==============================================================
 # class Product : pre-requisite product options
@@ -456,7 +459,8 @@ class ConfigParser:
                              configElem.getAttribute('license').strip(),
                              configElem.getAttribute('platforms').strip(),
                              configElem.getAttribute('targetdir').strip(),
-                             configElem.getAttribute('tempdir').strip())
+                             configElem.getAttribute('tempdir').strip(),
+                             configElem.getAttribute('optionallibs').strip())
         if not self.pltname and self.config.platforms:
             self.pltname = self.config.platforms.split(",")[0].strip()
         pass
@@ -1098,6 +1102,46 @@ def select_platform(all_platforms):
         pass
     return pltname, all_platforms[pltname]
 
+#==============================================================
+# Check existence of required libraries in system and
+# warn user if some ones are absent
+#===============================================================
+def check_not_found_libs(filepath, optlibs):
+    a_file = open(filepath, 'r')
+    nf_mand_libs = list()
+    nf_opt_libs = list()
+    pref_opt_libs = optlibs.split(",")
+    for line in a_file:
+        line = line.strip()
+        if not line:
+            continue
+        line = line.split(" ")[0]
+        if line in nf_mand_libs or line in nf_opt_libs:
+            continue
+        is_optional = False;
+        for opt_lib in pref_opt_libs:
+            if line.lower().startswith(opt_lib.lower().strip()):
+                is_optional = True
+                break
+        if is_optional:
+            nf_opt_libs.append(line)
+        else:
+            nf_mand_libs.append(line)
+        pass
+
+    msg = "=== WARNING: Some libraries are absent! ===\n"
+    if nf_mand_libs:
+        msg += "One or several MANDATORY libraries listed below are not found. SALOME may not work properly.\n\t"
+        msg += "\n\t".join(nf_mand_libs)
+        msg += "\n"
+    if nf_opt_libs:
+        msg += "One or several OPTIONAL libraries listed below are not found. This does not affect on the correct work of SALOME platform.\n\t"
+        msg += "\n\t".join(nf_opt_libs)
+    if nf_mand_libs or nf_opt_libs:
+        print msg
+    a_file.close()
+    pass
+
 #------------------------------------------------------------------#
 #                                                                  #
 #                    EXECUTION STARTS HERE                         #
@@ -1301,12 +1345,6 @@ if __name__ == "__main__":
         rm_src_tmp = "FALSE"
         pass
 
-    # modify *.la files, if --single-directory option was  -----------
-    if is_single_dir:
-        message("Modifying of *.la files of SALOME modules...")
-        cmd = '%s/modifyLaFiles.sh modify_la_files %s' % (scripts_dir, target_dir)
-        res = os.system(cmd)
-
     # pickup environment -----------
     message("Creating environment files")
     for product in parser.products :
@@ -1333,6 +1371,19 @@ if __name__ == "__main__":
             pass
         pass
 
+    if not is_force_src:
+        if is_single_dir:
+            # modify *.la files, if --single-directory option was pointed -----------
+            message("Modifying of *.la files of SALOME modules...")
+            cmd = '%s/modifyLaFiles.sh modify_la_files %s' % (scripts_dir, target_dir)
+            res = os.system(cmd)
+        else:
+            # check that all required libraries are in system
+            message("Check existence of Fortran and other required libraries...")
+            cmd = '%s/checkFortran.sh find_libraries %s > %s/not_found_libs.txt' % (scripts_dir, target_dir, tmp_dir)
+            if os.system(cmd):
+                check_not_found_libs("%s/not_found_libs.txt" % (tmp_dir), parser.config.optlibs)
+
     # clean temporary directory -----------
     message("Cleaning temporary directory")
     clean_all()