From 5a1d0a6f3ac2f1e8b04eb24f76a8768faa406096 Mon Sep 17 00:00:00 2001 From: asv Date: Tue, 27 Jun 2006 07:48:37 +0000 Subject: [PATCH] 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. --- adm_local/unix/make_commence.in | 2 ++ adm_local/unix/make_conclude.in | 14 +++++++------- configure.in.base | 6 +++++- doc/salome/PluginMeshers.txt | 6 +++--- .../tui/SMESH/sources/static/PluginMeshers.html | 6 +++--- resources/SalomeApp.xml | 4 ++-- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 71df45053..0be66a96f 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@ + @SET_MAKE@ SHELL=/bin/sh diff --git a/adm_local/unix/make_conclude.in b/adm_local/unix/make_conclude.in index 37c65077f..554b8afb0 100644 --- a/adm_local/unix/make_conclude.in +++ b/adm_local/unix/make_conclude.in @@ -131,7 +131,7 @@ $(DEST_HEADERS): $(inc_builddir)/%: % cp -f $< $@ # build resources file (icons and messages) : .qm file from .po file -resources: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm) +resources: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm) # Make installation directories if they don't exist. $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir): @@ -187,10 +187,10 @@ $(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 @@ -234,7 +234,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 @@ -279,7 +279,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* @@ -326,7 +326,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/configure.in.base b/configure.in.base index cc915a120..7ef7fd387 100644 --- a/configure.in.base +++ b/configure.in.base @@ -27,6 +27,10 @@ XVERSION=0x030200 AC_SUBST(VERSION) AC_SUBST(XVERSION) +# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.) +MODULE_NAME=smesh +AC_SUBST(MODULE_NAME) + dnl dnl Initialize source and build root directories dnl @@ -350,7 +354,7 @@ else fi # make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources idl +for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources/${MODULE_NAME} idl do # if test ! -d $rep ; then # eval mkdir $rep diff --git a/doc/salome/PluginMeshers.txt b/doc/salome/PluginMeshers.txt index 61bb0842b..802f096ef 100644 --- a/doc/salome/PluginMeshers.txt +++ b/doc/salome/PluginMeshers.txt @@ -83,10 +83,10 @@ The SALOME automatically locates XML files, searching them in the following directories: - ${_ROOT_DIR}/share/salome/resources + ${_ROOT_DIR}/share/salome/resources/ ${SALOME_Resources} ${HOME}/.salome/resources - ${KERNEL_ROOT_DIR}/share/salome/resources + ${KERNEL_ROOT_DIR}/share/salome/resources/kernel where is a name of each mesher plugin package @@ -148,7 +148,7 @@ 4.2.2. Define environment variable SALOME_Resources to point to the directory where resources are situated. - Example: setenv SALOME_StdMeshersResources ${SMESH_ROOT_DIR}/share/salome/resources + Example: setenv SALOME_StdMeshersResources ${SMESH_ROOT_DIR}/share/salome/resources/smesh 4.3. Implement your Hypothesis Creator and being exported method diff --git a/doc/salome/tui/SMESH/sources/static/PluginMeshers.html b/doc/salome/tui/SMESH/sources/static/PluginMeshers.html index f860aef7b..64c368819 100755 --- a/doc/salome/tui/SMESH/sources/static/PluginMeshers.html +++ b/doc/salome/tui/SMESH/sources/static/PluginMeshers.html @@ -202,10 +202,10 @@ SMESH module.
The SALOME automatically locates XML files, searching them in the following directories:

-    ${<PLUGINNAME>_ROOT_DIR}/share/salome/resources
+    ${<PLUGINNAME>_ROOT_DIR}/share/salome/resources/<pluginname>
    ${SALOME_<PluginName>Resources}
    ${HOME}/.salome/resources
-    ${KERNEL_ROOT_DIR}/share/salome/resources

+    ${KERNEL_ROOT_DIR}/share/salome/resources/kernel

where <PluginName> is a name of each mesher plugin package
@@ -280,7 +280,7 @@ See paragraph 2 for definition of MyResourceKey, MyHypType1, MyAlgType1.
2.4.2.2. Define environment variable SALOME_<MyResourceKey>Resources
It should point to the directory where resources are situated.
-
Example: setenv SALOME_StdMeshersResources ${SMESH_ROOT_DIR}/share/salome/resources
+
Example: setenv SALOME_StdMeshersResources ${SMESH_ROOT_DIR}/share/salome/resources/smesh

2.4.3. Implement your Hypothesis Creator and being exported method

diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index 3b4db83ca..4125b6ca2 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -41,7 +41,7 @@
- - + +
-- 2.30.2