From: Eduardo DAVILA Date: Tue, 17 Jul 2018 14:42:29 +0000 (+0200) Subject: #3203 BBTK Feature New Normal vtk7itk4wx3-mingw64 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0f2b2115a28d1535f94ed108453579c166060e31;p=bbtk.git #3203 BBTK Feature New Normal vtk7itk4wx3-mingw64 --- diff --git a/kernel/appli/bbStudio/CMakeLists.txt b/kernel/appli/bbStudio/CMakeLists.txt index 53dd24f..0dfb6ae 100644 --- a/kernel/appli/bbStudio/CMakeLists.txt +++ b/kernel/appli/bbStudio/CMakeLists.txt @@ -38,7 +38,14 @@ SET(SOURCES IF(BBTK_USE_WXWIDGETS AND WIN32) ADD_EXECUTABLE(bbStudio WIN32 ${SOURCES}) - SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS /subsystem:console ) + + IF(MINGW) + SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS -mconsole ) + ELSE(MINGW) + SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS /subsystem:console ) + ENDIF(MINGW) + + ELSE(BBTK_USE_WXWIDGETS AND WIN32) ADD_EXECUTABLE(bbStudio MACOSX_BUNDLE ${SOURCES} ) ENDIF(BBTK_USE_WXWIDGETS AND WIN32) diff --git a/kernel/appli/bbStudio/bbStudio.cxx b/kernel/appli/bbStudio/bbStudio.cxx index 25e4612..26163a8 100644 --- a/kernel/appli/bbStudio/bbStudio.cxx +++ b/kernel/appli/bbStudio/bbStudio.cxx @@ -143,7 +143,11 @@ bool wxBBIApp::OnInit( ) // you need to use the linker option "/subsystem:console" and the following code: int main(int argc, char* argv[]) { - return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL); + // EED 2018-07-16 + char buffer[1500]; + wcstombs(buffer , ::GetCommandLine() , 1500 ); + return WinMain(::GetModuleHandle(NULL), NULL, buffer , SW_SHOWNORMAL); +// return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL); } #endif // defined(_WIN32) diff --git a/kernel/cmake/BBTKConfigurePackagePaths.cmake b/kernel/cmake/BBTKConfigurePackagePaths.cmake index 634a2a7..33553cb 100644 --- a/kernel/cmake/BBTKConfigurePackagePaths.cmake +++ b/kernel/cmake/BBTKConfigurePackagePaths.cmake @@ -49,7 +49,6 @@ IF(WIN32) SET(BBTK_BBFY "${BBTK_BIN_PATH}/bbfy") SET(BBTK_BBPCONFIGURATOR "${BBTK_BIN_PATH}/bbpConfigurator") SET(BBTK_BBDOC "${BBTK_BIN_PATH}/bbdoc") - ELSE(WIN32) # SET (EXECUTABLE_OUTPUT_REL_PATH bin) # SET (LIBRARY_OUTPUT_REL_PATH bin) diff --git a/kernel/cmake/BBTKConfigurePackage_src.cmake b/kernel/cmake/BBTKConfigurePackage_src.cmake index eab078a..b151364 100644 --- a/kernel/cmake/BBTKConfigurePackage_src.cmake +++ b/kernel/cmake/BBTKConfigurePackage_src.cmake @@ -120,7 +120,7 @@ FOREACH(xmlfile ${${BBTK_PACKAGE_NAME}_XML_SOURCES}) COMMAND echo ${BBFY_CXX_OUT} COMMAND echo set "Path=${crea_DIR}/bin/\;"${DLL_PATH} COMMAND echo ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q - COMMAND echo ${BBFY_CXX_OUT} +## COMMAND echo ${BBFY_CXX_OUT} COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q ## COMMAND set Path=${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q DEPENDS ${xmlfile} diff --git a/kernel/cmake/BBTKKernelConfig.cmake b/kernel/cmake/BBTKKernelConfig.cmake index dc25843..f6305aa 100644 --- a/kernel/cmake/BBTKKernelConfig.cmake +++ b/kernel/cmake/BBTKKernelConfig.cmake @@ -82,6 +82,10 @@ IF(WIN32) ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6") SET(BBTK_BIN_PATH $(SolutionDir)/$(OutDir)) ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6") + IF(MINGW) + message ( ${EXECUTABLE_OUTPUT_PATH} ) + SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH} ) + ENDIF(MINGW) ENDIF(MSVC10) SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp.exe) SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc.exe) diff --git a/kernel/src/xmlParser.cpp b/kernel/src/xmlParser.cpp index fd98323..b1bf2b0 100644 --- a/kernel/src/xmlParser.cpp +++ b/kernel/src/xmlParser.cpp @@ -382,7 +382,8 @@ XMLNode XMLNode::openFileHelper(XMLCSTR filename, XMLCSTR tag) // display message #if defined(WIN32) && !defined(UNDER_CE) && !defined(_XMLPARSER_NO_MESSAGEBOX_) - MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST); +// MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST); + printf("%s",message); #else printf("%s",message); #endif diff --git a/kernel/src/xmlParser.h b/kernel/src/xmlParser.h index b78066b..b6c8360 100644 --- a/kernel/src/xmlParser.h +++ b/kernel/src/xmlParser.h @@ -92,9 +92,9 @@ #ifdef _USE_XMLPARSER_DLL #ifdef _DLL_EXPORTS_ - #define DLLENTRY __declspec(dllexport) + #define DLLENTRY __declspec(dllexport) #else - #define DLLENTRY __declspec(dllimport) + #define DLLENTRY __declspec(dllimport) #endif /* _DLL_EXPORTS_ */ #else #define DLLENTRY @@ -111,8 +111,11 @@ // ==> I try a '#if' // #if defined(WIN32) + #ifndef _MSC_VER + #define XML_NO_WIDE_CHAR + #endif #else - #define XML_NO_WIDE_CHAR + #define XML_NO_WIDE_CHAR #endif /* WIN32 */ #ifdef XML_NO_WIDE_CHAR @@ -123,7 +126,18 @@ #ifdef _XMLWINDOWS #include #else -#define DLLENTRY + + + #if defined(WIN32) + #ifdef _MSC_VER + #define DLLENTRY + #endif + #else + #define DLLENTRY + #endif /* WIN32 */ + + + #ifndef XML_NO_WIDE_CHAR #include // to have 'wcsrtombs' for ANSI version // to have 'mbsrtowcs' for UNICODE version