From 157b1a61a177ccd0a3136f6e435880d949411c4d Mon Sep 17 00:00:00 2001 From: guigues Date: Thu, 14 Feb 2008 09:57:18 +0000 Subject: [PATCH] *** empty log message *** --- kernel/cmake/bbtk_config_build.xml.in | 6 +++--- kernel/install/CMakeLists.txt | 7 ++++++ kernel/install/bbtk-uninstall.sh | 31 +++++++++++++++++++++++++++ kernel/install/gnome/CMakeLists.txt | 17 +++++++++++++++ kernel/src/bbtkConfigurationFile.cxx | 20 ++++++++--------- kernel/src/bbtkXML.h | 13 ++++++++++- 6 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 kernel/install/CMakeLists.txt create mode 100644 kernel/install/bbtk-uninstall.sh create mode 100644 kernel/install/gnome/CMakeLists.txt diff --git a/kernel/cmake/bbtk_config_build.xml.in b/kernel/cmake/bbtk_config_build.xml.in index 38bdd44..4efe399 100644 --- a/kernel/cmake/bbtk_config_build.xml.in +++ b/kernel/cmake/bbtk_config_build.xml.in @@ -3,17 +3,17 @@ Sets the search directories in the build tree -#@BBTK_DOC_BUILD_PATH@ +#@BBTK_DOC_BUILD_PATH@ -#@BBTK_BBS_BUILD_PATH@ +#@BBTK_BBS_BUILD_PATH@ @EXECUTABLE_OUTPUT_PATH@ # For windows @EXECUTABLE_OUTPUT_PATH@\Debug @EXECUTABLE_OUTPUT_PATH@\Release # -#@BBTK_DATA_ROOT@ +#@BBTK_DATA_ROOT@ @PROJECT_BINARY_DIR@ diff --git a/kernel/install/CMakeLists.txt b/kernel/install/CMakeLists.txt new file mode 100644 index 0000000..829127c --- /dev/null +++ b/kernel/install/CMakeLists.txt @@ -0,0 +1,7 @@ +IF(UNIX) + SUBDIRS(gnome) +ENDIF(UNIX) + +INSTALL( PROGRAMS bbtk-uninstall.sh + DESTINATION bin +) diff --git a/kernel/install/bbtk-uninstall.sh b/kernel/install/bbtk-uninstall.sh new file mode 100644 index 0000000..8a05ef5 --- /dev/null +++ b/kernel/install/bbtk-uninstall.sh @@ -0,0 +1,31 @@ +echo "****** WARNING : THIS IS A BRUTE FORCE **UNSAFE** UNINSTALLER ******" +echo "****** WILL REMOVES ALL FILES AND FOLDERS STARTING WITH bb ******" + +TMP=$(which bbtk-uninstall.sh|rev) +TMP2=$(echo ${TMP#*/}|rev) +PREFIX=${TMP2}/.. + +echo "****** IN : ${PREFIX}/bin/" +echo " ${PREFIX}/lib/" +echo " ${PREFIX}/include/" +echo " ${PREFIX}/share/bbtk" +echo "*********************************************************************" +echo "* Files/folders found :" + +OPT="-d --color -1" + +ls ${OPT} ${PREFIX}/bin/bb* +ls ${OPT} ${PREFIX}/lib/bb* +ls ${OPT} ${PREFIX}/lib/libbb* +ls ${OPT} ${PREFIX}/include/bb* +ls ${OPT} ${PREFIX}/share/bbtk + +echo "* DO YOU WANT TO DELETE THEM (Y|n) ?" +read -n 1 ANS +if [ "${ANS}" = "Y" ]; then +rm -Rf ${PREFIX}/bin/bb* +rm -Rf ${PREFIX}/lib/bb* +rm -Rf ${PREFIX}/lib/libbb* +rm -Rf ${PREFIX}/include/bb* +rm -Rf ${PREFIX}/share/bbtk +fi diff --git a/kernel/install/gnome/CMakeLists.txt b/kernel/install/gnome/CMakeLists.txt new file mode 100644 index 0000000..9fd8232 --- /dev/null +++ b/kernel/install/gnome/CMakeLists.txt @@ -0,0 +1,17 @@ + +SET(bbtk_install_gnome_DATA_REL_PATH ../${BBTK_DATA_REL_PATH}/install-gnome) + +CONFIGURE_FILE( + bbtk-install-gnome.sh.in + ${CMAKE_CURRENT_BINARY_DIR}/bbtk-install-gnome + @ONLY IMMEDIATE +) + +INSTALL( + FILES bbi.desktop.in bbi-icon.png bbi-icon2.png bbs.xml + DESTINATION ${BBTK_DATA_INSTALL_PATH}/install-gnome +) +INSTALL( + PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bbtk-install-gnome + DESTINATION bin +) diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index 0e94df3..1dd5780 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkConfigurationFile.cxx,v $ Language: C++ - Date: $Date: 2008/02/14 09:41:41 $ - Version: $Revision: 1.5 $ + Date: $Date: 2008/02/14 09:57:18 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -62,7 +62,7 @@ namespace bbtk // Initialized to mInstall_path+"/"+BBTK_DATA_REL_PATH // But can be overriden by value read from bbtk_config.xml mData_path = mInstall_path + mFile_separator + BBTK_STRINGIFY_SYMBOL(BBTK_DATA_REL_PATH); - MessageManager::SetMessageLevel("Config",1); + bbtkMessage("Config",1," ==> bin : '"< prefix : '"< doc : '"<error != eXMLErrorNone ) { - std::ostringstream str; - str << XMLNode::getError(res->error); - str << " [line " << res->nLine << ", col "<nColumn<<"] "; - str << " file "< namespace bbtk { @@ -25,6 +25,17 @@ namespace bbtk } } //==================================================================== + + + std::string GetErrorMessage(XMLResults* res, const std::string& filename) + { + std::ostringstream str; + str << XMLNode::getError(res->error); + str << " [line " << res->nLine << ", col "<nColumn<<"] "; + str << " file "<