)
-IF(bbtk_USE_WXWIDGETS AND WIN32)
+
+IF(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbi WIN32 ${SOURCES})
SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS /subsystem:console )
-ELSE(bbtk_USE_WXWIDGETS AND WIN32)
+ELSE(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbi ${SOURCES})
-ENDIF(bbtk_USE_WXWIDGETS AND WIN32)
+ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
TARGET_LINK_LIBRARIES(bbi bbtk)
# Use the installed appli
-SET(BBTK_BIN_PATH ${PROJECT_BINARY_DIR})
+
+IF(WIN32)
+ FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR}/$(OutDir) BBTK_BIN_PATH)
+ELSE(WIN32)
+ FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR}/bin BBTK_BIN_PATH)
+ENDIF(WIN32)
+
# TO DO : use computed path for build/install tree
-SET(BBTK_BBI bbi)
-SET(BBTK_BBFY bbfy)
-SET(BBTK_BBDOC bbdoc)
+SET(BBTK_BBI "${BBTK_DIR}/bin/bbi")
+SET(BBTK_BBFY "${BBTK_DIR}/bin/bbfy")
+SET(BBTK_BBDOC "${BBTK_DIR}/bin/bbdoc")
INCLUDE(${BBTK_CMAKE_DIR}/BBTKSetDeducedPaths.cmake)
DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/appli
)
+ FILE(TO_NATIVE_PATH ${BBTK_BIN_PATH}/bb${BBTK_PACKAGE_NAME}.dll pathCommand2 )
+
+ set(command1 cd "${BBTK_BIN_PATH}/../bbs/")
+ set(command2 copy ${pathCommand2} . )
+ set(command3 ${BBTK_BBI} -n ${OUTPUT_FILE})
+ set(command4 del bb${BBTK_PACKAGE_NAME}.dll)
+
ADD_CUSTOM_COMMAND(
OUTPUT ${DOC_OUTPUT}
COMMAND
- cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -n ${OUTPUT_FILE}
- DEPENDS bb${PACKAGE_NAME}
+# cd ${BBTK_BIN_PATH}/../bbs/ && ${BBTK_BBI} -n ${OUTPUT_FILE}
+ ${command1} && ${command2} && ${command3} && ${command4}
+ DEPENDS bb${PACKAGE_NAME}
)
ADD_CUSTOM_TARGET(bbdoc_${PACKAGE_NAME} ALL
- DEPENDS ${DOC_OUTPUT}
+ DEPENDS ${DOC_OUTPUT}
)
INSTALL(
${PROJECT_BINARY_DIR}/${LIBRARY_OUTPUT_REL_PATH})
#-----------------------------------------------------------------------------
-
#-----------------------------------------------------------------------------
# The var BBTK_BIN_PATH
# gives the system-dependent path to output binaries
#-----------------------------------------------------------------------------
# Dependencies added only the first time !
IF(BBTK_CORE_PACKAGE)
- IF(EXISTS ${BBTK_BBI})
+
+ IF(EXISTS "${BBTK_BBI}")
SET(BBTK_BBI_DEPENDENCY)
- ELSE(EXISTS ${BBTK_BBI})
+ ELSE(EXISTS "${BBTK_BBI}")
SET(BBTK_BBI_DEPENDENCY ${BBTK_BBI})
- ENDIF(EXISTS ${BBTK_BBI})
+ ENDIF(EXISTS "${BBTK_BBI}")
- IF(EXISTS ${BBTK_BBFY})
+ IF(EXISTS "${BBTK_BBFY}")
SET(BBTK_BBFY_DEPENDENCY)
- ELSE(EXISTS ${BBTK_BBFY})
+ ELSE(EXISTS "${BBTK_BBFY}")
SET(BBTK_BBFY_DEPENDENCY ${BBTK_BBFY})
- ENDIF(EXISTS ${BBTK_BBFY})
+ ENDIF(EXISTS "${BBTK_BBFY}")
+
ENDIF(BBTK_CORE_PACKAGE)
#-----------------------------------------------------------------------------
# Aditional INSTALL for CPACK mecanism.
-
-
IF(WIN32)
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkCommon.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkDICOMParser.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkexoIIc.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkexpat.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkFiltering.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkfreetype.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkftgl.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkGenericFiltering.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkGraphics.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkHybrid.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkImaging.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkIO.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkjpeg.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkNetCDF.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkpng.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkRendering.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtksys.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtktiff.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkVolumeRendering.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkWidgets.dll DESTINATION bin/ )
- INSTALL( FILES ${VTK_DIR}/bin/Release/vtkzlib.dll DESTINATION bin/ )
-
- INSTALL( FILES ${ITK_DIR}/bin/Release/ITKCommon.dll DESTINATION bin/ )
-
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll DESTINATION bin/ )
- INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll DESTINATION bin/ )
-
-
-
-
- # ????????? Why this line doesn't works ...?????
- IF(${VTK_DIR})
- FILE(GLOB_RECURSE LST_FILE_VTKDLL RELATIVE ${VTK_DIR} *.dll )
- ENDIF(${VTK_DIR})
-
- FOREACH( iLST ${LST_FILE_VTKDLL} )
- message("eed3 " ${iLST} )
- INSTALL(
- FILES ${iLST}
- DESTINATION bin/
- )
- ENDFOREACH(iLST)
+ IF(USE_VTK)
+
+ # ????????? Why this line doesn't works ...?????
+ IF(${VTK_DIR})
+ FILE(GLOB_RECURSE LST_FILE_VTKDLL RELATIVE ${VTK_DIR} *.dll )
+ FOREACH( iLST ${LST_FILE_VTKDLL} )
+ message("EED kernel/install/CMakeLists.txt " ${iLST} )
+ INSTALL(
+ FILES ${iLST}
+ DESTINATION bin/
+ )
+ ENDFOREACH(iLST)
+ ENDIF(${VTK_DIR})
+
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkCommon.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkDICOMParser.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkexoIIc.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkexpat.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkFiltering.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkfreetype.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkftgl.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkGenericFiltering.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkGraphics.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkHybrid.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkImaging.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkIO.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkjpeg.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkNetCDF.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkpng.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkRendering.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtksys.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtktiff.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkVolumeRendering.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkWidgets.dll DESTINATION bin/ )
+ INSTALL( FILES ${VTK_DIR}/bin/Release/vtkzlib.dll DESTINATION bin/ )
+ ENDIF(USE_VTK)
+
+ IF(USE_ITK)
+ INSTALL( FILES ${ITK_DIR}/bin/Release/ITKCommon.dll DESTINATION bin/ )
+ ENDIF(USE_ITK)
+
+ IF(USE_WXWIDGETS)
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_xrc_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_richtext_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_qa_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_media_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_html_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_gl_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_core_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_aui_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxmsw28d_adv_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_xml_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_odbc_vc_custom.dll DESTINATION bin/ )
+ INSTALL( FILES ${WXWIDGETS_ROOT_DIR}/lib/vc_dll/wxbase28d_net_vc_custom.dll DESTINATION bin/ )
+ ENDIF(USE_WXWIDGETS)
ENDIF(WIN32)
#-----------------------------------------------------------------------------
FILE(GLOB BBTK_HEADERS "*.h")
INSTALL(FILES ${BBTK_HEADERS} DESTINATION include/bbtk)
-IF(UNIX)
- INSTALL(TARGETS bbtk DESTINATION lib)
-ELSE(UNIX)
- INSTALL(TARGETS bbtk DESTINATION bin)
-ENDIF(UNIX)
+INSTALL(TARGETS bbtk DESTINATION lib)
+IF(WIN32)
+ INSTALL(TARGETS bbtk DESTINATION bin/)
+ENDIF(WIN32)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/03/21 14:59:39 $
- Version: $Revision: 1.52 $
+ Date: $Date: 2008/03/25 06:22:53 $
+ Version: $Revision: 1.53 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Runs the interpretation of a command
Interpreter::ExitStatus Interpreter::InterpretLine( const std::string& line )
{
+printf("EED Interpreter::InterpretLine %s \n", line.c_str() );
bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine('"<<line<<"')"<<std::endl);
ExitStatus status = Interpreter_OK;
if ((*i).substr(lgr-4, 4) != ".bbs")
continue;
- (*stream) << "include " << *i << "\n";
+printf("EED Interpreter::SwitchToFile flag01 %s \n", (*i).c_str() );
+ (*stream) << "include \"" << *i << "\"\n";
nbBssFiles++;
} // for vector
if ((*i).substr(lgr-4, 4) != ".bbs")
continue;
- (*stream) << "include " << *i << "\n";
+printf("EED Interpreter::SwitchToFile flag02 %s \n", (*i).c_str() );
+ (*stream) << "include \"" << *i << "\"\n";
+
nbBssFiles++;
} // for vector
if (nbBssFiles==0){
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/03/21 14:59:39 $
- Version: $Revision: 1.20 $
+ Date: $Date: 2008/03/25 06:22:53 $
+ Version: $Revision: 1.21 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//typedef Executer::DialogModeType DialogModeType;
typedef VirtualExec::DialogModeType DialogModeType;
- void SetDialogMode(DialogModeType t) { mExecuter->SetDialogMode(t); }
+ void SetDialogMode(DialogModeType t) { mExecuter->SetDialogMode(t); }
/// Sets the bool that indicates wether we are in command line context
void SetCommandLine(bool v = true) { mCommandLine = v; }
Program: bbtk
Module: $RCSfile: bbtkWxGUIConsole.cxx,v $
Language: C++
- Date: $Date: 2008/03/21 11:44:37 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/03/25 06:22:53 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//================================================================
void WxGUIConsole::OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event))
{
-printf("EED WxGUIConsole::OnMenuCreatePackage 01 \n");
std::string command("toolsbbtk/appli/CreatePackage");
-printf("EED WxGUIConsole::OnMenuCreatePackage 02 \n");
bbtkMessage("Debug",1,"Executing : '"<<command<<"'"<<std::endl);
-printf("EED WxGUIConsole::OnMenuCreatePackage 03 \n");
Interpreter* I = new Interpreter;
-printf("EED WxGUIConsole::OnMenuCreatePackage 04 \n");
I->InterpretFile(command);
-printf("EED WxGUIConsole::OnMenuCreatePackage 05 \n");
delete I;
-printf("EED WxGUIConsole::OnMenuCreatePackage 06 \n");
}
//================================================================
//================================================================
void WxGUIConsole::OnMenuCreateIndex(wxCommandEvent& WXUNUSED(event))
{
+/*
std::string doc_path = ConfigurationFile::GetInstance().Get_doc_path();
std::string filepath = doc_path+"/bbdoc/make-index.bbs";
Interpreter* I = new Interpreter;
-
-//EED std::cout << "bbi: include "<<filepath<<std::endl;
-//EED I->InterpretFile( filepath );
-
I->InterpretLine( "exec freeze");
I->InterpretLine( "include *");
+ I->InterpretLine( "help packages");
I->InterpretLine( "index "+doc_path+"/bbdoc/index-alpha.html Initials");
I->InterpretLine( "index "+doc_path+"/bbdoc/index-package.html Packages");
I->InterpretLine( "index "+doc_path+"/bbdoc/index-category.html Categories");
- I->InterpretLine( "index "+doc_path+"/bbdoc/index-adaptors.html Adaptors");
-
+ I->InterpretLine( "index "+doc_path+"/bbdoc/index-adaptors.html Adaptors");
delete I;
+*/
+
+ std::string bin_path = ConfigurationFile::GetInstance().Get_bin_path();
+ std::string doc_path = ConfigurationFile::GetInstance().Get_doc_path();
+ std::string bbdoc_path = doc_path+"/bbdoc";
+ std::string make_index_path = "\"" + bbdoc_path+"/make-index.bbs\"";
+
+ std::string strcommand0 = "cd "+bbdoc_path+" && mkdir tmp && cd tmp";
+
+ std::string strcommand1 = "cd "+bbdoc_path+"/tmp";
+ std::string strcommand2 = "\""+bin_path+"/bbi\" -n "+make_index_path;
+#ifdef WIN32
+ std::string strcommand3 = "move index*.html ../.";
+#else
+ std::string strcommand3 = "mv index*.html ../.";
+#endif
+
+ std::string strcommand = strcommand1 +" && "+
+ strcommand2 +" && "+
+ strcommand3;
+
+ std::cout << "system: " << strcommand0 << std::endl;
+ std::cout << "system: " << strcommand << std::endl;
+
+ system ( strcommand0.c_str() );
+ system ( strcommand.c_str() );
}
//================================================================
Program: bbtk
Module: $RCSfile: bbtkWxGUIConsole.h,v $
Language: C++
- Date: $Date: 2008/03/20 09:51:29 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/03/25 06:22:53 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// which creates but does not execute pipelines.
void SetNoExecMode(bool b) { mInterpreter->SetNoExecMode(b); }
- void SetDialogMode(Interpreter::DialogModeType t)
+ void SetDialogMode(Interpreter::DialogModeType t)
{ mInterpreter->SetDialogMode(t); }
/// Runs the interpretation of a file
Program: bbtk
Module: $RCSfile: bbtkWxGUIHtmlBrowser.cxx,v $
Language: C++
- Date: $Date: 2008/03/21 14:59:39 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/03/25 06:22:53 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//========================================================================
void WxGUIHtmlBrowser::OnLinkClicked(wxHtmlLinkEvent& e)
{
- std::cout << "BrOnLink"<<std::endl;
bool go = true;
if (mUser)