]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix to bug PAL10465.
authorasv <asv@opencascade.com>
Tue, 27 Jun 2006 07:40:22 +0000 (07:40 +0000)
committerasv <asv@opencascade.com>
Tue, 27 Jun 2006 07:40:22 +0000 (07:40 +0000)
Modification of resource files location in "build" and "installation" directories.  Now resource files are placed in share/salome/resources/<module_name>.  Various configuration files (configure.in.base, make_module/conclude/commence, etc.) are changed.

13 files changed:
adm_local/unix/make_commence.in
adm_local/unix/make_conclude.in
bin/runLightSalome.csh
bin/runLightSalome.sh
configure.in.base
src/LightApp/resources/LightApp.ini
src/LightApp/resources/LightApp.xml
src/RegistryDisplay/RegWidget.cxx
src/SALOME_SWIG/supervisionexample.py
src/SALOME_SWIG/supervisionexample.py.in
src/SalomeApp/resources/SalomeApp.ini
src/SalomeApp/resources/SalomeApp.xml
src/TOOLSGUI/ToolsGUI_RegWidget.cxx

index 0a5de34a29e99c83951c17beb44823ee34a6a662..b3af3f7106bd04bc6977fdd0cb1cfaba0a575207 100644 (file)
@@ -1,6 +1,8 @@
 # common directories to put headerfiles
 inc_builddir=$(top_builddir)/include/salome
 
+MODULE_NAME=@MODULE_NAME@
+
 GUI_DISABLE_CORBA=@GUI_DISABLE_CORBA@
 DISABLE_GLVIEWER=@DISABLE_GLVIEWER@
 DISABLE_PYCONSOLE=@DISABLE_PYCONSOLE@
index 897154a7acadc30f0265068902d417b9c4aea010..da7a678e1e498f5528128fe1b016f209292e23bf 100644 (file)
@@ -191,11 +191,11 @@ RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
 
 resources: resources-po resources-cp 
 
-resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm)
+resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
 
-resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%)
+resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
 
-$(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%): $(top_builddir)/share/salome/resources/% : %
+$(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
        cp -fr $< $@;
 
 # Make installation directories if they don't exist.
@@ -255,19 +255,19 @@ $(EXPORT_SHAREDPYSCRIPTS:%=install-%): install-%: %
 
 # generic rule to install .qm files :
 install-qm: resources
-       $(INSTALL) -d $(datadir)/resources
-       @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm); do \
+       $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
+       @for f in X $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm); do \
           if test $$f != X; then                                                        \
-            ($(INSTALL_DATA) $$f $(datadir)/resources/. || exit 1);                     \
+            ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
           fi;                                                                           \
        done
 
 # generic rule to install resources files (png, ini ...):
 install-res: resources
-       $(INSTALL) -d $(datadir)/resources
-       @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%); do \
+       $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
+       @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
           if test $$f != X; then                                                        \
-            ($(INSTALL_DATA) $$f $(datadir)/resources/. || exit 1);                     \
+            ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
           fi;                                                                           \
        done  
 
@@ -318,7 +318,7 @@ uninstall:
 # Uninstall qm files
        @for f in X $(PO_FILES:%.po=%.qm); do         \
           if test $$f != X; then                                             \
-            $(LT_UNINSTALL) $(datadir)/resources/$$f ;                       \
+            $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ;                        \
           fi;                                                                \
        done
 
@@ -363,7 +363,7 @@ clean: mostlyclean
 #
 distclean: clean
        #remove qm file !
-       -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm)
+       -$(RM) $(PO_FILES:%.po=%.qm) $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm)
        #remove include files
        -$(RM) $(DEST_HEADERS)
        -$(RM) $(DISTCLEAN) *.bak *.old *.new .dep*
@@ -410,7 +410,7 @@ distclean: clean
 %_wrap.cxx : %.i
        $(SWIG) $(SWIG_FLAGS) -o $@ $<
 
-$(top_builddir)/share/salome/resources/%.qm: %.po
+$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm: %.po
        $(MSG2QM) $< $@ ; \
 
 #------------------------------------------------------------------------------
index 85675de23c5bee7924b6558a806d12c2c543e887..3a751e9933f9f2292b8b19bb7c1d69f11ffdfa86 100755 (executable)
@@ -1,9 +1,7 @@
 #!/bin/csh -f
 
-if ( ! $?SUITRoot )          setenv SUITRoot ${GUI_ROOT_DIR}/share/salome
-
 # this variable necessary for loading .ini or .xml file
-if ( ! $?LightAppConfig )    setenv LightAppConfig ${GUI_ROOT_DIR}/share/salome/resources
-if ( ! $?LightAppResources ) setenv LightAppResources ${GUI_ROOT_DIR}/share/salome/resources
+if ( ! $?LightAppConfig )    setenv LightAppConfig ${GUI_ROOT_DIR}/share/salome/resources/gui
+if ( ! $?LightAppResources ) setenv LightAppResources ${GUI_ROOT_DIR}/share/salome/resources/gui
 
 SUITApp LightApp -style salome $* &
index b2f67d65e897c594273abe6e8ab4ee762e19cbf8..df19ca7ba30d005bc9f87eb78b51cf0dfcbb36cb 100755 (executable)
 #
 #!/bin/bash -f
 
-if [ -z "$SUITRoot" ] ; then          
-  export SUITRoot=${GUI_ROOT_DIR}/share/salome
-fi
 # this variable necessary for loading .ini or .xml file
 if [ -z "$LightAppConfig" ] ; then
-  export LightAppConfig=${GUI_ROOT_DIR}/share/salome/resources
+  export LightAppConfig=${GUI_ROOT_DIR}/share/salome/resources/gui
 fi
 if [ -z "$LightAppResources" ] ; then
-  export LightAppResources=${GUI_ROOT_DIR}/share/salome/resources
+  export LightAppResources=${GUI_ROOT_DIR}/share/salome/resources/gui
 fi
 
 SUITApp LightApp -style salome $* &
index 4b7af75f9f2f7ca8b2835caef598d2932b315b54..eb9baa0469ffc74c46b940f796b7e47b51c80acb 100644 (file)
@@ -28,6 +28,10 @@ XVERSION=0x030200
 AC_SUBST(VERSION)
 AC_SUBST(XVERSION)
 
+# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
+MODULE_NAME=gui
+AC_SUBST(MODULE_NAME)
+
 ########################################################################
 # Check --disable-corba-gen and other --disable-* options
 
@@ -512,9 +516,9 @@ fi
 
 # make other build directories
 if test "$GUI_DISABLE_CORBA" == "yes"; then 
-  dir_variables="salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources idl"
+  dir_variables="salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources/${MODULE_NAME} idl"
 else
-  dir_variables="salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources"
+  dir_variables="salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources/${MODULE_NAME}"
 fi
 
 for rep in $dir_variables
index 814a5ec84d0fa0e71dbcd36a8223b7f8de232569..fb5a7018a5da3871f937bed83b3bb29f0aadeedc 100755 (executable)
@@ -7,14 +7,14 @@ language = en
 modules = LIGHT
 
 [resources]
-SUIT = $(SUITRoot)/resources
-STD = $(SUITRoot)/resources
-LightApp = $(SUITRoot)/resources
-Plot2d = $(SUITRoot)/resources
-GLViewer = $(SUITRoot)/resources
-OCCViewer = $(SUITRoot)/resources
-VTKViewer = $(SUITRoot)/resources
-LIGHT = $(LIGHT_ROOT_DIR)/share/salome/resources
+SUIT = $(GUI_ROOT_DIR)/share/salome/resources/gui
+STD = $(GUI_ROOT_DIR)/share/salome/resources/gui
+LightApp = $(GUI_ROOT_DIR)/share/salome/resources/gui
+Plot2d = $(GUI_ROOT_DIR)/share/salome/resources/gui
+GLViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
+OCCViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
+VTKViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
+LIGHT = $(LIGHT_ROOT_DIR)/share/salome/resources/light
 
 [LIGHT]
 name = Light
index 7cb56db7bc919dde06e7b37cd192d5c3b363a82f..fa3b06bd7f4176dfb8b4dbad8e9295d0d012e59b 100644 (file)
   </section>
   <section name="splash" >
     <!-- Splash screen settings -->
-    <parameter name="image"       value="${SUITRoot}/resources/icon_about.png" />
+    <parameter name="image"       value="${GUI_ROOT_DIR}/share/salome/resources/gui/icon_about.png" />
     <parameter name="info"        value="%A : %V" />
     <parameter name="text_colors" value="#543AA9|#FFFFFF" />
   </section>
   <section name="resources">
     <!-- Resource directories (resource manager)-->
-    <parameter name="SUIT"         value="${SUITRoot}/resources"/>
-    <parameter name="STD"          value="${SUITRoot}/resources"/>
-    <parameter name="Plot2d"       value="${SUITRoot}/resources"/>
-    <parameter name="SPlot2d"      value="${SUITRoot}/resources"/>
-    <parameter name="GLViewer"     value="${SUITRoot}/resources"/>
-    <parameter name="OCCViewer"    value="${SUITRoot}/resources"/>
-    <parameter name="VTKViewer"    value="${SUITRoot}/resources"/>
-    <parameter name="SalomeApp"    value="${SUITRoot}/resources"/>
-    <parameter name="OB"           value="${SUITRoot}/resources"/>
-    <parameter name="CAM"          value="${SUITRoot}/resources"/>
-    <parameter name="LightApp"     value="${SUITRoot}/resources"/>
-    <parameter name="SVTK"         value="${SUITRoot}/resources"/>
-    <parameter name="ToolsGUI"     value="${SUITRoot}/resources"/>
-    <parameter name="LIGHT"        value="${LIGHT_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="SUIT"         value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="STD"          value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="Plot2d"       value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SPlot2d"      value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="GLViewer"     value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="OCCViewer"    value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="VTKViewer"    value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SalomeApp"    value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="OB"           value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="CAM"          value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="LightApp"     value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SVTK"         value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="ToolsGUI"     value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="LIGHT"        value="${LIGHT_ROOT_DIR}/share/salome/resources/light"/>
   </section>
   <section name="desktop" >
     <!-- Default GUI desktop state, position, size -->
index 19d3af36b119bdbd4c1511443d7a61b133171eda..413dca7118e5b7f4c6bce9749ff56776b7ef9de6 100755 (executable)
@@ -764,6 +764,8 @@ QString findFile( QString filename )
       dir = addSlash(dir) ;
       dir = dir + "resources" ;
       dir = addSlash(dir) ;
+      dir = dir + "kernel" ;
+      dir = addSlash(dir) ;
       QFileInfo fileInfo( dir + filename );
       if ( fileInfo.isFile() && fileInfo.exists() )
        return fileInfo.filePath();
index 3513150283f0f9a015b703b02d70386f3cba4f76..7e7591262bffc9bcc20fc867cb05ce135a391fa8 100755 (executable)
@@ -30,9 +30,9 @@ from SuperV import *
 
 # load this object with Nodes, Links and Datas stored in GraphEssai.xml
 # (GraphEssai.xml was created with python in SuperVisionTest and GraphEssai.py)
-myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/GraphEssai.xml")
+myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/superv/GraphEssai.xml")
 
-#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/GraphEssai.xml")
+#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/superv/GraphEssai.xml")
 # This DataFlow is "valid" : no loop, correct links between Nodes etc...
 
 print myGraph.IsValid()
@@ -96,8 +96,8 @@ print "Type : Div.PrintPorts()"
 print "       to see input and output values of nodes"
 
 # Export will create newsupervisionexample.xml and the corresponding .py file
-print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.xml")
+print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml")
 
 print " "
-print "See file @ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.xml"
-print "See file @ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.py"
+print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml"
+print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.py"
index 56bdd9bf50cf3fadcf3b434b9e286780e00c7e04..66974aeb6200c3cabc62babb2296f877a90744e9 100755 (executable)
@@ -12,9 +12,9 @@ from SuperV import *
 
 # load this object with Nodes, Links and Datas stored in GraphEssai.xml
 # (GraphEssai.xml was created with python in SuperVisionTest and GraphEssai.py)
-myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/GraphEssai.xml")
+myGraph = Graph("@ROOT_BUILDDIR@/share/salome/resources/superv/GraphEssai.xml")
 
-#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/GraphEssai.xml")
+#myGraph = Graph("/home/data/jr_HEAD/build/share/salome/resources/superv/GraphEssai.xml")
 # This DataFlow is "valid" : no loop, correct links between Nodes etc...
 
 print myGraph.IsValid()
@@ -78,8 +78,8 @@ print "Type : Div.PrintPorts()"
 print "       to see input and output values of nodes"
 
 # Export will create newsupervisionexample.xml and the corresponding .py file
-print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.xml")
+print myGraph.Export("@ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml")
 
 print " "
-print "See file @ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.xml"
-print "See file @ROOT_BUILDDIR@/share/salome/resources/newsupervisionexample.py"
+print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.xml"
+print "See file @ROOT_BUILDDIR@/share/salome/resources/superv/newsupervisionexample.py"
index 305c929d71bc1fff2b53ba95b9c89551554866b0..d89841c1433af01e35c67907e916676d6effa886 100644 (file)
@@ -5,18 +5,18 @@ language = en
 modules = GEOM,SMESH,VISU
 
 [resources]
-SUIT = $(SUITRoot)/resources
-STD = $(SUITRoot)/resources
-Plot2d = $(SUITRoot)/resources
-GLViewer = $(SUITRoot)/resources
-OCCViewer = $(SUITRoot)/resources
-VTKViewer = $(SUITRoot)/resources
-SVTK = $(SUITRoot)/resources
-LightApp = $(SUITRoot)/resources
-SalomeApp = $(SUITRoot)/resources
-GEOM = $(GEOM_ROOT_DIR)/share/salome/resources
-SMESH = $(SMESH_ROOT_DIR)/share/salome/resources
-VISU = $(VISU_ROOT_DIR)/share/salome/resources
+SUIT = $(GUI_ROOT_DIR)/share/salome/resources/gui
+STD = $(GUI_ROOT_DIR)/share/salome/resources/gui
+Plot2d = $(GUI_ROOT_DIR)/share/salome/resources/gui
+GLViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
+OCCViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
+VTKViewer = $(GUI_ROOT_DIR)/share/salome/resources/gui
+SVTK = $(GUI_ROOT_DIR)/share/salome/resources/gui
+LightApp = $(GUI_ROOT_DIR)/share/salome/resources/gui
+SalomeApp = $(GUI_ROOT_DIR)/share/salome/resources/gui
+GEOM = $(GEOM_ROOT_DIR)/share/salome/resources/geom
+SMESH = $(SMESH_ROOT_DIR)/share/salome/resources/smesh
+VISU = $(VISU_ROOT_DIR)/share/salome/resources/visu
   
 [GEOM]
 name = Geometry
index f6cfb540cd2af93764ba871147d8921e3e5b84ad..8f692e303e3b1d1db724a78089da6bfaa035d0ea 100644 (file)
   </section>
   <section name="splash" >
     <!-- Splash screen settings -->
-    <parameter name="image"           value="${SUITRoot}/resources/icon_about.png" />
+    <parameter name="image"           value="${GUI_ROOT_DIR}/share/salome/resources/gui/icon_about.png" />
     <parameter name="info"            value="%V" />
     <parameter name="text_colors"     value="#543AA9|#FFFFFF" />
     <parameter name="progress_colors" value="#0A4E5F|#B2EFED|1" />
   </section>
   <section name="resources">
     <!-- Resource directories (resource manager)-->
-    <parameter name="SUIT"         value="${SUITRoot}/resources"/>
-    <parameter name="STD"          value="${SUITRoot}/resources"/>
-    <parameter name="Plot2d"       value="${SUITRoot}/resources"/>
-    <parameter name="SPlot2d"      value="${SUITRoot}/resources"/>
-    <parameter name="GLViewer"     value="${SUITRoot}/resources"/>
-    <parameter name="OCCViewer"    value="${SUITRoot}/resources"/>
-    <parameter name="VTKViewer"    value="${SUITRoot}/resources"/>
-    <parameter name="SVTK"         value="${SUITRoot}/resources"/>
-    <parameter name="LightApp"     value="${SUITRoot}/resources"/>
-    <parameter name="SalomeApp"    value="${SUITRoot}/resources"/>
-    <parameter name="OB"           value="${SUITRoot}/resources"/>
-    <parameter name="CAM"          value="${SUITRoot}/resources"/>
-    <parameter name="SUPERVGraph"  value="${SUITRoot}/resources"/>
-    <parameter name="ToolsGUI"     value="${SUITRoot}/resources"/>
-    <parameter name="NETGENPlugin" value="${NETGENPLUGIN_ROOT_DIR}/share/salome/resources"/>
-    <parameter name="GHS3DPlugin"  value="${GHS3DPLUGIN_ROOT_DIR}/share/salome/resources"/>
+    <parameter name="SUIT"         value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="STD"          value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="Plot2d"       value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SPlot2d"      value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="GLViewer"     value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="OCCViewer"    value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="VTKViewer"    value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SVTK"         value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="LightApp"     value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SalomeApp"    value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="OB"           value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="CAM"          value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="SUPERVGraph"  value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="ToolsGUI"     value="${GUI_ROOT_DIR}/share/salome/resources/gui"/>
+    <parameter name="NETGENPlugin" value="${NETGENPLUGIN_ROOT_DIR}/share/salome/resources/netgenplugin"/>
+    <parameter name="GHS3DPlugin"  value="${GHS3DPLUGIN_ROOT_DIR}/share/salome/resources/ghs3dplugin"/>
   </section>
   <section name="SMESH">
     <!-- Default SMESH module plugins -->
index 9b872f9c2f81a2acd20ba6a652a4c9f60537e830..886da08d1de81494fc447bccb464b52ea4fa1502 100755 (executable)
@@ -768,6 +768,8 @@ QString findFile( QString filename )
       dir = addSlash(dir) ;
       dir = dir + "resources" ;
       dir = addSlash(dir) ;
+      dir = dir + "kernel" ;
+      dir = addSlash(dir) ;
       QFileInfo fileInfo( dir + filename );
       if ( fileInfo.isFile() && fileInfo.exists() )
        return fileInfo.filePath();