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.
# common directories to put headerfiles
inc_builddir=$(top_builddir)/include/salome
+MODULE_NAME=@MODULE_NAME@
+
@SET_MAKE@
SHELL=/bin/sh
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):
# 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
# 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
#
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*
%_wrap.cxx : %.i
$(SWIG) $(SWIG_FLAGS) -o $@ $<
-$(top_builddir)/share/salome/resources/%.qm: %.po
+$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%.qm: %.po
$(MSG2QM) $< $@ ; \
#------------------------------------------------------------------------------
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
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
The SALOME automatically locates XML files, searching them in the following directories:
- ${<PLUGINNAME>_ROOT_DIR}/share/salome/resources
+ ${<PLUGINNAME>_ROOT_DIR}/share/salome/resources/<plugin>
${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
4.2.2. Define environment variable SALOME_<MyResourceKey>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
The SALOME automatically locates XML files, searching them in the following
directories:<br>
<tt><br>
- ${<PLUGINNAME>_ROOT_DIR}/share/salome/resources<br>
+ ${<PLUGINNAME>_ROOT_DIR}/share/salome/resources/<pluginname><br>
${SALOME_<PluginName>Resources}<br>
${HOME}/.salome/resources<br>
- ${KERNEL_ROOT_DIR}/share/salome/resources</tt><br>
+ ${KERNEL_ROOT_DIR}/share/salome/resources/kernel</tt><br>
<br>
where <PluginName> is a name of each mesher plugin package<br>
</blockquote>
<h5> <a name="2_4_2_2"></a>2.4.2.2. Define environment variable SALOME_<MyResourceKey>Resources</h5>
<blockquote>It should point to the directory where resources are situated.</blockquote>
-<blockquote><tt>Example: setenv SALOME_StdMeshersResources ${SMESH_ROOT_DIR}/share/salome/resources</tt></blockquote>
+<blockquote><tt>Example: setenv SALOME_StdMeshersResources ${SMESH_ROOT_DIR}/share/salome/resources/smesh</tt></blockquote>
<h4> <a name="2_4_3"></a>2.4.3. Implement your Hypothesis Creator and being
exported method</h4>
</section>
<section name="resources">
<!-- Module resources -->
- <parameter name="SMESH" value="${SMESH_ROOT_DIR}/share/salome/resources"/>
- <parameter name="StdMeshers" value="${SMESH_ROOT_DIR}/share/salome/resources"/>
+ <parameter name="SMESH" value="${SMESH_ROOT_DIR}/share/salome/resources/smesh"/>
+ <parameter name="StdMeshers" value="${SMESH_ROOT_DIR}/share/salome/resources/smesh"/>
</section>
</document>