From c3e445c45af6815f39d902004dff02a20e7d5301 Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 15 Sep 2011 12:27:07 +0000 Subject: [PATCH] EDF 1123 KERNEL/GUI: Improvment of 'About' dialog box. http://salome.mantis.opencascade.com/view.php?id=20494 "About" dialog box has been redesigned. Information about version of modules has been added in the "About" dialog box. --- HOMARD_version.h.in | 37 ++++++++++++++++++++++++++ Makefile.am | 1 + build_configure | 4 --- configure.ac | 13 +++++++++- src/HOMARDGUI/HOMARDGUI.cxx | 52 +++++++++++++++++++++---------------- src/HOMARDGUI/Makefile.am | 1 + 6 files changed, 80 insertions(+), 28 deletions(-) create mode 100644 HOMARD_version.h.in diff --git a/HOMARD_version.h.in b/HOMARD_version.h.in new file mode 100644 index 00000000..3fd343b4 --- /dev/null +++ b/HOMARD_version.h.in @@ -0,0 +1,37 @@ +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// File : HOMARD_version.h +// Author : Vadim SANDLER +// Module : SALOME +// +#if !defined(__HOMARD_VERSION_H__) +#define __HOMARD_VERSION_H__ + +/* + HOMARD_VERSION is (major << 16) + (minor << 8) + patch. +*/ + +#define HOMARD_VERSION_STR "@VERSION@" +#define HOMARD_VERSION @XVERSION@ + +#endif // __HOMARD_VERSION_H__ diff --git a/Makefile.am b/Makefile.am index 983d3dba..70fb273f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,6 +36,7 @@ DIST_SUBDIRS = idl adm_local resources src doc tests DISTCLEANFILES = a.out aclocal.m4 configure +salomeinclude_DATA = HOMARD_version.h EXTRA_DIST += \ build_configure \ diff --git a/build_configure b/build_configure index edbbf356..1a234bdf 100755 --- a/build_configure +++ b/build_configure @@ -67,10 +67,6 @@ fi cd ${CONF_DIR} ABS_CONF_DIR=`pwd` -mkdir -p salome_adm/unix/config_files -cp -f ${KERNEL_ROOT_DIR}/salome_adm/unix/SALOMEconfig.h.in salome_adm/unix - - # ____________________________________________________________________ # aclocal creates the aclocal.m4 file from the standard macro and the diff --git a/configure.ac b/configure.ac index 52e53052..42245b22 100644 --- a/configure.ac +++ b/configure.ac @@ -379,12 +379,22 @@ echo # chmod +x ./bin/salome/*; \ #]) +AC_HACK_LIBTOOL +AC_CONFIG_COMMANDS([hack_libtool],[ + sed -i "s%^CC=\"\(.*\)\"%hack_libtool (){ \n\ + $(pwd)/hack_libtool \1 \"\$[@]\" \n\ + }\n\ + CC=\"hack_libtool\"%g" libtool + sed -i "s%\(\s*\)for searchdir in \$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path; do%\1searchdirs=\"\$newlib_search_path \$lib_search_path \$sys_lib_search_path \$shlib_search_path\"\n\1for searchdir in \$searchdirs; do%g" libtool + sed -i "s%\(\s*\)searchdirs=\"\$newlib_search_path \$lib_search_path \(.*\)\"%\1searchdirs=\"\$newlib_search_path \$lib_search_path\"\n\1sss_beg=\"\"\n\1sss_end=\"\2\"%g" libtool + sed -i "s%\(\s*\)\(for searchdir in \$searchdirs; do\)%\1for sss in \$searchdirs; do\n\1 if ! test -d \$sss; then continue; fi\n\1 ssss=\$(cd \$sss; pwd)\n\1 if test \"\$ssss\" != \"\" \&\& test -d \$ssss; then\n\1 case \$ssss in\n\1 /usr/lib | /usr/lib64 ) ;;\n\1 * ) sss_beg=\"\$sss_beg \$ssss\" ;;\n\1 esac\n\1 fi\n\1done\n\1searchdirs=\"\$sss_beg \$sss_end\"\n\1\2%g" libtool + ],[]) + # This list is initiated using autoscan and must be updated manually # when adding a new file .in to manage. When you execute # autoscan, the Makefile list is generated in the output file configure.scan. # This could be helpfull to update de configuration. AC_OUTPUT([ \ - salome_adm/unix/SALOMEconfig.h \ Makefile \ idl/Makefile \ adm_local/Makefile \ @@ -392,6 +402,7 @@ AC_OUTPUT([ \ adm_local/unix/config_files/Makefile \ doc/Makefile \ doc/conf.py \ + HOMARD_version.h \ src/Makefile \ src/HOMARD_I/Makefile \ src/HOMARD/Makefile \ diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx index b37283c7..36ede587 100644 --- a/src/HOMARDGUI/HOMARDGUI.cxx +++ b/src/HOMARDGUI/HOMARDGUI.cxx @@ -23,33 +23,34 @@ using namespace std; #include "HOMARDGUI.h" +#include // SALOME Includes -#include "Utils_ORB_INIT.hxx" -#include "Utils_SINGLETON.hxx" -#include "SALOME_LifeCycleCORBA.hxx" - -#include "SUIT_ResourceMgr.h" -#include "SUIT_MessageBox.h" -#include "SUIT_Session.h" -#include "SUIT_ViewWindow.h" -#include "SUIT_ViewManager.h" +#include +#include +#include + +#include +#include +#include +#include +#include #include -#include "CAM_Module.h" -#include "OB_Browser.h" +#include +#include -#include "SALOME_ListIO.hxx" -#include "SALOME_ListIteratorOfListIO.hxx" +#include +#include -#include "SalomeApp_Application.h" -#include "SalomeApp_DataModel.h" -#include "SalomeApp_Study.h" -#include "LightApp_SelectionMgr.h" -#include "LightApp_Selection.h" +#include +#include +#include +#include +#include #include -#include "SalomeApp_Module.h" -#include "SALOMEconfig.h" +#include +#include #include #include @@ -72,7 +73,7 @@ using namespace std; #include //Pour le _CAST -#include "SALOMEDS_Study.hxx" +#include #include "HOMARDGUI_Utils.h" static CORBA::ORB_var _orb; @@ -207,9 +208,9 @@ void HOMARDGUI::OnGUIEvent() if ( !obj || !obj->inherits( "QAction" ) ) return; int id = actionId((QAction*)obj); - bool ret; + // bool ret; if ( id != -1 ) - ret = OnGUIEvent( id ); + /*ret = */OnGUIEvent( id ); MESSAGE("************** End of HOMARDGUI::OnGUIEvent()"); } @@ -555,5 +556,10 @@ extern "C" { { return new HOMARDGUI(""); } + + char* getModuleVersion() + { + return (char*)HOMARD_VERSION_STR; + } } diff --git a/src/HOMARDGUI/Makefile.am b/src/HOMARDGUI/Makefile.am index d36f260b..dd55ef85 100644 --- a/src/HOMARDGUI/Makefile.am +++ b/src/HOMARDGUI/Makefile.am @@ -113,6 +113,7 @@ libHOMARD_la_CPPFLAGS = \ -I$(srcdir)/../HOMARD \ -I$(srcdir)/../HOMARD_I \ -I$(top_builddir)/idl \ + -I$(top_builddir) \ -I$(VISU_ROOT_DIR)/include/salome \ -I$(MED_ROOT_DIR)/include/salome \ -I$(top_builddir)/salome_adm/unix -- 2.39.2