]> Creatis software - bbtk.git/commitdiff
#3203 BBTK Feature New Normal vtk7itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 17 Jul 2018 14:42:29 +0000 (16:42 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 17 Jul 2018 14:42:29 +0000 (16:42 +0200)
kernel/appli/bbStudio/CMakeLists.txt
kernel/appli/bbStudio/bbStudio.cxx
kernel/cmake/BBTKConfigurePackagePaths.cmake
kernel/cmake/BBTKConfigurePackage_src.cmake
kernel/cmake/BBTKKernelConfig.cmake
kernel/src/xmlParser.cpp
kernel/src/xmlParser.h

index 53dd24fc1c8be4bc0d960b2916526fca853c3cad..0dfb6ae0374ee9abcdf77fb0336b9c8eaff8622c 100644 (file)
@@ -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)
index 25e4612cf6f2fd227a4601f37534e3850519a199..26163a83eab127c1d401996589a449e88ae935aa 100644 (file)
@@ -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) 
index 634a2a7bbbe86874a981a0628365395583a8f54d..33553cb63d9d8a70189ecc7b3ce0a66d7c68926a 100644 (file)
@@ -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)
index eab078afa44f902f6be720483e20e881acedd5cc..b1513644ce7fadb5245b3329b8d247cf375c8375 100644 (file)
@@ -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}
index dc2584328a7bc59e24fe8448216ccbf5fb648fd6..f6305aacc5fc2f0220685b65a2315edfebcdf62d 100644 (file)
@@ -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)
index fd983230464194ab3e286b9a8163e19ce9c3167c..b1bf2b049de79bff9f17fd3883e5d55679905e95 100644 (file)
@@ -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
index b78066bcbef38eb1bdd81c21de33ba9bca7a3472..b6c8360cc1a71fdaa8aeab971fe9ed43b9a472de 100644 (file)
@@ -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
 // ==> 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
 #ifdef _XMLWINDOWS
 #include <tchar.h>
 #else
-#define DLLENTRY
+
+       
+       #if defined(WIN32)
+               #ifdef _MSC_VER
+                       #define DLLENTRY
+               #endif
+       #else
+               #define DLLENTRY
+       #endif /* WIN32 */
+
+
+
 #ifndef XML_NO_WIDE_CHAR
 #include <wchar.h> // to have 'wcsrtombs' for ANSI version
                    // to have 'mbsrtowcs' for UNICODE version