From: asv Date: Tue, 27 Jun 2006 07:40:22 +0000 (+0000) Subject: Fix to bug PAL10465. X-Git-Tag: T3_2_1_pre~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0de700330f025003f3054cd9cf819482490c997f;p=modules%2Fgui.git Fix to bug PAL10465. Modification of resource files location in "build" and "installation" directories. Now resource files are placed in share/salome/resources/. Various configuration files (configure.in.base, make_module/conclude/commence, etc.) are changed. --- diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 0a5de34a2..b3af3f710 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -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@ diff --git a/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in index 897154a7a..da7a678e1 100644 --- a/adm_local/unix/make_conclude.in +++ b/adm_local/unix/make_conclude.in @@ -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) $< $@ ; \ #------------------------------------------------------------------------------ diff --git a/bin/runLightSalome.csh b/bin/runLightSalome.csh index 85675de23..3a751e993 100755 --- a/bin/runLightSalome.csh +++ b/bin/runLightSalome.csh @@ -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 $* & diff --git a/bin/runLightSalome.sh b/bin/runLightSalome.sh index b2f67d65e..df19ca7ba 100755 --- a/bin/runLightSalome.sh +++ b/bin/runLightSalome.sh @@ -18,15 +18,12 @@ # #!/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 $* & diff --git a/configure.in.base b/configure.in.base index 4b7af75f9..eb9baa046 100644 --- a/configure.in.base +++ b/configure.in.base @@ -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 diff --git a/src/LightApp/resources/LightApp.ini b/src/LightApp/resources/LightApp.ini index 814a5ec84..fb5a7018a 100755 --- a/src/LightApp/resources/LightApp.ini +++ b/src/LightApp/resources/LightApp.ini @@ -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 diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 7cb56db7b..fa3b06bd7 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -15,26 +15,26 @@
- +
- - - - - - - - - - - - - - + + + + + + + + + + + + + +
diff --git a/src/RegistryDisplay/RegWidget.cxx b/src/RegistryDisplay/RegWidget.cxx index 19d3af36b..413dca711 100755 --- a/src/RegistryDisplay/RegWidget.cxx +++ b/src/RegistryDisplay/RegWidget.cxx @@ -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(); diff --git a/src/SALOME_SWIG/supervisionexample.py b/src/SALOME_SWIG/supervisionexample.py index 351315028..7e7591262 100755 --- a/src/SALOME_SWIG/supervisionexample.py +++ b/src/SALOME_SWIG/supervisionexample.py @@ -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" diff --git a/src/SALOME_SWIG/supervisionexample.py.in b/src/SALOME_SWIG/supervisionexample.py.in index 56bdd9bf5..66974aeb6 100755 --- a/src/SALOME_SWIG/supervisionexample.py.in +++ b/src/SALOME_SWIG/supervisionexample.py.in @@ -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" diff --git a/src/SalomeApp/resources/SalomeApp.ini b/src/SalomeApp/resources/SalomeApp.ini index 305c929d7..d89841c14 100644 --- a/src/SalomeApp/resources/SalomeApp.ini +++ b/src/SalomeApp/resources/SalomeApp.ini @@ -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 diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index f6cfb540c..8f692e303 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -23,29 +23,29 @@
- +
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + +
diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx index 9b872f9c2..886da08d1 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx @@ -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();