Salome HOME
integration derniers ajustements pour windows
authorcrouzet <nicolas.crouzet@cea.fr>
Thu, 14 Nov 2019 09:41:44 +0000 (10:41 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Thu, 14 Nov 2019 09:41:44 +0000 (10:41 +0100)
commands/package.py
src/architecture.py
src/environment.py
src/internal_config/README_BIN.template
src/internal_config/README_LAUNCHER.template
src/internal_config/salomeTools_win.pyconf

index 03d10559c40a2503a3a4a053d73e5837837ff9b0..c28a6a8f35f6cfa60117c2a2913f8f0b284e432e 100644 (file)
@@ -254,8 +254,15 @@ def produce_relative_launcher(config,
                           for_package = binaries_dir_name)
     
     # Little hack to put out_dir_Path outside the strings
-    src.replace_in_file(filepath, 'r"out_dir_Path', 'out_dir_Path + r"' )
-    src.replace_in_file(filepath, "r'out_dir_Path + ", "out_dir_Path + r'" )
+    if src.architecture.is_windows():
+        src.replace_in_file(filepath, '=out_dir_Path', '=%out_dir_Path%' )
+        src.replace_in_file(filepath, ';out_dir_Path', ';%out_dir_Path%' )
+        src.replace_in_file(filepath, 'out_dir_Path;', '%out_dir_Path%;' )
+        src.replace_in_file(filepath, 'r"out_dir_Path', '%out_dir_Path% + r"' )
+        src.replace_in_file(filepath, "r'out_dir_Path + ", "%out_dir_Path% + r'" )
+    else:
+        src.replace_in_file(filepath, 'r"out_dir_Path', 'out_dir_Path + r"' )
+        src.replace_in_file(filepath, "r'out_dir_Path + ", "out_dir_Path + r'" )
     
     # A hack to put a call to a file for distene licence.
     # It does nothing to an application that has no distene product
@@ -358,6 +365,7 @@ def produce_relative_env_files(config,
     # Little hack to put out_dir_Path as environment variable
     if src.architecture.is_windows() :
       src.replace_in_file(filepath, '"out_dir_Path', '"%out_dir_Path%' )
+      src.replace_in_file(filepath, '=out_dir_Path', '=%out_dir_Path%' )
     else:
       src.replace_in_file(filepath, '"out_dir_Path', '"${out_dir_Path}' )
 
@@ -613,8 +621,10 @@ WARNING: existing binaries directory from previous detar installation:
                          1)
  
     # construct the name of the directory that will contain the binaries
-    binaries_dir_name = config.INTERNAL.config.binary_dir + config.VARS.dist
-    
+    if src.architecture.is_windows():
+        binaries_dir_name = config.INTERNAL.config.binary_dir
+    else:
+        binaries_dir_name = config.INTERNAL.config.binary_dir + config.VARS.dist
     # construct the correlation table between the product names, there 
     # actual install directories and there install directory in archive
     d_products = {}
@@ -1270,6 +1280,8 @@ In the following, $$ROOT represents the directory where you have installed
 SALOME (the directory where this file is located).
 
 """
+        if src.architecture.is_windows():
+            readme_header = readme_header.replace('$$ROOT','%ROOT%')
         readme_compilation_with_binaries="""
 
 compilation based on the binaries used as prerequisites
@@ -1314,6 +1326,16 @@ The procedure to do it is:
 
         if options.binaries or options.sources:
             d['application'] = config.VARS.application
+            d['BINARIES']    = config.INTERNAL.config.install_dir
+            d['SEPARATOR'] = config.VARS.sep
+            if src.architecture.is_windows():
+                d['operatingSystem'] = 'Windows'
+                d['PYTHON3'] = 'python3'
+                d['ROOT']    = '%ROOT%'
+            else:
+                d['operatingSystem'] = 'Linux'
+                d['PYTHON3'] = ''
+                d['ROOT']    = '$ROOT'
             f.write("# Application: " + d['application'] + "\n")
             if 'KERNEL' in config.APPLICATION.products:
                 VersionSalome = src.get_salome_version(config)
index 662578ec0fe062db00331cda8c3f81fd78cb0d20..b6b368896234bd0f3eefcbf4fdf5d696058212ec 100644 (file)
@@ -97,7 +97,7 @@ def get_distrib_version(distrib):
     '''
 
     if is_windows():
-        return "64"
+        return platform.release()
 
     # get version from platform
     dist_version=platform.dist()[1].split('.')
index 5c4c11cd653dcf03e55c7b4899f8cd6e586b2cd3..e6540b050c841f4c83dc9ff3319726d61125d1a5 100644 (file)
@@ -380,7 +380,11 @@ class SalomeEnviron:
         """
         
         if self.for_package:
-           self.set("PRODUCT_ROOT_DIR", "out_dir_Path")
+           if src.architecture.is_windows():
+              self.set("PRODUCT_ROOT_DIR", "%out_dir_Path%")
+           else:
+              self.set("PRODUCT_ROOT_DIR", "out_dir_Path")
+
         else:
            self.cfg.APPLICATION.environ.PRODUCT_ROOT_DIR = src.pyconf.Reference(self.cfg, src.pyconf.DOLLAR, "workdir")
 
index 2f0154d715dd0cdc68ffbaf58c91c48eb85a8d7e..c4bc00c46c4ae91d4d63a37d7bbd10e774da3938 100644 (file)
@@ -3,10 +3,10 @@ Binaries
 ========
 
 This package includes a binary installation of the application ¤{application}.
-The binaries are stored in BINARIES directory.
+The binaries are stored in ¤{BINARIES} directory.
 
-Warning : This binary installation depends upon some native linux packages. 
+Warning : This binary installation depends upon some native ¤{operatingSystem} packages.
 If some of these packages are missing on your system, the execution may fail. 
-If this is the case, please install the missing ones with your linux package manager.
+If this is the case, please install the missing ones with your ¤{operatingSystem} package manager.
 
 
index 984c4cd6fa618b49fd454a23f9bd9dcd599195d9..e9be1c11643961b6f5e7febff26f9ad353a8af07 100644 (file)
@@ -1,12 +1,12 @@
 
 To run the application, launch the following command:
-> $ROOT/¤{launcher}
+> ¤{PYTHON3} ¤{ROOT}¤{SEPARATOR}¤{launcher}
 
-Note for the use of Salome on a remote computer through ssh: 
-    When salome is used on a remote machine, the use of openGL 3 is not compatible with X11 forwarding (ssh -X).
+Note for the use of SALOME on a remote computer through ssh:
+    When SALOME is used on a remote machine, the use of openGL 3 is not compatible with X11 forwarding (ssh -X).
     This cause segmentation faults when the 3D viewers are used.
-    For people who have no other choice and need to use ssh, we provide a mesa laucher called $ROOT/mesa_¤{launcher}. 
+    For people who have no other choice and need to use ssh, we provide a MESA launcher called ¤{ROOT}¤{SEPARATOR}mesa_¤{launcher}.
     It will avoid the segmentation faults, at the price of poor performance : it should only be used in this case!
     If performance is required, a solution based on the use of VirtualGL and TurboVNC/x2go would be recommended.
-    But this requires some configuration of the tools to be done as root.
+    But this requires some configuration of the tools to be done as system administrator.
 
index 7d9165fe5a74629647723074980795a802314209..53eae6c616d1f41471897a6913bc4e8a35d350fd 100644 (file)
@@ -8,7 +8,7 @@ INTERNAL :
     {    
         copy_prefix : "LOCAL_"
         install_dir : "W64"
-        binary_dir : ""
+        binary_dir : "W64"
         single_install_dir : "EXT"
     }
     log :