Salome HOME
CMake: fixed minor bug: when a _ROOT_DIR variable was set by the user after
[modules/kernel.git] / bin / virtual_salome.py
index bf36a4b13f6622ec52fe8d0e06a6b028ce270b94..cf577713b84ad0ed70da9f41460b76dd66974612 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -7,7 +7,7 @@
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -135,7 +135,7 @@ def link_module(options):
     module_lib_dir=os.path.join(module_dir,get_lib_dir(),'salome')
     module_lib_py_dir=os.path.join(module_dir,get_lib_dir(),pyversio,'site-packages','salome')
     module_lib_py_shared_dir=os.path.join(module_dir,get_lib_dir(),pyversio,
-                                          'site-packages','salome','shared_modules')
+                                          'site-packages','salome')
     module_share_dir=os.path.join(module_dir,'share','salome')
     module_doc_gui_dir=os.path.join(module_dir,'doc','salome','gui')
     module_doc_tui_dir=os.path.join(module_dir,'doc','salome','tui')
@@ -143,13 +143,14 @@ def link_module(options):
     module_sharedoc_dir=os.path.join(module_dir,'share','doc','salome')
     module_sharedoc_gui_dir=os.path.join(module_dir,'share','doc','salome','gui')
     module_sharedoc_tui_dir=os.path.join(module_dir,'share','doc','salome','tui')
+    module_sharedoc_examples=os.path.join(module_dir,'share','doc','salome','examples')
 
     bin_dir=os.path.join(home_dir,'bin','salome')
     idl_dir=os.path.join(home_dir,'idl','salome')
     lib_dir=os.path.join(home_dir,'lib','salome')
     lib_py_dir=os.path.join(home_dir,'lib',pyversio,'site-packages','salome')
     lib_py_shared_dir=os.path.join(home_dir,'lib',pyversio,
-                                   'site-packages','salome','shared_modules')
+                                   'site-packages','salome')
     share_dir=os.path.join(home_dir,'share','salome')
     doc_gui_dir=os.path.join(home_dir,'doc','salome','gui')
     doc_tui_dir=os.path.join(home_dir,'doc','salome','tui')
@@ -157,6 +158,7 @@ def link_module(options):
     sharedoc_dir=os.path.join(home_dir,'share','doc','salome')
     sharedoc_gui_dir=os.path.join(home_dir,'share','doc','salome','gui')
     sharedoc_tui_dir=os.path.join(home_dir,'share','doc','salome','tui')
+    sharedoc_examples_dir=os.path.join(home_dir,'share','doc','salome','examples')
 
     if options.clear:
         rmtree(bin_dir)
@@ -211,7 +213,6 @@ def link_module(options):
         mkdir(lib_pypkg_dir)
         mkdir(lib_py_shared_dir)
         for fn in os.listdir(module_lib_py_dir):
-            if fn == "shared_modules": continue
             if fn == "salome": continue
             symlink(os.path.join(module_lib_py_dir, fn), os.path.join(lib_py_dir, fn))
             pass
@@ -236,6 +237,7 @@ def link_module(options):
         for fn in os.listdir(module_sharedoc_dir):
             if fn == 'gui':continue
             if fn == 'tui':continue
+            if fn == 'examples':continue
             symlink(os.path.join(module_sharedoc_dir, fn), os.path.join(sharedoc_dir, fn))
             pass
         pass
@@ -255,6 +257,14 @@ def link_module(options):
             symlink(os.path.join(module_sharedoc_tui_dir, fn), os.path.join(sharedoc_tui_dir, fn))
             pass
         pass
+      
+    #directory share/doc/salome/examples : create it and link content
+    if os.path.exists(module_sharedoc_examples):
+        mkdir(sharedoc_examples_dir)
+        for fn in os.listdir(module_sharedoc_examples):
+            symlink(os.path.join(module_sharedoc_examples, fn), os.path.join(sharedoc_examples_dir, fn))
+            pass
+        pass
 
     #directory share/salome : create it and link content
     if os.path.exists(module_share_dir):