diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d9ad7861cf..6daf18b0b5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ if (APPLE) if (CMAKE_MACOSX_BUNDLE) set(CMAKE_INSTALL_RPATH @executable_path/../Frameworks) endif() - set(CMAKE_OSX_DEPLOYMENT_TARGET "11.3" CACHE STRING "Minimum OS X deployment version" FORCE) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) SET(CMAKE_XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.softfever3d.orca-slicer") endif () @@ -369,7 +369,7 @@ endif() # boost::process was introduced first in version 1.64.0, # boost::beast::detail::base64 was introduced first in version 1.66.0 set(MINIMUM_BOOST_VERSION "1.66.0") -set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams") +set(_boost_components "system;filesystem;thread;log;regex;chrono;atomic;date_time;iostreams;locale;") find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components}) add_library(boost_libs INTERFACE) diff --git a/deps/Boost/Boost.cmake b/deps/Boost/Boost.cmake index a48b5f017e0..8e5b92e9e8b 100644 --- a/deps/Boost/Boost.cmake +++ b/deps/Boost/Boost.cmake @@ -9,8 +9,12 @@ if (WIN32) else() set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz") set(_boost_hash AEB26F80E80945E82EE93E5939BAEBDCA47B9DEE80A07D3144BE1E1A6A66DD6A) + #set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.gz") + #set(_boost_hash 94CED8B72956591C4775AE2207A9763D3600B30D9D7446562C552F0A14A63BE7) + #set(_boost_url "https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz") + #set(_boost_hash a5800f405508f5df8114558ca9855d2640a2de8f0445f051fa1c7c3383045724) set(_bootstrap_cmd ./bootstrap.sh) - set(_build_cmd ./b2) + set(_build_cmd ./b2 -sICONV_PATH=/opt/local) endif() set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/common.jam ./tools/build/src/tools/common.jam) @@ -170,10 +174,10 @@ ExternalProject_Add( URL_HASH SHA256=${_boost_hash} DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost CONFIGURE_COMMAND ./bootstrap.sh - --with-toolset=clang + #--with-toolset=clang --with-libraries=date_time,filesystem,iostreams,locale,log,regex,system,thread "--prefix=${DESTDIR}/usr/local" -# PATCH_COMMAND ${_patch_command} + PATCH_COMMAND ${_patch_command} BUILD_COMMAND "${_build_cmd}" BUILD_IN_SOURCE ON INSTALL_COMMAND "${_install_cmd}" diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 66a858cf6f8..34f33a7ee93 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -163,7 +163,7 @@ if (MSVC) endif () elseif (APPLE) message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}") - set(CMAKE_OSX_DEPLOYMENT_TARGET "11.3" CACHE STRING "Minimum OS X deployment version" FORCE) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) if (CMAKE_OSX_DEPLOYMENT_TARGET) set(DEP_OSX_TARGET "${CMAKE_OSX_DEPLOYMENT_TARGET}") message("OS X Deployment Target: ${DEP_OSX_TARGET}") @@ -193,6 +193,7 @@ if (NOT ZLIB_FOUND) include(ZLIB/ZLIB.cmake) set(ZLIB_PKG dep_ZLIB) endif () + set(PNG_PKG "") if (NOT PNG_FOUND) include(PNG/PNG.cmake) diff --git a/deps/FREETYPE/FREETYPE.cmake b/deps/FREETYPE/FREETYPE.cmake index f30671ff2c3..b9e5a41e2ea 100644 --- a/deps/FREETYPE/FREETYPE.cmake +++ b/deps/FREETYPE/FREETYPE.cmake @@ -13,7 +13,7 @@ endif() orcaslicer_add_cmake_project(FREETYPE URL https://mirror.ossplanet.net/nongnu/freetype/freetype-2.12.1.tar.gz URL_HASH SHA256=efe71fd4b8246f1b0b1b9bfca13cfff1c9ad85930340c27df469733bbb620938 - #DEPENDS ${ZLIB_PKG} + DEPENDS ${ZLIB_PKG} #"${_patch_step}" CMAKE_ARGS -D BUILD_SHARED_LIBS=${library_build_shared} @@ -22,6 +22,7 @@ orcaslicer_add_cmake_project(FREETYPE -D FT_DISABLE_PNG=TRUE -D FT_DISABLE_HARFBUZZ=TRUE -D FT_DISABLE_BROTLI=TRUE + -D FT_DISABLE_ZLIB=TRUE ) if(MSVC) diff --git a/deps/PNG/PNG.cmake b/deps/PNG/PNG.cmake index 313a147bab7..70a9a8bfa61 100644 --- a/deps/PNG/PNG.cmake +++ b/deps/PNG/PNG.cmake @@ -19,6 +19,7 @@ if(APPLE AND IS_CROSS_COMPILE) -DPNG_PREFIX=prusaslicer_ -DPNG_TESTS=OFF -DDISABLE_DEPENDENCY_TRACKING=OFF + -DPNG_BUILD_ZLIB=ON ${_disable_neon_extension} ) else () @@ -39,6 +40,7 @@ set(_patch_step "") -DPNG_PREFIX=prusaslicer_ -DPNG_TESTS=OFF -DDISABLE_DEPENDENCY_TRACKING=OFF + -DPNG_BUILD_ZLIB=ON ${_disable_neon_extension} ) endif() diff --git a/deps/TIFF/TIFF.cmake b/deps/TIFF/TIFF.cmake index b9c004d65b4..5a2b89caa70 100644 --- a/deps/TIFF/TIFF.cmake +++ b/deps/TIFF/TIFF.cmake @@ -3,8 +3,9 @@ find_package(OpenGL QUIET REQUIRED) if (APPLE) message(STATUS "Compiling TIFF for macos ${CMAKE_SYSTEM_VERSION}.") orcaslicer_add_cmake_project(TIFF - URL https://gitlab.com/libtiff/libtiff/-/archive/v4.3.0/libtiff-v4.3.0.zip - URL_HASH SHA256=4fca1b582c88319f3ad6ecd5b46320eadaf5eb4ef6f6c32d44caaae4a03d0726 + #URL https://gitlab.com/libtiff/libtiff/-/archive/v4.3.0/libtiff-v4.3.0.zip + URL https://gitlab.com/libtiff/libtiff/-/archive/v4.6.0/libtiff-v4.6.0.zip + #URL_HASH SHA256=4fca1b582c88319f3ad6ecd5b46320eadaf5eb4ef6f6c32d44caaae4a03d0726 DEPENDS ${ZLIB_PKG} ${PNG_PKG} dep_JPEG CMAKE_ARGS -Dlzma:BOOL=OFF @@ -12,6 +13,8 @@ if (APPLE) -Djbig:BOOL=OFF -Dzstd:BOOL=OFF -Dpixarlog:BOOL=OFF + -Dlerc:BOOL=OFF + -Dlibdeflate:BOOL=OFF ) else() orcaslicer_add_cmake_project(TIFF @@ -24,6 +27,7 @@ else() -Djbig:BOOL=OFF -Dzstd:BOOL=OFF -Dpixarlog:BOOL=OFF + -Dlerc:BOOL=OFF ) endif() diff --git a/src/.vscode/settings.json b/src/.vscode/settings.json new file mode 100644 index 00000000000..32794fc62ae --- /dev/null +++ b/src/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "typeinfo": "cpp", + "unordered_set": "cpp" + } +} \ No newline at end of file diff --git a/src/slic3r/GUI/.vscode/settings.json b/src/slic3r/GUI/.vscode/settings.json new file mode 100644 index 00000000000..ee3b92a670a --- /dev/null +++ b/src/slic3r/GUI/.vscode/settings.json @@ -0,0 +1,82 @@ +{ + "files.associations": { + "typeinfo": "cpp", + "__bit_reference": "cpp", + "__config": "cpp", + "__debug": "cpp", + "__errc": "cpp", + "__functional_base": "cpp", + "__hash_table": "cpp", + "__locale": "cpp", + "__mutex_base": "cpp", + "__node_handle": "cpp", + "__nullptr": "cpp", + "__split_buffer": "cpp", + "__string": "cpp", + "__threading_support": "cpp", + "__tree": "cpp", + "__tuple": "cpp", + "algorithm": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "charconv": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "codecvt": "cpp", + "complex": "cpp", + "condition_variable": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "exception": "cpp", + "fstream": "cpp", + "functional": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "ios": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "iterator": "cpp", + "limits": "cpp", + "list": "cpp", + "locale": "cpp", + "map": "cpp", + "memory": "cpp", + "mutex": "cpp", + "new": "cpp", + "numeric": "cpp", + "optional": "cpp", + "ostream": "cpp", + "queue": "cpp", + "random": "cpp", + "ratio": "cpp", + "regex": "cpp", + "set": "cpp", + "sstream": "cpp", + "stack": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "unordered_map": "cpp", + "unordered_set": "cpp", + "utility": "cpp", + "vector": "cpp" + } +} \ No newline at end of file diff --git a/src/slic3r/GUI/CalibrationPanel.cpp b/src/slic3r/GUI/CalibrationPanel.cpp index 88e107da84c..109288cba9c 100644 --- a/src/slic3r/GUI/CalibrationPanel.cpp +++ b/src/slic3r/GUI/CalibrationPanel.cpp @@ -242,7 +242,7 @@ void SelectMObjectPopup::Popup(wxWindow* WXUNUSED(focus)) if (wxGetApp().is_user_login()) { if (!get_print_info_thread) { - get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { + get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { NetworkAgent* agent = wxGetApp().getAgent(); unsigned int http_code; std::string body; diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 1f1efd0862e..5951792b103 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4724,7 +4724,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg) cancelFn = [this, dlg]() { return m_is_closing || dlg->WasCanceled(); }; - finishFn = [this, userid = m_agent->get_user_id(), dlg, t = std::weak_ptr(m_user_sync_token)](bool ok) { + finishFn = [this, userid = m_agent->get_user_id(), dlg, t = std::weak_ptr(m_user_sync_token)](bool ok) { CallAfter([=]{ dlg->Destroy(); if (ok && m_agent && t.lock() == m_user_sync_token && userid == m_agent->get_user_id()) reload_settings(); @@ -4732,7 +4732,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg) }; } else { - finishFn = [this, userid = m_agent->get_user_id(), t = std::weak_ptr(m_user_sync_token)](bool ok) { + finishFn = [this, userid = m_agent->get_user_id(), t = std::weak_ptr(m_user_sync_token)](bool ok) { CallAfter([=] { if (ok && m_agent && t.lock() == m_user_sync_token && userid == m_agent->get_user_id()) reload_settings(); }); @@ -4740,7 +4740,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg) } m_sync_update_thread = Slic3r::create_thread( - [this, progressFn, cancelFn, finishFn, t = std::weak_ptr(m_user_sync_token)] { + [this, progressFn, cancelFn, finishFn, t = std::weak_ptr(m_user_sync_token)] { // get setting list, update setting list std::string version = preset_bundle->get_vendor_profile_version(PresetBundle::BBL_BUNDLE).to_string(); int ret = m_agent->get_setting_list2(version, [this](auto info) { diff --git a/src/slic3r/GUI/GUI_ObjectTableSettings.cpp b/src/slic3r/GUI/GUI_ObjectTableSettings.cpp index 7468d9c1b40..10578be691b 100644 --- a/src/slic3r/GUI/GUI_ObjectTableSettings.cpp +++ b/src/slic3r/GUI/GUI_ObjectTableSettings.cpp @@ -220,7 +220,7 @@ bool ObjectTableSettings::update_settings_list(bool is_object, bool is_multiple_ optgroup->sidetext_width = 5; optgroup->set_config_category_and_type(GUI::from_u8(group_category), Preset::TYPE_PRINT); - std::weak_ptr weak_optgroup(optgroup); + std::weak_ptr weak_optgroup(optgroup); optgroup->m_on_change = [this, is_object, object, config, group_category](const t_config_option_key &opt_id, const boost::any &value) { this->m_parent->Freeze(); this->update_config_values(is_object, object, config, group_category); diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index eb922861cfa..863fcaf1e89 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -433,7 +433,7 @@ void SelectMachinePopup::Popup(wxWindow *WXUNUSED(focus)) if (wxGetApp().is_user_login()) { if (!get_print_info_thread) { - get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { + get_print_info_thread = new boost::thread(Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { NetworkAgent* agent = wxGetApp().getAgent(); unsigned int http_code; std::string body; @@ -2833,7 +2833,7 @@ void SelectMachineDialog::update_user_machine_list() { NetworkAgent* m_agent = wxGetApp().getAgent(); if (m_agent && m_agent->is_user_login()) { - boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { + boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { NetworkAgent* agent = wxGetApp().getAgent(); unsigned int http_code; std::string body; diff --git a/src/slic3r/GUI/SendToPrinter.cpp b/src/slic3r/GUI/SendToPrinter.cpp index 1900e281bd4..24d0efad4d0 100644 --- a/src/slic3r/GUI/SendToPrinter.cpp +++ b/src/slic3r/GUI/SendToPrinter.cpp @@ -813,7 +813,7 @@ void SendToPrinterDialog::update_user_machine_list() { NetworkAgent* m_agent = wxGetApp().getAgent(); if (m_agent && m_agent->is_user_login()) { - boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { + boost::thread get_print_info_thread = Slic3r::create_thread([this, token = std::weak_ptr(m_token)] { NetworkAgent* agent = wxGetApp().getAgent(); unsigned int http_code; std::string body;