From: Eduardo DAVILA Date: Tue, 17 Jul 2018 11:38:05 +0000 (+0200) Subject: #3204 crea Feature New Normal branch mingw64 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4015d9762f1a6d7bf7436aa5c2004bb94fd86702;p=crea.git #3204 crea Feature New Normal branch mingw64 --- diff --git a/appli/creaDevManager/CMakeLists.txt b/appli/creaDevManager/CMakeLists.txt index bec75cd..f09ae28 100644 --- a/appli/creaDevManager/CMakeLists.txt +++ b/appli/creaDevManager/CMakeLists.txt @@ -53,6 +53,8 @@ INCLUDE_DIRECTORIES ( #-Dependencies--------------------------------------------------------------- # DEPENDENCIES (LIBRARIES TO LINK WITH) + + SET ( ${EXE_NAME}_LINK_LIBRARIES ${crea_LIBRARIES} ${WXWIDGETS_LIBRARIES} diff --git a/appli/creaNewProject/creaNewProject.cpp b/appli/creaNewProject/creaNewProject.cpp index 17f64ba..b7b1bf6 100644 --- a/appli/creaNewProject/creaNewProject.cpp +++ b/appli/creaNewProject/creaNewProject.cpp @@ -80,11 +80,15 @@ bool myApp::OnInit( ) command2 += "\"" + crea::wx2std(dir)+"\\"+crea::wx2std(name)+"\\CMakeLists.txt.in\""; if ( ! system ( command.c_str() ) ) { - system ( command1.c_str() ); + system ( command1.c_str() ); system ( command2.c_str() ); // Create a Package at the same time. JPR - char *author = (char*) (authorWX.mb_str()) ; + + //2018-07-06 mingw64 +// char *author = (char*) (authorWX.mb_str()) ; + char *author = authorWX.mb_str() ; + std::string nomDirectory = crea::wx2std(dir) + "\\" + crea::wx2std(name); std::string nomPackageDirectory = nomDirectory + "\\" + "bbtk_" + crea::wx2std(name) + "_PKG"; std::string bbCreatePackage("bbCreatePackage "); diff --git a/cmake/CREAMacro_FindAndUseVTK.cmake b/cmake/CREAMacro_FindAndUseVTK.cmake index 018187e..dd6db4c 100644 --- a/cmake/CREAMacro_FindAndUseVTK.cmake +++ b/cmake/CREAMacro_FindAndUseVTK.cmake @@ -135,7 +135,6 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5) vtkFiltersSources vtkInfovisLayout vtkIOVideo - vtkRenderingQt vtkDICOMParser vtkFiltersStatistics vtkInteractionImage @@ -169,12 +168,9 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5) vtkNetCDF vtkViewsContext2D vtkFiltersExtraction - vtkGUISupportQt vtkIOExport - vtkNetCDF_cxx vtkViewsCore vtkFiltersFlowPaths - vtkGUISupportQtSQL vtkIOGeometry vtkoggtheora vtkViewsGeovis @@ -187,7 +183,6 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5) vtkhdf5_hl vtkIOImport vtkpng - vtkViewsQt vtkFiltersGeometry vtkImagingColor vtkIOInfovis @@ -206,7 +201,25 @@ IF("${VTK_MAJOR_VERSION}" GREATER 5) vtkRenderingGL2PSOpenGL2 vtkRenderingContextOpenGL2 +# vtkRenderingQt +# vtkGUISupportQt +# vtkGUISupportQtSQL +# vtkViewsQt +# vtkNetCDF_cxx ) + IF (WIN32) + SET(VTK_LIBRARIES ${VTK_LIBRARIES} ) + ELSE(WIN32) + SET(VTK_LIBRARIES ${VTK_LIBRARIES} + vtkRenderingQt + vtkGUISupportQt + vtkGUISupportQtSQL + vtkViewsQt + vtkNetCDF_cxx + ) + ENDIF(WIN32) + + ENDIF("${VTK_MAJOR_VERSION}" GREATER 5) diff --git a/cmake/CREAMacro_FindAndUseWxWidgets.cmake b/cmake/CREAMacro_FindAndUseWxWidgets.cmake index ec0bdd1..1e7c6ca 100644 --- a/cmake/CREAMacro_FindAndUseWxWidgets.cmake +++ b/cmake/CREAMacro_FindAndUseWxWidgets.cmake @@ -49,7 +49,8 @@ MACRO(CREA_FIND_WXWIDGETS) # INCLUDE (${CREA_CMAKE_DIR}/FindWxWidgetsWin32.cmake) # # - find_package(wxwidgets REQUIRED COMPONENTS core base) +# find_package(wxwidgets REQUIRED COMPONENTS base core advanced adv html xml aui) + find_package(wxwidgets REQUIRED ) ELSE(WIN32) @@ -118,9 +119,12 @@ MACRO(CREA_USE_WXWIDGETS) # ) include(${wxWidgets_USE_FILE}) - - - + + SET(WXWIDGETS_LIBRARIES ${wxWidgets_LIBRARIES} + "${wxWidgets_LIB_DIR}/libwxmsw31u_aui.a" + "${wxWidgets_LIB_DIR}/libwxmsw31u_webview.a" + "${wxWidgets_LIB_DIR}/libwxmsw31u_html.a" + "${wxWidgets_LIB_DIR}/libwxmsw31u_adv.a" ) ELSE(WIN32) ## # GTK2 ## INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS}) diff --git a/src/creaWx.h b/src/creaWx.h index c97e10f..4a5e5f4 100644 --- a/src/creaWx.h +++ b/src/creaWx.h @@ -66,11 +66,15 @@ typedef void wxWindow; // (cout's to the console are visible) and has a wxWidgets GUI, // you need to use the linker option "/subsystem:console" and the following code: +//2018-07-06 mingw64 \ +// return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine() , SW_SHOWNORMAL); \ + #define CREA_WXMAIN_WITH_CONSOLE \ int main(int argc, char* argv[]) \ { \ - return WinMain(::GetModuleHandle(NULL), NULL, \ - ::GetCommandLine(), SW_SHOWNORMAL); \ + char getcommandline2[512]; \ + wcstombs(getcommandline2 , ::GetCommandLine() , 512); \ + return WinMain(::GetModuleHandle(NULL), NULL, getcommandline2, SW_SHOWNORMAL); \ } #else // defined(_WIN32)