<description> Sets the search directories in the build tree </description>
<url> </url>
-#@BBTK_DOC_BUILD_PATH@ </url>
+#@BBTK_DOC_BUILD_PATH@
<bbs_path> </bbs_path>
-#@BBTK_BBS_BUILD_PATH@ </bbs_path>
+#@BBTK_BBS_BUILD_PATH@
<package_path> @EXECUTABLE_OUTPUT_PATH@ </package_path>
# For windows
<package_path> @EXECUTABLE_OUTPUT_PATH@\Debug </package_path>
<package_path> @EXECUTABLE_OUTPUT_PATH@\Release </package_path>
#
<data_path> </data_path>
-#@BBTK_DATA_ROOT@ </data_path>
+#@BBTK_DATA_ROOT@
<default_temp_dir> @PROJECT_BINARY_DIR@ </default_temp_dir>
--- /dev/null
+IF(UNIX)
+ SUBDIRS(gnome)
+ENDIF(UNIX)
+
+INSTALL( PROGRAMS bbtk-uninstall.sh
+ DESTINATION bin
+)
--- /dev/null
+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
--- /dev/null
+
+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
+)
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
// 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 : '"<<mBin_path<<"'"<<std::endl);
bbtkMessage("Config",1," ==> prefix : '"<<mInstall_path<<"'"<<std::endl);
bbtkMessage("Config",1," ==> doc : '"<<mDoc_path<<"'"<<std::endl);
void ConfigurationFile::Read(const std::string& filename)
{
- //std::cout << "=======================in ConfigurationFile::Read filename [" <<filename << "]" << std::endl;
+ bbtkDebugMessage("Config",1,"ConfigurationFile::Read(" <<filename << ")" << std::endl);
mConfig_xml_full_path = filename;
XMLResults* res = new XMLResults;
if ( res->error != eXMLErrorNone )
{
- std::ostringstream str;
- str << XMLNode::getError(res->error);
- str << " [line " << res->nLine << ", col "<<res->nColumn<<"] ";
- str << " file "<<filename;
+ std::string mess = GetErrorMessage(res,filename);
delete res;
- bbtkError(str.str());
- // throw ConfigurationException(str.str());
+ bbtkDebugMessage("Config",1,mess<< std::endl);
+ bbtkError(mess);
}
delete res;
-
+ bbtkDebugMessage("Config",1,"OK" << std::endl);
+
int i,j;
// Description
#define __bbtkXML_h_INCLUDED__
#include "xmlParser.h"
-
+#include <sstream>
namespace bbtk
{
}
}
//====================================================================
+
+
+ std::string GetErrorMessage(XMLResults* res, const std::string& filename)
+ {
+ std::ostringstream str;
+ str << XMLNode::getError(res->error);
+ str << " [line " << res->nLine << ", col "<<res->nColumn<<"] ";
+ str << " file "<<filename;
+ return str.str();
+ }
+
};
#endif