]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
If AAA is in module list and AAA_ROOT_DIR is not defined, trust the user
authoradam <adam>
Tue, 17 May 2011 09:48:27 +0000 (09:48 +0000)
committeradam <adam>
Tue, 17 May 2011 09:48:27 +0000 (09:48 +0000)
and take account AAA module.
If AAA_ROOT_DIR is defined but does not have a SalomeApp.xml in good places,
the AAA module is removed from GUI list.

bin/runSalome.py

index c6229908b08289d4756951d760d73bf52a62dd29..c604032df0c4b0dd66d0148bcde82f69327dff58 100755 (executable)
@@ -286,10 +286,14 @@ class SessionServer(Server):
             list_modules = []
             #keep only modules with GUI
             for m in modules_list:
-              fr1 = os.path.join(modules_root_dir[m],"share","salome","resources",m.lower(),"SalomeApp.xml")
-              fr2 = os.path.join(modules_root_dir[m],"share","salome","resources","SalomeApp.xml")
-              if os.path.exists(fr1) or os.path.exists(fr2):
+              if m not in modules_root_dir:
                 list_modules.insert(0,m)
+              else:
+                fr1 = os.path.join(modules_root_dir[m],"share","salome","resources",m.lower(),"SalomeApp.xml")
+                fr2 = os.path.join(modules_root_dir[m],"share","salome","resources","SalomeApp.xml")
+                if os.path.exists(fr1) or os.path.exists(fr2):
+                  list_modules.insert(0,m)
+            list_modules.reverse()
             self.SCMD2+=['--modules (%s)' % ":".join(list_modules)]
 
         if self.args.has_key('pyscript') and len(self.args['pyscript']) > 0:
@@ -505,7 +509,7 @@ def startSalome(args, modules_list, modules_root_dir):
     #
 
     if args["gui"]:
-        mySessionServ = SessionServer(args,modules_list,modules_root_dir)
+        mySessionServ = SessionServer(args,args['modules'],modules_root_dir)
         mySessionServ.setpath(modules_list,modules_root_dir)
         mySessionServ.run()