From 58a0c41713a43641143fac157219966d3f38c4c8 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 13:12:57 +0200 Subject: [PATCH 01/10] Fixed compilation on OSX & Linux --- CMakeLists.txt | 4 ---- src/CMakeLists.txt | 9 +++++++-- xs/CMakeLists.txt | 6 ++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80aa7ff083..84f6bcbd5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,9 +287,5 @@ endif () add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs) add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -#install(PROGRAMS slic3r.pl DESTINATION bin RENAME slic3r-prusa3d) - file(GLOB MyVar var/*.png) install(FILES ${MyVar} DESTINATION share/slic3r-prusa3d) -install(FILES lib/Slic3r.pm DESTINATION lib/slic3r-prusa3d) -install(DIRECTORY lib/Slic3r DESTINATION lib/slic3r-prusa3d) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d0c0082937..7d184c59fe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,11 +36,9 @@ else() add_subdirectory(png/zlib) set(ZLIB_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/png/zlib ${CMAKE_CURRENT_BINARY_DIR}/png/zlib) include_directories(${ZLIB_INCLUDE_DIR}) - message(STATUS "ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIR}") add_subdirectory(png/libpng) set_target_properties(zlibstatic PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(png_static PROPERTIES POSITION_INDEPENDENT_CODE ON) -# target_include_directories(png_static PRIVATE ${ZLIB_INCLUDE_DIR}) set(PNG_LIBRARIES png_static zlibstatic) set(PNG_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/png/libpng ${CMAKE_CURRENT_BINARY_DIR}/png/libpng) endif() @@ -51,6 +49,13 @@ add_subdirectory(slic3r) # Create a slic3r executable add_executable(slic3r slic3r.cpp) target_link_libraries(slic3r libslic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES}) +if (APPLE) +# add_compile_options(-stdlib=libc++) +# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE) + target_link_libraries(XS "-framework IOKit" "-framework CoreFoundation" -lc++) +elseif (NOT MSVC) + target_link_libraries(XS -lstdc++) +endif () # Add the OpenGL and GLU libraries. if (SLIC3R_GUI) if (MSVC) diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 92964c900a..8756d98ebd 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -97,7 +97,7 @@ if(SLIC3R_PROFILE) target_link_libraries(XS Shiny) endif() -target_include_directories(XS PRIVATE src src/libslic3r) # Local include directories +target_include_directories(XS PRIVATE src) target_compile_definitions(XS PRIVATE -DSLIC3RXS) set_target_properties(XS PROPERTIES PREFIX "") # Prevent cmake from generating libXS.so instead of XS.so @@ -157,7 +157,7 @@ target_link_libraries(XS ${EXPAT_LIBRARIES}) # target_link_libraries(XS ${GLEW_LIBRARIES}) # Install the XS.pm and XS.{so,dll,bundle} into the local-lib directory. -set(PERL_LOCAL_LIB_DIR "../local-lib/lib/perl5/${PerlEmbed_ARCHNAME}") +set(PERL_LOCAL_LIB_DIR "../../local-lib/lib/perl5/${PerlEmbed_ARCHNAME}") add_custom_command( TARGET XS POST_BUILD @@ -175,8 +175,6 @@ if(APPLE) ) endif() -target_include_directories(XS PRIVATE src src/libslic3r) - if(SLIC3R_PROFILE) target_link_libraries(Shiny) endif() From 681e9f03b31d9f31ef3724953dbf6b87b8b33346 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 13:16:20 +0200 Subject: [PATCH 02/10] Yet another fix of build process --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7d184c59fe..d7eb474472 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -52,9 +52,9 @@ target_link_libraries(slic3r libslic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CU if (APPLE) # add_compile_options(-stdlib=libc++) # add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE) - target_link_libraries(XS "-framework IOKit" "-framework CoreFoundation" -lc++) + target_link_libraries(slic3r "-framework IOKit" "-framework CoreFoundation" -lc++) elseif (NOT MSVC) - target_link_libraries(XS -lstdc++) + target_link_libraries(slic3r -lstdc++) endif () # Add the OpenGL and GLU libraries. if (SLIC3R_GUI) From 8f01266ca4bfb78bd40425d80e8526d0a1a7c478 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 14:22:48 +0200 Subject: [PATCH 03/10] Fix of compilation on Linux & OSX: Cannot create a "slic3r" executable next to a "slic3r" directory. --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d7eb474472..f3a4fe1e15 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -48,6 +48,11 @@ add_subdirectory(slic3r) # Create a slic3r executable add_executable(slic3r slic3r.cpp) +if(SLIC3R_GUI) + set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-gui") +else() + set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-console") +endif() target_link_libraries(slic3r libslic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES}) if (APPLE) # add_compile_options(-stdlib=libc++) From ffac360439fe9942831c6d0556dfdef31b60ac62 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 14:43:38 +0200 Subject: [PATCH 04/10] Yet another build system fix --- src/CMakeLists.txt | 2 +- xs/CMakeLists.txt | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f3a4fe1e15..f133e2532b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,6 +70,6 @@ if (SLIC3R_GUI) elseif (APPLE) target_link_libraries(slic3r "-framework OpenGL") else () - target_link_libraries(slic3r -lGL -lGLU) + target_link_libraries(slic3r -ldl -lGL -lGLU) endif () endif () diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 8756d98ebd..3f37213ae5 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -109,7 +109,8 @@ target_link_libraries(XS ${Boost_LIBRARIES}) if (APPLE) # add_compile_options(-stdlib=libc++) # add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE) - target_link_libraries(XS "-framework IOKit" "-framework CoreFoundation" -lc++) + # -liconv: boost links to libiconv by default + target_link_libraries(XS "-liconv -framework IOKit" "-framework CoreFoundation" -lc++) elseif (MSVC) target_link_libraries(XS ) else () @@ -142,14 +143,6 @@ if (WIN32) target_link_libraries(XS ${PERL_LIBRARY}) endif() -# Find and configure boost -if(SLIC3R_STATIC) - # Use static boost libraries. - set(Boost_USE_STATIC_LIBS ON) - # Use boost libraries linked statically to the C++ runtime. - # set(Boost_USE_STATIC_RUNTIME ON) -endif() - target_link_libraries(XS ${Boost_LIBRARIES}) target_link_libraries(XS ${TBB_LIBRARIES}) # target_link_libraries(XS ${wxWidgets_LIBRARIES}) From cc3572f3cee83937235fc54180d06fa258207dc2 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 15:47:32 +0200 Subject: [PATCH 05/10] Another step to fix the build system. --- src/CMakeLists.txt | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f133e2532b..ea3d350180 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,7 +19,6 @@ add_subdirectory(libnest2d) include_directories(${LIBDIR}/qhull/src) #message(STATUS ${LIBDIR}/qhull/src) - # ############################################################################## # Configure rasterizer target # ############################################################################## @@ -53,16 +52,41 @@ if(SLIC3R_GUI) else() set_target_properties(slic3r PROPERTIES OUTPUT_NAME "slic3r-console") endif() -target_link_libraries(slic3r libslic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES}) +target_link_libraries(slic3r libslic3r) if (APPLE) # add_compile_options(-stdlib=libc++) # add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE) - target_link_libraries(slic3r "-framework IOKit" "-framework CoreFoundation" -lc++) + # -liconv: boost links to libiconv by default + target_link_libraries(slic3r "-liconv -framework IOKit" "-framework CoreFoundation" -lc++) elseif (NOT MSVC) - target_link_libraries(slic3r -lstdc++) + target_link_libraries(slic3r -ldl -lstdc++) endif () -# Add the OpenGL and GLU libraries. + +# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) + target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES}) + + # Configure libcurl & OpenSSL + find_package(CURL REQUIRED) + target_include_directories(slic3r PRIVATE ${CURL_INCLUDE_DIRS}) + target_link_libraries(slic3r ${CURL_LIBRARIES}) + if (SLIC3R_STATIC) + if (NOT APPLE) + # libcurl is always linked dynamically to the system libcurl on OSX. + # On other systems, libcurl is linked statically if SLIC3R_STATIC is set. + target_compile_definitions(slic3r PRIVATE CURL_STATICLIB) + endif() + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + # As of now, our build system produces a statically linked libcurl, + # which links the OpenSSL library dynamically. + find_package(OpenSSL REQUIRED) + message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}") + message("OpenSSL libraries: ${OPENSSL_LIBRARIES}") + target_include_directories(slic3r PRIVATE ${OPENSSL_INCLUDE_DIR}) + target_link_libraries(slic3r ${OPENSSL_LIBRARIES}) + endif() + endif() + if (MSVC) target_link_libraries(slic3r user32.lib Setupapi.lib OpenGL32.Lib GlU32.Lib) elseif (MINGW) From 6003005812ec68eab3b321107f7a6c1d4dbae935 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 17:19:06 +0200 Subject: [PATCH 06/10] Removed dependency on wxWidgets from Alien. Updated source code to wxWidgets 3.1.1 Moved invocation of perl unit / integration tests to the xs project. --- CMakeLists.txt | 44 ++---------------------------- src/CMakeLists.txt | 3 ++ src/slic3r/GUI/GUI_ObjectParts.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 4 +-- src/slic3r/GUI/wxExtensions.hpp | 1 + xs/CMakeLists.txt | 16 +++++++++++ 6 files changed, 25 insertions(+), 45 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84f6bcbd5d..65a1240556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,33 +175,6 @@ endif() # The Intel TBB library will use the std::exception_ptr feature of C++11. add_definitions(-DTBB_USE_CAPTURED_EXCEPTION=0) -# Find and configure wxWidgets -if (SLIC3R_PRUSACONTROL) - set(wxWidgets_UseAlienWx 1) - if (wxWidgets_UseAlienWx) - set(AlienWx_DEBUG 1) - find_package(AlienWx REQUIRED COMPONENTS base core adv html gl) - include_directories(${AlienWx_INCLUDE_DIRS}) - #add_compile_options(${AlienWx_CXX_FLAGS}) - add_definitions(${AlienWx_DEFINITIONS}) - set(wxWidgets_LIBRARIES ${AlienWx_LIBRARIES}) - # On Linux / gtk, we need to have a direct access to gtk+ for some workarounds. - if (AlienWx_GUI_TOOLKIT STREQUAL "gtk2") - pkg_check_modules(GTK2 gtk+-2.0) - include_directories(${GTK2_INCLUDE_DIRS}) - endif() - if (AlienWx_GUI_TOOLKIT STREQUAL "gtk3") - pkg_check_modules(GTK3 gtk+-3.0) - include_directories(${GTK3_INCLUDE_DIRS}) - endif() - else () - find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl) - include(${wxWidgets_USE_FILE}) - endif () -#FIXME rewrite the PRUS format to miniz! -# add_definitions(-DSLIC3R_GUI -DSLIC3R_PRUS) -endif() - find_package(CURL REQUIRED) include_directories(${CURL_INCLUDE_DIRS}) @@ -270,22 +243,9 @@ add_subdirectory(resources/localization) add_subdirectory(src) # Perl bindings, currently only used for the unit / integration tests of libslic3r. +# Also runs the unit / integration tests. +#FIXME Port the tests into C++ to finally get rid of the Perl! add_subdirectory(xs) -get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY) -if (MSVC) - # By default the startup project in MSVC is the 'ALL_BUILD' cmake-created project, - # but we want 'slic3r' as the startup one because debugging run command is associated with it. - # (Unfortunatelly it cannot be associated with ALL_BUILD using CMake.) - # Note: For some reason this needs to be set in the top-level CMakeLists.txt - set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT XS) - set(PERL_PROVE "${PERL_BIN_PATH}/prove.bat") -else () - set(PERL_PROVE "${PERL_BIN_PATH}/prove") -endif () - -add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs) -add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) - file(GLOB MyVar var/*.png) install(FILES ${MyVar} DESTINATION share/slic3r-prusa3d) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea3d350180..d2b79ae788 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,6 +64,9 @@ endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) + find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl) + include(${wxWidgets_USE_FILE}) + target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES}) # Configure libcurl & OpenSSL diff --git a/src/slic3r/GUI/GUI_ObjectParts.cpp b/src/slic3r/GUI/GUI_ObjectParts.cpp index ae34359ce9..4fc3b88c0f 100644 --- a/src/slic3r/GUI/GUI_ObjectParts.cpp +++ b/src/slic3r/GUI/GUI_ObjectParts.cpp @@ -1008,7 +1008,7 @@ void get_settings_choice(wxMenu *menu, int id, bool is_part) if (!settings_list) return; - if (wxGetMultipleChoices(selections, _(L("Select showing settings")), category_name, names) ==0 ) + if (wxGetSelectedChoices(selections, _(L("Select showing settings")), category_name, names) == -1) return; std::vector selected_options; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index e0db63803d..5b438d4a19 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2645,7 +2645,7 @@ void Tab::update_presetsctrl(wxDataViewTreeCtrl* ui, bool show_incompatible) wxDataViewTreeStoreContainerNode *node = ui->GetStore()->FindContainerNode(root_sys); if (node) { - wxDataViewTreeStoreNodeList::iterator iter; + wxDataViewTreeStoreNodes::iterator iter; for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++) { wxDataViewTreeStoreNode* child = *iter; @@ -2731,7 +2731,7 @@ void Tab::update_tab_presets(wxComboCtrl* ui, bool show_incompatible) wxDataViewTreeStoreContainerNode *node = popup->GetStore()->FindContainerNode(root_sys); if (node) { - wxDataViewTreeStoreNodeList::iterator iter; + wxDataViewTreeStoreNodes::iterator iter; for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++) { wxDataViewTreeStoreNode* child = *iter; diff --git a/src/slic3r/GUI/wxExtensions.hpp b/src/slic3r/GUI/wxExtensions.hpp index 51c02035c0..a6cbf1773b 100644 --- a/src/slic3r/GUI/wxExtensions.hpp +++ b/src/slic3r/GUI/wxExtensions.hpp @@ -111,6 +111,7 @@ class PrusaCollapsiblePaneMSW : public PrusaCollapsiblePane//wxCollapsiblePane wxButton* m_pDisclosureTriangleButton = nullptr; wxBitmap m_bmp_close; wxBitmap m_bmp_open; + wxString m_strLabel; public: PrusaCollapsiblePaneMSW() {} PrusaCollapsiblePaneMSW( wxWindow *parent, diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index 3f37213ae5..b3bda1877f 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -185,3 +185,19 @@ endif() # Installation install(TARGETS XS DESTINATION ${PERL_VENDORARCH}/auto/Slic3r/XS) install(FILES lib/Slic3r/XS.pm DESTINATION ${PERL_VENDORLIB}/Slic3r) + +# Unit / integration tests +enable_testing() +get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY) +if (MSVC) + # By default the startup project in MSVC is the 'ALL_BUILD' cmake-created project, + # but we want 'slic3r' as the startup one because debugging run command is associated with it. + # (Unfortunatelly it cannot be associated with ALL_BUILD using CMake.) + # Note: For some reason this needs to be set in the top-level CMakeLists.txt + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT XS) + set(PERL_PROVE "${PERL_BIN_PATH}/prove.bat") +else () + set(PERL_PROVE "${PERL_BIN_PATH}/prove") +endif () +add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) +add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/..) From d7f1c8670f6a26792008baaeaf638bf051f963ab Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 17:55:17 +0200 Subject: [PATCH 07/10] Removed wrong dependency on wxWidgets from libslic3r. Added cmake message for WXWIN environment variable. --- src/CMakeLists.txt | 1 + src/libslic3r/GCode/PreviewData.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d2b79ae788..cf37a82c91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -64,6 +64,7 @@ endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) + message(STATUS "WXWIN environment set to: $ENV{WXWIN}") find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl) include(${wxWidgets_USE_FILE}) diff --git a/src/libslic3r/GCode/PreviewData.cpp b/src/libslic3r/GCode/PreviewData.cpp index 9cf9716e0a..564fc34dce 100644 --- a/src/libslic3r/GCode/PreviewData.cpp +++ b/src/libslic3r/GCode/PreviewData.cpp @@ -1,7 +1,6 @@ #include "Analyzer.hpp" #include "PreviewData.hpp" #include -#include #include #include From ad54266395a46cb226637cbd8deb3a68ebfaf539 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 18:05:58 +0200 Subject: [PATCH 08/10] Fixed GUI build --- src/CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cf37a82c91..fcf7c17dcc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,6 +43,13 @@ else() endif() add_subdirectory(libslic3r) + +if (SLIC3R_GUI) + message(STATUS "WXWIN environment set to: $ENV{WXWIN}") + find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl) + include(${wxWidgets_USE_FILE}) +endif() + add_subdirectory(slic3r) # Create a slic3r executable @@ -64,10 +71,6 @@ endif () # Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries. if (SLIC3R_GUI) - message(STATUS "WXWIN environment set to: $ENV{WXWIN}") - find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl) - include(${wxWidgets_USE_FILE}) - target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES}) # Configure libcurl & OpenSSL From 9c085dfcc5f854c90246a3300c96f8e42ee89364 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 18:31:41 +0200 Subject: [PATCH 09/10] Fixed Perl unit tests. --- xs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt index b3bda1877f..f3afca619b 100644 --- a/xs/CMakeLists.txt +++ b/xs/CMakeLists.txt @@ -199,5 +199,5 @@ if (MSVC) else () set(PERL_PROVE "${PERL_BIN_PATH}/prove") endif () -add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) +add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/../local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/..) From 6ca5a18d05761e6e60fd9ef31e1e701a62d1c88e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 19 Sep 2018 18:54:23 +0200 Subject: [PATCH 10/10] Commented out wxPixelData.UseAlpha(), as it is missing from wxWidgets 3.1.1. --- src/slic3r/GUI/BitmapCache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp index 93853458e4..16baa1629e 100644 --- a/src/slic3r/GUI/BitmapCache.cpp +++ b/src/slic3r/GUI/BitmapCache.cpp @@ -97,7 +97,9 @@ wxBitmap* BitmapCache::insert(const std::string &bitmap_key, const wxBitmap *beg if (bmp->GetWidth() > 0) { if (bmp->GetDepth() == 32) { wxAlphaPixelData data(*const_cast(bmp)); - data.UseAlpha(); + //FIXME The following method is missing from wxWidgets 3.1.1. + // It looks like the wxWidgets 3.0.3 called the wrapped bitmap's UseAlpha(). + //data.UseAlpha(); if (data) { for (int r = 0; r < bmp->GetHeight(); ++ r) { wxAlphaPixelData::Iterator src(data);