From 2fa2ef18ba557a37b1502a79b09f32b915cbc3430181920045340a4905a85a2f Mon Sep 17 00:00:00 2001 From: Hans-Peter Jansen Date: Fri, 24 Dec 2021 18:19:51 +0000 Subject: [PATCH] Accepting request 942356 from home:bnavigator:branches:science - Update to 2.4.0 * Big changelog since v2.3.3, most changes decribed in alpha and beta release notes: https://github.com/prusa3d/PrusaSlicer/releases * Send system info: new dialog for telemetry. Opt-in. - Drop patches * PrusaSlicer-catch2upd.patch * PrusaSlicer-issue6681-openvdb.patch * PrusaSlicer-pr6590-updateTBB.patch OBS-URL: https://build.opensuse.org/request/show/942356 OBS-URL: https://build.opensuse.org/package/show/science/PrusaSlicer?expand=0&rev=32 --- FindTBB.cmake | 495 ----------------- PrusaSlicer-2.3.3.tar.gz | 3 - PrusaSlicer-2.4.0.tar.gz | 3 + PrusaSlicer-catch2upd.patch | 652 ---------------------- PrusaSlicer-issue6681-openvdb.patch | 77 --- PrusaSlicer-pr6590-updateTBB.patch | 803 ---------------------------- PrusaSlicer.changes | 13 + PrusaSlicer.spec | 28 +- 8 files changed, 21 insertions(+), 2053 deletions(-) delete mode 100644 FindTBB.cmake delete mode 100644 PrusaSlicer-2.3.3.tar.gz create mode 100644 PrusaSlicer-2.4.0.tar.gz delete mode 100644 PrusaSlicer-catch2upd.patch delete mode 100644 PrusaSlicer-issue6681-openvdb.patch delete mode 100644 PrusaSlicer-pr6590-updateTBB.patch diff --git a/FindTBB.cmake b/FindTBB.cmake deleted file mode 100644 index 527436a..0000000 --- a/FindTBB.cmake +++ /dev/null @@ -1,495 +0,0 @@ -# - Find ThreadingBuildingBlocks include dirs and libraries -# Use this module by invoking find_package with the form: -# find_package(TBB -# [REQUIRED] # Fail with error if TBB is not found -# ) # -# Once done, this will define -# -# TBB_FOUND - system has TBB -# TBB_INCLUDE_DIRS - the TBB include directories -# TBB_LIBRARIES - TBB libraries to be lined, doesn't include malloc or -# malloc proxy -# TBB::tbb - imported target for the TBB library -# -# TBB_VERSION_MAJOR - Major Product Version Number -# TBB_VERSION_MINOR - Minor Product Version Number -# TBB_INTERFACE_VERSION - Engineering Focused Version Number -# TBB_COMPATIBLE_INTERFACE_VERSION - The oldest major interface version -# still supported. This uses the engineering -# focused interface version numbers. -# -# TBB_MALLOC_FOUND - system has TBB malloc library -# TBB_MALLOC_INCLUDE_DIRS - the TBB malloc include directories -# TBB_MALLOC_LIBRARIES - The TBB malloc libraries to be lined -# TBB::malloc - imported target for the TBB malloc library -# -# TBB_MALLOC_PROXY_FOUND - system has TBB malloc proxy library -# TBB_MALLOC_PROXY_INCLUDE_DIRS = the TBB malloc proxy include directories -# TBB_MALLOC_PROXY_LIBRARIES - The TBB malloc proxy libraries to be lined -# TBB::malloc_proxy - imported target for the TBB malloc proxy library -# -# -# This module reads hints about search locations from variables: -# ENV TBB_ARCH_PLATFORM - for eg. set it to "mic" for Xeon Phi builds -# ENV TBB_ROOT or just TBB_ROOT - root directory of tbb installation -# ENV TBB_BUILD_PREFIX - specifies the build prefix for user built tbb -# libraries. Should be specified with ENV TBB_ROOT -# and optionally... -# ENV TBB_BUILD_DIR - if build directory is different than ${TBB_ROOT}/build -# -# -# Modified by Robert Maynard from the original OGRE source -# -#------------------------------------------------------------------- -# This file is part of the CMake build system for OGRE -# (Object-oriented Graphics Rendering Engine) -# For the latest info, see http://www.ogre3d.org/ -# -# The contents of this file are placed in the public domain. Feel -# free to make use of it in any way you like. -#------------------------------------------------------------------- -# -# ========================================================================= -# Taken from Copyright.txt in the root of the VTK source tree as per -# instructions to substitute the full license in place of the summary -# reference when distributing outside of VTK -# ========================================================================= -# -# Program: Visualization Toolkit -# Module: Copyright.txt -# -# Copyright (c) 1993-2015 Ken Martin, Will Schroeder, Bill Lorensen -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names -# of any contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# =========================================================================*/ - -#============================================================================= -# FindTBB helper functions and macros -# - -# Use TBBConfig.cmake if possible. - -set(_tbb_find_quiet) -if (TBB_FIND_QUIETLY) - set(_tbb_find_quiet QUIET) -endif () -set(_tbb_find_components) -set(_tbb_find_optional_components) -foreach (_tbb_find_component IN LISTS TBB_FIND_COMPONENTS) - if (TBB_FIND_REQUIRED_${_tbb_find_component}) - list(APPEND _tbb_find_components "${_tbb_find_component}") - else () - list(APPEND _tbb_find_optional_components "${_tbb_find_component}") - endif () -endforeach () -unset(_tbb_find_component) -find_package(TBB CONFIG ${_tbb_find_quiet} - COMPONENTS ${_tbb_find_components} - OPTIONAL_COMPONENTS ${_tbb_find_optional_components}) -unset(_tbb_find_quiet) -unset(_tbb_find_components) -unset(_tbb_find_optional_components) -if (TBB_FOUND) - return () -endif () - -#==================================================== -# Fix the library path in case it is a linker script -#==================================================== -function(tbb_extract_real_library library real_library) - if(NOT UNIX OR NOT EXISTS ${library}) - set(${real_library} "${library}" PARENT_SCOPE) - return() - endif() - - #Read in the first 4 bytes and see if they are the ELF magic number - set(_elf_magic "7f454c46") - file(READ ${library} _hex_data OFFSET 0 LIMIT 4 HEX) - if(_hex_data STREQUAL _elf_magic) - #we have opened a elf binary so this is what - #we should link to - set(${real_library} "${library}" PARENT_SCOPE) - return() - endif() - - file(READ ${library} _data OFFSET 0 LIMIT 1024) - if("${_data}" MATCHES "INPUT \\(([^(]+)\\)") - #extract out the .so name from REGEX MATCH command - set(_proper_so_name "${CMAKE_MATCH_1}") - - #construct path to the real .so which is presumed to be in the same directory - #as the input file - get_filename_component(_so_dir "${library}" DIRECTORY) - set(${real_library} "${_so_dir}/${_proper_so_name}" PARENT_SCOPE) - else() - #unable to determine what this library is so just hope everything works - #and pass it unmodified. - set(${real_library} "${library}" PARENT_SCOPE) - endif() -endfunction() - -#=============================================== -# Do the final processing for the package find. -#=============================================== -macro(findpkg_finish PREFIX TARGET_NAME) - if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY) - set(${PREFIX}_FOUND TRUE) - set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR}) - set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY}) - else () - if (${PREFIX}_FIND_REQUIRED AND NOT ${PREFIX}_FIND_QUIETLY) - message(FATAL_ERROR "Required library ${PREFIX} not found.") - endif () - endif () - - if (NOT TARGET "TBB::${TARGET_NAME}") - if (${PREFIX}_LIBRARY_RELEASE) - tbb_extract_real_library(${${PREFIX}_LIBRARY_RELEASE} real_release) - endif () - if (${PREFIX}_LIBRARY_DEBUG) - tbb_extract_real_library(${${PREFIX}_LIBRARY_DEBUG} real_debug) - endif () - add_library(TBB::${TARGET_NAME} UNKNOWN IMPORTED) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}_INCLUDE_DIR}") - if (${PREFIX}_LIBRARY_DEBUG AND ${PREFIX}_LIBRARY_RELEASE) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - IMPORTED_LOCATION "${real_release}" - IMPORTED_LOCATION_DEBUG "${real_debug}" - IMPORTED_LOCATION_RELEASE "${real_release}") - elseif (${PREFIX}_LIBRARY_RELEASE) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - IMPORTED_LOCATION "${real_release}") - elseif (${PREFIX}_LIBRARY_DEBUG) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - IMPORTED_LOCATION "${real_debug}") - endif () - endif () - - #mark the following variables as internal variables - mark_as_advanced(${PREFIX}_INCLUDE_DIR - ${PREFIX}_LIBRARY - ${PREFIX}_LIBRARY_DEBUG - ${PREFIX}_LIBRARY_RELEASE) -endmacro() - -#=============================================== -# Generate debug names from given release names -#=============================================== -macro(get_debug_names PREFIX) - foreach(i ${${PREFIX}}) - set(${PREFIX}_DEBUG ${${PREFIX}_DEBUG} ${i}d ${i}D ${i}_d ${i}_D ${i}_debug ${i}) - endforeach() -endmacro() - -#=============================================== -# See if we have env vars to help us find tbb -#=============================================== -macro(getenv_path VAR) - set(ENV_${VAR} $ENV{${VAR}}) - # replace won't work if var is blank - if (ENV_${VAR}) - string( REGEX REPLACE "\\\\" "/" ENV_${VAR} ${ENV_${VAR}} ) - endif () -endmacro() - -#=============================================== -# Couple a set of release AND debug libraries -#=============================================== -macro(make_library_set PREFIX) - if (${PREFIX}_RELEASE AND ${PREFIX}_DEBUG) - set(${PREFIX} optimized ${${PREFIX}_RELEASE} debug ${${PREFIX}_DEBUG}) - elseif (${PREFIX}_RELEASE) - set(${PREFIX} ${${PREFIX}_RELEASE}) - elseif (${PREFIX}_DEBUG) - set(${PREFIX} ${${PREFIX}_DEBUG}) - endif () -endmacro() - -#=============================================== -# Ensure that the release & debug libraries found are from the same installation. -#=============================================== -macro(find_tbb_library_verifying_release_debug_locations PREFIX) - find_library(${PREFIX}_RELEASE - NAMES ${${PREFIX}_NAMES} - HINTS ${TBB_LIB_SEARCH_PATH}) - if (${PREFIX}_RELEASE) - # To avoid finding a mismatched set of release & debug libraries from - # different installations if the first found does not have debug libraries - # by forcing the search for debug to only occur within the detected release - # library directory (if found). Although this would break detection if the - # release & debug libraries were shipped in different directories, this is - # not the case in the official TBB releases for any platform. - get_filename_component( - FOUND_RELEASE_LIB_DIR "${${PREFIX}_RELEASE}" DIRECTORY) - find_library(${PREFIX}_DEBUG - NAMES ${${PREFIX}_NAMES_DEBUG} - HINTS ${FOUND_RELEASE_LIB_DIR} - NO_DEFAULT_PATH) - else() - find_library(${PREFIX}_DEBUG - NAMES ${${PREFIX}_NAMES_DEBUG} - HINTS ${TBB_LIB_SEARCH_PATH}) - endif() -endmacro() - -#============================================================================= -# Now to actually find TBB -# - -# Get path, convert backslashes as ${ENV_${var}} -getenv_path(TBB_ROOT) - -# initialize search paths -set(TBB_PREFIX_PATH ${TBB_ROOT} ${ENV_TBB_ROOT}) -set(TBB_INC_SEARCH_PATH "") -set(TBB_LIB_SEARCH_PATH "") - - -# If user built from sources -set(TBB_BUILD_PREFIX $ENV{TBB_BUILD_PREFIX}) -if (TBB_BUILD_PREFIX AND ENV_TBB_ROOT) - getenv_path(TBB_BUILD_DIR) - if (NOT ENV_TBB_BUILD_DIR) - set(ENV_TBB_BUILD_DIR ${ENV_TBB_ROOT}/build) - endif () - - # include directory under ${ENV_TBB_ROOT}/include - list(APPEND TBB_LIB_SEARCH_PATH - ${ENV_TBB_BUILD_DIR}/${TBB_BUILD_PREFIX}_release - ${ENV_TBB_BUILD_DIR}/${TBB_BUILD_PREFIX}_debug) -endif () - - -# For Windows, let's assume that the user might be using the precompiled -# TBB packages from the main website. These use a rather awkward directory -# structure (at least for automatically finding the right files) depending -# on platform and compiler, but we'll do our best to accommodate it. -# Not adding the same effort for the precompiled linux builds, though. Those -# have different versions for CC compiler versions and linux kernels which -# will never adequately match the user's setup, so there is no feasible way -# to detect the "best" version to use. The user will have to manually -# select the right files. (Chances are the distributions are shipping their -# custom version of tbb, anyway, so the problem is probably nonexistent.) -if (WIN32 AND MSVC) - set(COMPILER_PREFIX "vc7.1") - if (MSVC_VERSION EQUAL 1400) - set(COMPILER_PREFIX "vc8") - elseif(MSVC_VERSION EQUAL 1500) - set(COMPILER_PREFIX "vc9") - elseif(MSVC_VERSION EQUAL 1600) - set(COMPILER_PREFIX "vc10") - elseif(MSVC_VERSION EQUAL 1700) - set(COMPILER_PREFIX "vc11") - elseif(MSVC_VERSION EQUAL 1800) - set(COMPILER_PREFIX "vc12") - elseif(MSVC_VERSION GREATER_EQUAL 1900) - set(COMPILER_PREFIX "vc14") - endif () - - # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path - foreach (dir IN LISTS TBB_PREFIX_PATH) - if (CMAKE_CL_64) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia64/${COMPILER_PREFIX}/lib) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia64/${COMPILER_PREFIX}) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${COMPILER_PREFIX}/lib) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${COMPILER_PREFIX}) - else () - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${COMPILER_PREFIX}/lib) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${COMPILER_PREFIX}) - endif () - endforeach () -endif () - -# For OS X binary distribution, choose libc++ based libraries for Mavericks (10.9) -# and above and AppleClang -if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND - NOT CMAKE_SYSTEM_VERSION VERSION_LESS 13.0) - set (USE_LIBCXX OFF) - cmake_policy(GET CMP0025 POLICY_VAR) - - if (POLICY_VAR STREQUAL "NEW") - if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") - set (USE_LIBCXX ON) - endif () - else () - if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set (USE_LIBCXX ON) - endif () - endif () - - if (USE_LIBCXX) - foreach (dir IN LISTS TBB_PREFIX_PATH) - list (APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/libc++ ${dir}/libc++/lib) - endforeach () - endif () -endif () - -# check compiler ABI -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(COMPILER_PREFIX) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) - list(APPEND COMPILER_PREFIX "gcc4.8") - endif() - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) - list(APPEND COMPILER_PREFIX "gcc4.7") - endif() - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - list(APPEND COMPILER_PREFIX "gcc4.4") - endif() - list(APPEND COMPILER_PREFIX "gcc4.1") -elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(COMPILER_PREFIX) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) # Complete guess - list(APPEND COMPILER_PREFIX "gcc4.8") - endif() - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6) - list(APPEND COMPILER_PREFIX "gcc4.7") - endif() - list(APPEND COMPILER_PREFIX "gcc4.4") -else() # Assume compatibility with 4.4 for other compilers - list(APPEND COMPILER_PREFIX "gcc4.4") -endif () - -# if platform architecture is explicitly specified -set(TBB_ARCH_PLATFORM $ENV{TBB_ARCH_PLATFORM}) -if (TBB_ARCH_PLATFORM) - foreach (dir IN LISTS TBB_PREFIX_PATH) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/${TBB_ARCH_PLATFORM}/lib) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/${TBB_ARCH_PLATFORM}) - endforeach () -endif () - -foreach (dir IN LISTS TBB_PREFIX_PATH) - foreach (prefix IN LISTS COMPILER_PREFIX) - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/intel64/${prefix}) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/lib) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/intel64/${prefix}/lib) - else () - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib/ia32/${prefix}) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/lib) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/ia32/${prefix}/lib) - endif () - endforeach() -endforeach () - -# add general search paths -foreach (dir IN LISTS TBB_PREFIX_PATH) - list(APPEND TBB_LIB_SEARCH_PATH ${dir}/lib ${dir}/Lib ${dir}/lib/tbb - ${dir}/Libs) - list(APPEND TBB_INC_SEARCH_PATH ${dir}/include ${dir}/Include - ${dir}/include/tbb) -endforeach () - -set(TBB_LIBRARY_NAMES tbb) -get_debug_names(TBB_LIBRARY_NAMES) - -find_path(TBB_INCLUDE_DIR - NAMES tbb/tbb.h - HINTS ${TBB_INC_SEARCH_PATH}) -find_tbb_library_verifying_release_debug_locations(TBB_LIBRARY) -make_library_set(TBB_LIBRARY) - -findpkg_finish(TBB tbb) - -#if we haven't found TBB no point on going any further -if (NOT TBB_FOUND) - return() -endif () - -#============================================================================= -# Look for TBB's malloc package -set(TBB_MALLOC_LIBRARY_NAMES tbbmalloc) -get_debug_names(TBB_MALLOC_LIBRARY_NAMES) - -find_path(TBB_MALLOC_INCLUDE_DIR - NAMES tbb/tbb.h - HINTS ${TBB_INC_SEARCH_PATH}) -find_tbb_library_verifying_release_debug_locations(TBB_MALLOC_LIBRARY) -make_library_set(TBB_MALLOC_LIBRARY) - -findpkg_finish(TBB_MALLOC tbbmalloc) - -#============================================================================= -# Look for TBB's malloc proxy package -set(TBB_MALLOC_PROXY_LIBRARY_NAMES tbbmalloc_proxy) -get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES) - -find_path(TBB_MALLOC_PROXY_INCLUDE_DIR - NAMES tbb/tbbmalloc_proxy.h - HINTS ${TBB_INC_SEARCH_PATH}) -find_tbb_library_verifying_release_debug_locations(TBB_MALLOC_PROXY_LIBRARY) -make_library_set(TBB_MALLOC_PROXY_LIBRARY) - -findpkg_finish(TBB_MALLOC_PROXY tbbmalloc_proxy) - - -#============================================================================= -#parse all the version numbers from tbb -if(NOT TBB_VERSION) - set(TBB_VERSION_FILE_PRIOR_TO_TBB_2021_1 - "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h") - set(TBB_VERSION_FILE_AFTER_TBB_2021_1 - "${TBB_INCLUDE_DIR}/oneapi/tbb/version.h") - - if (EXISTS "${TBB_VERSION_FILE_PRIOR_TO_TBB_2021_1}") - set(TBB_VERSION_FILE "${TBB_VERSION_FILE_PRIOR_TO_TBB_2021_1}") - elseif (EXISTS "${TBB_VERSION_FILE_AFTER_TBB_2021_1}") - set(TBB_VERSION_FILE "${TBB_VERSION_FILE_AFTER_TBB_2021_1}") - else() - message(FATAL_ERROR "Found TBB installation: ${TBB_INCLUDE_DIR} " - "missing version header.") - endif() - - #only read the start of the file - file(STRINGS - "${TBB_VERSION_FILE}" - TBB_VERSION_CONTENTS - REGEX "VERSION") - - string(REGEX REPLACE - ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" - TBB_VERSION_MAJOR "${TBB_VERSION_CONTENTS}") - - string(REGEX REPLACE - ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" - TBB_VERSION_MINOR "${TBB_VERSION_CONTENTS}") - - string(REGEX REPLACE - ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" - TBB_INTERFACE_VERSION "${TBB_VERSION_CONTENTS}") - - string(REGEX REPLACE - ".*#define TBB_COMPATIBLE_INTERFACE_VERSION ([0-9]+).*" "\\1" - TBB_COMPATIBLE_INTERFACE_VERSION "${TBB_VERSION_CONTENTS}") - -endif() - diff --git a/PrusaSlicer-2.3.3.tar.gz b/PrusaSlicer-2.3.3.tar.gz deleted file mode 100644 index a5d393b..0000000 --- a/PrusaSlicer-2.3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:deda209505f740ac3d6f59cb2a960f4df908269ee09bd30cd4edb9fc472d29ac -size 40659538 diff --git a/PrusaSlicer-2.4.0.tar.gz b/PrusaSlicer-2.4.0.tar.gz new file mode 100644 index 0000000..e015d5c --- /dev/null +++ b/PrusaSlicer-2.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:906d0acf0d0e064ae3cbaa16ba1a2e24dd9c32ceb2121464cb4d5951c09e66c2 +size 46397442 diff --git a/PrusaSlicer-catch2upd.patch b/PrusaSlicer-catch2upd.patch deleted file mode 100644 index 89f95ce..0000000 --- a/PrusaSlicer-catch2upd.patch +++ /dev/null @@ -1,652 +0,0 @@ -From 60768d32486cf05635cc355cbdea906aa60b17a8 Mon Sep 17 00:00:00 2001 -From: Vojtech Bubnik -Date: Thu, 8 Jul 2021 16:55:59 +0200 -Subject: [PATCH] Updated the Catch2 framework from v2.13.3 to v2.13.6. Fixes - Fix build error with non-const MINSIGSTKSZ. #6518 - ---- - tests/catch2/catch.hpp | 410 +++++++++++++++++++++++------------------ - 1 file changed, 235 insertions(+), 175 deletions(-) - -diff --git a/tests/catch2/catch.hpp b/tests/catch2/catch.hpp -index 282d1562c8..1bfc71c5d9 100644 ---- a/tests/catch2/catch.hpp -+++ b/tests/catch2/catch.hpp -@@ -1,9 +1,9 @@ - /* -- * Catch v2.13.3 -- * Generated: 2020-10-31 18:20:31.045274 -+ * Catch v2.13.6 -+ * Generated: 2021-04-16 18:23:38.044268 - * ---------------------------------------------------------- - * This file has been merged from multiple headers. Please don't edit it directly -- * Copyright (c) 2020 Two Blue Cubes Ltd. All rights reserved. -+ * Copyright (c) 2021 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -@@ -15,7 +15,7 @@ - - #define CATCH_VERSION_MAJOR 2 - #define CATCH_VERSION_MINOR 13 --#define CATCH_VERSION_PATCH 3 -+#define CATCH_VERSION_PATCH 6 - - #ifdef __clang__ - # pragma clang system_header -@@ -66,13 +66,16 @@ - #if !defined(CATCH_CONFIG_IMPL_ONLY) - // start catch_platform.h - -+// See e.g.: -+// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html - #ifdef __APPLE__ --# include --# if TARGET_OS_OSX == 1 --# define CATCH_PLATFORM_MAC --# elif TARGET_OS_IPHONE == 1 --# define CATCH_PLATFORM_IPHONE --# endif -+# include -+# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ -+ (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) -+# define CATCH_PLATFORM_MAC -+# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) -+# define CATCH_PLATFORM_IPHONE -+# endif - - #elif defined(linux) || defined(__linux) || defined(__linux__) - # define CATCH_PLATFORM_LINUX -@@ -132,9 +135,9 @@ namespace Catch { - - #endif - --// We have to avoid both ICC and Clang, because they try to mask themselves --// as gcc, and we want only GCC in this block --#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) -+// Only GCC compiler should be used in this block, so other compilers trying to -+// mask themselves as GCC should be ignored. -+#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) - # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) - # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) - -@@ -7054,8 +7057,8 @@ namespace Catch { - double b2 = bias - z1; - double a1 = a(b1); - double a2 = a(b2); -- auto lo = std::max(cumn(a1), 0); -- auto hi = std::min(cumn(a2), n - 1); -+ auto lo = (std::max)(cumn(a1), 0); -+ auto hi = (std::min)(cumn(a2), n - 1); - - return { point, resample[lo], resample[hi], confidence_level }; - } -@@ -7124,7 +7127,9 @@ namespace Catch { - } - template - EnvironmentEstimate> estimate_clock_cost(FloatDuration resolution) { -- auto time_limit = std::min(resolution * clock_cost_estimation_tick_limit, FloatDuration(clock_cost_estimation_time_limit)); -+ auto time_limit = (std::min)( -+ resolution * clock_cost_estimation_tick_limit, -+ FloatDuration(clock_cost_estimation_time_limit)); - auto time_clock = [](int k) { - return Detail::measure([k] { - for (int i = 0; i < k; ++i) { -@@ -7771,7 +7776,7 @@ namespace Catch { - double sb = stddev.point; - double mn = mean.point / n; - double mg_min = mn / 2.; -- double sg = std::min(mg_min / 4., sb / std::sqrt(n)); -+ double sg = (std::min)(mg_min / 4., sb / std::sqrt(n)); - double sg2 = sg * sg; - double sb2 = sb * sb; - -@@ -7790,7 +7795,7 @@ namespace Catch { - return (nc / n) * (sb2 - nc * sg2); - }; - -- return std::min(var_out(1), var_out(std::min(c_max(0.), c_max(mg_min)))) / sb2; -+ return (std::min)(var_out(1), var_out((std::min)(c_max(0.), c_max(mg_min)))) / sb2; - } - - bootstrap_analysis analyse_samples(double confidence_level, int n_resamples, std::vector::iterator first, std::vector::iterator last) { -@@ -7980,86 +7985,58 @@ namespace Catch { - - // start catch_fatal_condition.h - --// start catch_windows_h_proxy.h -- -- --#if defined(CATCH_PLATFORM_WINDOWS) -- --#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) --# define CATCH_DEFINED_NOMINMAX --# define NOMINMAX --#endif --#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) --# define CATCH_DEFINED_WIN32_LEAN_AND_MEAN --# define WIN32_LEAN_AND_MEAN --#endif -- --#ifdef __AFXDLL --#include --#else --#include --#endif -- --#ifdef CATCH_DEFINED_NOMINMAX --# undef NOMINMAX --#endif --#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN --# undef WIN32_LEAN_AND_MEAN --#endif -- --#endif // defined(CATCH_PLATFORM_WINDOWS) -- --// end catch_windows_h_proxy.h --#if defined( CATCH_CONFIG_WINDOWS_SEH ) -+#include - - namespace Catch { - -- struct FatalConditionHandler { -- -- static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo); -+ // Wrapper for platform-specific fatal error (signals/SEH) handlers -+ // -+ // Tries to be cooperative with other handlers, and not step over -+ // other handlers. This means that unknown structured exceptions -+ // are passed on, previous signal handlers are called, and so on. -+ // -+ // Can only be instantiated once, and assumes that once a signal -+ // is caught, the binary will end up terminating. Thus, there -+ class FatalConditionHandler { -+ bool m_started = false; -+ -+ // Install/disengage implementation for specific platform. -+ // Should be if-defed to work on current platform, can assume -+ // engage-disengage 1:1 pairing. -+ void engage_platform(); -+ void disengage_platform(); -+ public: -+ // Should also have platform-specific implementations as needed - FatalConditionHandler(); -- static void reset(); - ~FatalConditionHandler(); - -- private: -- static bool isSet; -- static ULONG guaranteeSize; -- static PVOID exceptionHandlerHandle; -- }; -- --} // namespace Catch -- --#elif defined ( CATCH_CONFIG_POSIX_SIGNALS ) -- --#include -- --namespace Catch { -- -- struct FatalConditionHandler { -- -- static bool isSet; -- static struct sigaction oldSigActions[]; -- static stack_t oldSigStack; -- static char altStackMem[]; -- -- static void handleSignal( int sig ); -+ void engage() { -+ assert(!m_started && "Handler cannot be installed twice."); -+ m_started = true; -+ engage_platform(); -+ } - -- FatalConditionHandler(); -- ~FatalConditionHandler(); -- static void reset(); -+ void disengage() { -+ assert(m_started && "Handler cannot be uninstalled without being installed first"); -+ m_started = false; -+ disengage_platform(); -+ } - }; - --} // namespace Catch -- --#else -- --namespace Catch { -- struct FatalConditionHandler { -- void reset(); -+ //! Simple RAII guard for (dis)engaging the FatalConditionHandler -+ class FatalConditionHandlerGuard { -+ FatalConditionHandler* m_handler; -+ public: -+ FatalConditionHandlerGuard(FatalConditionHandler* handler): -+ m_handler(handler) { -+ m_handler->engage(); -+ } -+ ~FatalConditionHandlerGuard() { -+ m_handler->disengage(); -+ } - }; --} - --#endif -+} // end namespace Catch - - // end catch_fatal_condition.h - #include -@@ -8185,6 +8162,7 @@ namespace Catch { - std::vector m_unfinishedSections; - std::vector m_activeSections; - TrackerContext m_trackerContext; -+ FatalConditionHandler m_fatalConditionhandler; - bool m_lastAssertionPassed = false; - bool m_shouldReportUnexpected = true; - bool m_includeSuccessfulResults; -@@ -10057,6 +10035,36 @@ namespace Catch { - } - - // end catch_errno_guard.h -+// start catch_windows_h_proxy.h -+ -+ -+#if defined(CATCH_PLATFORM_WINDOWS) -+ -+#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) -+# define CATCH_DEFINED_NOMINMAX -+# define NOMINMAX -+#endif -+#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) -+# define CATCH_DEFINED_WIN32_LEAN_AND_MEAN -+# define WIN32_LEAN_AND_MEAN -+#endif -+ -+#ifdef __AFXDLL -+#include -+#else -+#include -+#endif -+ -+#ifdef CATCH_DEFINED_NOMINMAX -+# undef NOMINMAX -+#endif -+#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN -+# undef WIN32_LEAN_AND_MEAN -+#endif -+ -+#endif // defined(CATCH_PLATFORM_WINDOWS) -+ -+// end catch_windows_h_proxy.h - #include - - namespace Catch { -@@ -10573,7 +10581,7 @@ namespace Catch { - // Extracts the actual name part of an enum instance - // In other words, it returns the Blue part of Bikeshed::Colour::Blue - StringRef extractInstanceName(StringRef enumInstance) { -- // Find last occurence of ":" -+ // Find last occurrence of ":" - size_t name_start = enumInstance.size(); - while (name_start > 0 && enumInstance[name_start - 1] != ':') { - --name_start; -@@ -10735,25 +10743,47 @@ namespace Catch { - // end catch_exception_translator_registry.cpp - // start catch_fatal_condition.cpp - --#if defined(__GNUC__) --# pragma GCC diagnostic push --# pragma GCC diagnostic ignored "-Wmissing-field-initializers" --#endif -+#include -+ -+#if !defined( CATCH_CONFIG_WINDOWS_SEH ) && !defined( CATCH_CONFIG_POSIX_SIGNALS ) -+ -+namespace Catch { -+ -+ // If neither SEH nor signal handling is required, the handler impls -+ // do not have to do anything, and can be empty. -+ void FatalConditionHandler::engage_platform() {} -+ void FatalConditionHandler::disengage_platform() {} -+ FatalConditionHandler::FatalConditionHandler() = default; -+ FatalConditionHandler::~FatalConditionHandler() = default; -+ -+} // end namespace Catch -+ -+#endif // !CATCH_CONFIG_WINDOWS_SEH && !CATCH_CONFIG_POSIX_SIGNALS -+ -+#if defined( CATCH_CONFIG_WINDOWS_SEH ) && defined( CATCH_CONFIG_POSIX_SIGNALS ) -+#error "Inconsistent configuration: Windows' SEH handling and POSIX signals cannot be enabled at the same time" -+#endif // CATCH_CONFIG_WINDOWS_SEH && CATCH_CONFIG_POSIX_SIGNALS - - #if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS ) - - namespace { -- // Report the error condition -+ //! Signals fatal error message to the run context - void reportFatal( char const * const message ) { - Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message ); - } --} - --#endif // signals/SEH handling -+ //! Minimal size Catch2 needs for its own fatal error handling. -+ //! Picked anecdotally, so it might not be sufficient on all -+ //! platforms, and for all configurations. -+ constexpr std::size_t minStackSizeForErrors = 32 * 1024; -+} // end unnamed namespace -+ -+#endif // CATCH_CONFIG_WINDOWS_SEH || CATCH_CONFIG_POSIX_SIGNALS - - #if defined( CATCH_CONFIG_WINDOWS_SEH ) - - namespace Catch { -+ - struct SignalDefs { DWORD id; const char* name; }; - - // There is no 1-1 mapping between signals and windows exceptions. -@@ -10766,7 +10796,7 @@ namespace Catch { - { static_cast(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error" }, - }; - -- LONG CALLBACK FatalConditionHandler::handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { -+ static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { - for (auto const& def : signalDefs) { - if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) { - reportFatal(def.name); -@@ -10777,38 +10807,50 @@ namespace Catch { - return EXCEPTION_CONTINUE_SEARCH; - } - -+ // Since we do not support multiple instantiations, we put these -+ // into global variables and rely on cleaning them up in outlined -+ // constructors/destructors -+ static PVOID exceptionHandlerHandle = nullptr; -+ -+ // For MSVC, we reserve part of the stack memory for handling -+ // memory overflow structured exception. - FatalConditionHandler::FatalConditionHandler() { -- isSet = true; -- // 32k seems enough for Catch to handle stack overflow, -- // but the value was found experimentally, so there is no strong guarantee -- guaranteeSize = 32 * 1024; -- exceptionHandlerHandle = nullptr; -+ ULONG guaranteeSize = static_cast(minStackSizeForErrors); -+ if (!SetThreadStackGuarantee(&guaranteeSize)) { -+ // We do not want to fully error out, because needing -+ // the stack reserve should be rare enough anyway. -+ Catch::cerr() -+ << "Failed to reserve piece of stack." -+ << " Stack overflows will not be reported successfully."; -+ } -+ } -+ -+ // We do not attempt to unset the stack guarantee, because -+ // Windows does not support lowering the stack size guarantee. -+ FatalConditionHandler::~FatalConditionHandler() = default; -+ -+ void FatalConditionHandler::engage_platform() { - // Register as first handler in current chain - exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); -- // Pass in guarantee size to be filled -- SetThreadStackGuarantee(&guaranteeSize); -+ if (!exceptionHandlerHandle) { -+ CATCH_RUNTIME_ERROR("Could not register vectored exception handler"); -+ } - } - -- void FatalConditionHandler::reset() { -- if (isSet) { -- RemoveVectoredExceptionHandler(exceptionHandlerHandle); -- SetThreadStackGuarantee(&guaranteeSize); -- exceptionHandlerHandle = nullptr; -- isSet = false; -+ void FatalConditionHandler::disengage_platform() { -+ if (!RemoveVectoredExceptionHandler(exceptionHandlerHandle)) { -+ CATCH_RUNTIME_ERROR("Could not unregister vectored exception handler"); - } -+ exceptionHandlerHandle = nullptr; - } - -- FatalConditionHandler::~FatalConditionHandler() { -- reset(); -- } -+} // end namespace Catch - --bool FatalConditionHandler::isSet = false; --ULONG FatalConditionHandler::guaranteeSize = 0; --PVOID FatalConditionHandler::exceptionHandlerHandle = nullptr; -+#endif // CATCH_CONFIG_WINDOWS_SEH - --} // namespace Catch -+#if defined( CATCH_CONFIG_POSIX_SIGNALS ) - --#elif defined( CATCH_CONFIG_POSIX_SIGNALS ) -+#include - - namespace Catch { - -@@ -10817,10 +10859,6 @@ namespace Catch { - const char* name; - }; - -- // 32kb for the alternate stack seems to be sufficient. However, this value -- // is experimentally determined, so that's not guaranteed. -- static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; -- - static SignalDefs signalDefs[] = { - { SIGINT, "SIGINT - Terminal interrupt signal" }, - { SIGILL, "SIGILL - Illegal instruction signal" }, -@@ -10830,7 +10868,32 @@ namespace Catch { - { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } - }; - -- void FatalConditionHandler::handleSignal( int sig ) { -+// Older GCCs trigger -Wmissing-field-initializers for T foo = {} -+// which is zero initialization, but not explicit. We want to avoid -+// that. -+#if defined(__GNUC__) -+# pragma GCC diagnostic push -+# pragma GCC diagnostic ignored "-Wmissing-field-initializers" -+#endif -+ -+ static char* altStackMem = nullptr; -+ static std::size_t altStackSize = 0; -+ static stack_t oldSigStack{}; -+ static struct sigaction oldSigActions[sizeof(signalDefs) / sizeof(SignalDefs)]{}; -+ -+ static void restorePreviousSignalHandlers() { -+ // We set signal handlers back to the previous ones. Hopefully -+ // nobody overwrote them in the meantime, and doesn't expect -+ // their signal handlers to live past ours given that they -+ // installed them after ours.. -+ for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { -+ sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); -+ } -+ // Return the old stack -+ sigaltstack(&oldSigStack, nullptr); -+ } -+ -+ static void handleSignal( int sig ) { - char const * name = ""; - for (auto const& def : signalDefs) { - if (sig == def.id) { -@@ -10838,16 +10901,33 @@ namespace Catch { - break; - } - } -- reset(); -- reportFatal(name); -+ // We need to restore previous signal handlers and let them do -+ // their thing, so that the users can have the debugger break -+ // when a signal is raised, and so on. -+ restorePreviousSignalHandlers(); -+ reportFatal( name ); - raise( sig ); - } - - FatalConditionHandler::FatalConditionHandler() { -- isSet = true; -+ assert(!altStackMem && "Cannot initialize POSIX signal handler when one already exists"); -+ if (altStackSize == 0) { -+ altStackSize = std::max(static_cast(SIGSTKSZ), minStackSizeForErrors); -+ } -+ altStackMem = new char[altStackSize](); -+ } -+ -+ FatalConditionHandler::~FatalConditionHandler() { -+ delete[] altStackMem; -+ // We signal that another instance can be constructed by zeroing -+ // out the pointer. -+ altStackMem = nullptr; -+ } -+ -+ void FatalConditionHandler::engage_platform() { - stack_t sigStack; - sigStack.ss_sp = altStackMem; -- sigStack.ss_size = sigStackSize; -+ sigStack.ss_size = altStackSize; - sigStack.ss_flags = 0; - sigaltstack(&sigStack, &oldSigStack); - struct sigaction sa = { }; -@@ -10859,40 +10939,17 @@ namespace Catch { - } - } - -- FatalConditionHandler::~FatalConditionHandler() { -- reset(); -- } -+#if defined(__GNUC__) -+# pragma GCC diagnostic pop -+#endif - -- void FatalConditionHandler::reset() { -- if( isSet ) { -- // Set signals back to previous values -- hopefully nobody overwrote them in the meantime -- for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { -- sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); -- } -- // Return the old stack -- sigaltstack(&oldSigStack, nullptr); -- isSet = false; -- } -+ void FatalConditionHandler::disengage_platform() { -+ restorePreviousSignalHandlers(); - } - -- bool FatalConditionHandler::isSet = false; -- struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; -- stack_t FatalConditionHandler::oldSigStack = {}; -- char FatalConditionHandler::altStackMem[sigStackSize] = {}; -- --} // namespace Catch -- --#else -- --namespace Catch { -- void FatalConditionHandler::reset() {} --} -- --#endif // signals/SEH handling -+} // end namespace Catch - --#if defined(__GNUC__) --# pragma GCC diagnostic pop --#endif -+#endif // CATCH_CONFIG_POSIX_SIGNALS - // end catch_fatal_condition.cpp - // start catch_generators.cpp - -@@ -11447,7 +11504,8 @@ namespace { - return lhs == rhs; - } - -- auto ulpDiff = std::abs(lc - rc); -+ // static cast as a workaround for IBM XLC -+ auto ulpDiff = std::abs(static_cast(lc - rc)); - return static_cast(ulpDiff) <= maxUlpDiff; - } - -@@ -11621,7 +11679,6 @@ Floating::WithinRelMatcher WithinRel(float target) { - - } // namespace Matchers - } // namespace Catch -- - // end catch_matchers_floating.cpp - // start catch_matchers_generic.cpp - -@@ -12955,9 +13012,8 @@ namespace Catch { - } - - void RunContext::invokeActiveTestCase() { -- FatalConditionHandler fatalConditionHandler; // Handle signals -+ FatalConditionHandlerGuard _(&m_fatalConditionhandler); - m_activeTestCase->invoke(); -- fatalConditionHandler.reset(); - } - - void RunContext::handleUnfinishedSections() { -@@ -14126,24 +14182,28 @@ namespace Catch { - - namespace { - struct TestHasher { -- explicit TestHasher(Catch::SimplePcg32& rng_instance) { -- basis = rng_instance(); -- basis <<= 32; -- basis |= rng_instance(); -- } -+ using hash_t = uint64_t; - -- uint64_t basis; -+ explicit TestHasher( hash_t hashSuffix ): -+ m_hashSuffix{ hashSuffix } {} - -- uint64_t operator()(TestCase const& t) const { -- // Modified FNV-1a hash -- static constexpr uint64_t prime = 1099511628211; -- uint64_t hash = basis; -- for (const char c : t.name) { -+ uint32_t operator()( TestCase const& t ) const { -+ // FNV-1a hash with multiplication fold. -+ const hash_t prime = 1099511628211u; -+ hash_t hash = 14695981039346656037u; -+ for ( const char c : t.name ) { - hash ^= c; - hash *= prime; - } -- return hash; -+ hash ^= m_hashSuffix; -+ hash *= prime; -+ const uint32_t low{ static_cast( hash ) }; -+ const uint32_t high{ static_cast( hash >> 32 ) }; -+ return low * high; - } -+ -+ private: -+ hash_t m_hashSuffix; - }; - } // end unnamed namespace - -@@ -14161,9 +14221,9 @@ namespace Catch { - - case RunTests::InRandomOrder: { - seedRng( config ); -- TestHasher h( rng() ); -+ TestHasher h{ config.rngSeed() }; - -- using hashedTest = std::pair; -+ using hashedTest = std::pair; - std::vector indexed_tests; - indexed_tests.reserve( unsortedTestCases.size() ); - -@@ -15316,7 +15376,7 @@ namespace Catch { - } - - Version const& libraryVersion() { -- static Version version( 2, 13, 3, "", 0 ); -+ static Version version( 2, 13, 6, "", 0 ); - return version; - } - diff --git a/PrusaSlicer-issue6681-openvdb.patch b/PrusaSlicer-issue6681-openvdb.patch deleted file mode 100644 index 7176adb..0000000 --- a/PrusaSlicer-issue6681-openvdb.patch +++ /dev/null @@ -1,77 +0,0 @@ -From e6507594fb6893156056c2123822a2b37f7f179d Mon Sep 17 00:00:00 2001 -From: tamasmeszaros -Date: Wed, 14 Jul 2021 16:26:44 +0200 -Subject: [PATCH] Search for a better openvdb find module if available - -Solves #6681, alternative path for openvdb installation can be specified via cache variable ---- - CMakeLists.txt | 12 +++++++++--- - cmake/modules/FindOpenVDB.cmake | 21 +++++++++++++++++++++ - 2 files changed, 30 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b6fe88e48f..b8b9add60f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -33,6 +33,8 @@ option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 1) - option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0) - option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0) - -+set(OPENVDB_FIND_MODULE_PATH "" CACHE PATH "Path to OpenVDB installation's find modules.") -+ - set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux") - - set(IS_CROSS_COMPILE FALSE) -@@ -492,13 +494,17 @@ find_package(NLopt 1.4 REQUIRED) - if(SLIC3R_STATIC) - set(OPENVDB_USE_STATIC_LIBS ON) - set(USE_BLOSC TRUE) --endif() -+endif () - --find_package(OpenVDB 5.0 REQUIRED COMPONENTS openvdb) -+find_package(OpenVDB 5.0 COMPONENTS openvdb) - if(OpenVDB_FOUND) - slic3r_remap_configs(IlmBase::Half RelWithDebInfo Release) - slic3r_remap_configs(Blosc::blosc RelWithDebInfo Release) --endif() -+else () -+ message(FATAL_ERROR "OpenVDB could not be found with the bundled find module. " -+ "You can try to specify the find module location of your " -+ "OpenVDB installation with the OPENVDB_FIND_MODULE_PATH cache variable.") -+endif () - - set(TOP_LEVEL_PROJECT_DIR ${PROJECT_SOURCE_DIR}) - function(prusaslicer_copy_dlls target) -diff --git a/cmake/modules/FindOpenVDB.cmake b/cmake/modules/FindOpenVDB.cmake -index 02420fed8e..3b60ac9d36 100644 ---- a/cmake/modules/FindOpenVDB.cmake -+++ b/cmake/modules/FindOpenVDB.cmake -@@ -102,6 +102,27 @@ may be provided to tell this module where to look. - - #]=======================================================================] - -+# If an explicit openvdb module path was specified, that will be used -+if (OPENVDB_FIND_MODULE_PATH) -+ set(_module_path_bak ${CMAKE_MODULE_PATH}) -+ set(CMAKE_MODULE_PATH ${OPENVDB_FIND_MODULE_PATH}) -+ find_package( -+ OpenVDB ${OpenVDB_FIND_VERSION} QUIET -+ COMPONENTS -+ ${OpenVDB_FIND_COMPONENTS} -+ ) -+ -+ set(CMAKE_MODULE_PATH ${_module_path_bak}) -+ if (OpenVDB_FOUND) -+ return() -+ endif () -+ -+ if (NOT OpenVDB_FIND_QUIETLY) -+ message(STATUS "Using bundled find module for OpenVDB") -+ endif () -+endif () -+# ########################################################################### -+ - cmake_minimum_required(VERSION 3.3) - # Monitoring _ROOT variables - if(POLICY CMP0074) diff --git a/PrusaSlicer-pr6590-updateTBB.patch b/PrusaSlicer-pr6590-updateTBB.patch deleted file mode 100644 index f4f0b43..0000000 --- a/PrusaSlicer-pr6590-updateTBB.patch +++ /dev/null @@ -1,803 +0,0 @@ -From 62161e9201293a0ba766c6cfa84202330460764a Mon Sep 17 00:00:00 2001 -From: Roman Beranek -Date: Thu, 3 Jun 2021 22:04:34 +0200 -Subject: [PATCH] drop deprecated TBB components - -Quite some time ago, many of the TBB components were deprecated in favor -of their near-equivalents in the STL or, in the case of task_scheduler_init, -were broken up and reconstituted under a less ad-hoc logic. Every time a header -file marked deprecated gets included, a rather loud warning is emitted, which -leads to a complete TBB's domination over the stderr stream during build time, -making it harder to notice _legitimate_ warnings. - -Instead of merely muting the output with TBB_SUPPRESS_DEPRECATED_MESSAGES, -perform a genuine migration away from the deprecated components with the added -benefit of achieving a source compatibility with oneTBB, the successor to TBB -which has dropped the deprecated API for good. - -What got replaced for what? - -| Deprecated | Replacement | -| ------------------------------------- | --------------------------------------------- | -| `tbb::atomic` | `std::atomic` | -| `tbb::mutex` | `std::mutex` | -| `tbb::mutex::scoped_lock` | `std::scoped_lock` | -| `tbb::mutex::scoped_lock` (empty) | `std::unique_lock` (deferred) | -| `tbb::task_scheduler_init` | `tbb::global_control` | -| `tbb::this_thread` | `std::this_thread` | - -Signed-off-by: Roman Beranek ---- - src/libslic3r/Execution/ExecutionTBB.hpp | 5 +-- - src/libslic3r/Print.cpp | 4 +-- - src/libslic3r/PrintApply.cpp | 2 +- - src/libslic3r/PrintBase.cpp | 2 +- - src/libslic3r/PrintBase.hpp | 40 ++++++++++----------- - src/libslic3r/PrintObject.cpp | 1 - - src/libslic3r/SLA/SupportTree.cpp | 3 -- - src/libslic3r/SLAPrint.cpp | 10 +++--- - src/libslic3r/SupportMaterial.cpp | 1 - - src/libslic3r/Thread.cpp | 12 +++---- - src/libslic3r/pchheader.hpp | 3 -- - src/libslic3r/utils.cpp | 6 ++-- - src/slic3r/GUI/BackgroundSlicingProcess.cpp | 6 ++-- - src/slic3r/GUI/InstanceCheck.hpp | 2 +- - src/slic3r/GUI/Mouse3DController.cpp | 38 ++++++++++---------- - src/slic3r/GUI/Mouse3DController.hpp | 10 +++--- - src/slic3r/GUI/RemovableDriveManager.cpp | 24 ++++++------- - src/slic3r/GUI/RemovableDriveManager.hpp | 6 ++-- - 18 files changed, 80 insertions(+), 95 deletions(-) - -Index: PrusaSlicer-version_2.3.3/src/libslic3r/Print.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/Print.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/Print.cpp -@@ -36,7 +36,7 @@ template class PrintStatestate_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - // The following call should stop background processing if it is running. - this->invalidate_all_steps(); - for (PrintObject *object : m_objects) -@@ -262,7 +262,7 @@ bool Print::is_step_done(PrintObjectStep - { - if (m_objects.empty()) - return false; -- tbb::mutex::scoped_lock lock(this->state_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - for (const PrintObject *object : m_objects) - if (! object->is_step_done_unguarded(step)) - return false; -@@ -617,7 +617,7 @@ Print::ApplyStatus Print::apply(const Mo - update_apply_status(false); - - // Grab the lock for the Print / PrintObject milestones. -- tbb::mutex::scoped_lock lock(this->state_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - - // The following call may stop the background processing. - if (! print_diff.empty()) -Index: PrusaSlicer-version_2.3.3/src/libslic3r/PrintBase.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/PrintBase.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/PrintBase.cpp -@@ -97,7 +97,7 @@ void PrintBase::status_update_warnings(O - printf("%s warning: %s\n", (object_id == this->id()) ? "print" : "print object", message.c_str()); - } - --tbb::mutex& PrintObjectBase::state_mutex(PrintBase *print) -+std::mutex& PrintObjectBase::state_mutex(PrintBase *print) - { - return print->state_mutex(); - } -Index: PrusaSlicer-version_2.3.3/src/libslic3r/PrintBase.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/PrintBase.hpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/PrintBase.hpp -@@ -6,12 +6,8 @@ - #include - #include - #include -- --// tbb/mutex.h includes Windows, which in turn defines min/max macros. Convince Windows.h to not define these min/max macros. --#ifndef NOMINMAX -- #define NOMINMAX --#endif --#include "tbb/mutex.h" -+#include -+#include - - #include "ObjectID.hpp" - #include "Model.hpp" -@@ -84,23 +80,23 @@ class PrintState : public PrintStateBase - public: - PrintState() {} - -- StateWithTimeStamp state_with_timestamp(StepType step, tbb::mutex &mtx) const { -- tbb::mutex::scoped_lock lock(mtx); -+ StateWithTimeStamp state_with_timestamp(StepType step, std::mutex &mtx) const { -+ std::scoped_lock lock(mtx); - StateWithTimeStamp state = m_state[step]; - return state; - } - -- StateWithWarnings state_with_warnings(StepType step, tbb::mutex &mtx) const { -- tbb::mutex::scoped_lock lock(mtx); -+ StateWithWarnings state_with_warnings(StepType step, std::mutex &mtx) const { -+ std::scoped_lock lock(mtx); - StateWithWarnings state = m_state[step]; - return state; - } - -- bool is_started(StepType step, tbb::mutex &mtx) const { -+ bool is_started(StepType step, std::mutex &mtx) const { - return this->state_with_timestamp(step, mtx).state == STARTED; - } - -- bool is_done(StepType step, tbb::mutex &mtx) const { -+ bool is_done(StepType step, std::mutex &mtx) const { - return this->state_with_timestamp(step, mtx).state == DONE; - } - -@@ -121,8 +117,8 @@ public: - // This is necessary to block until the Print::apply() updates its state, which may - // influence the processing step being entered. - template -- bool set_started(StepType step, tbb::mutex &mtx, ThrowIfCanceled throw_if_canceled) { -- tbb::mutex::scoped_lock lock(mtx); -+ bool set_started(StepType step, std::mutex &mtx, ThrowIfCanceled throw_if_canceled) { -+ std::scoped_lock lock(mtx); - // If canceled, throw before changing the step state. - throw_if_canceled(); - #ifndef NDEBUG -@@ -154,8 +150,8 @@ public: - // Timestamp when this stepentered the DONE state. - // bool indicates whether the UI has to update the slicing warnings of this step or not. - template -- std::pair set_done(StepType step, tbb::mutex &mtx, ThrowIfCanceled throw_if_canceled) { -- tbb::mutex::scoped_lock lock(mtx); -+ std::pair set_done(StepType step, std::mutex &mtx, ThrowIfCanceled throw_if_canceled) { -+ std::scoped_lock lock(mtx); - // If canceled, throw before changing the step state. - throw_if_canceled(); - assert(m_state[step].state == STARTED); -@@ -266,9 +262,9 @@ public: - // Return value: - // Current milestone (StepType). - // bool indicates whether the UI has to be updated or not. -- std::pair active_step_add_warning(PrintStateBase::WarningLevel warning_level, const std::string &message, int message_id, tbb::mutex &mtx) -+ std::pair active_step_add_warning(PrintStateBase::WarningLevel warning_level, const std::string &message, int message_id, std::mutex &mtx) - { -- tbb::mutex::scoped_lock lock(mtx); -+ std::scoped_lock lock(mtx); - assert(m_step_active != -1); - StateWithWarnings &state = m_state[m_step_active]; - assert(state.state == STARTED); -@@ -314,7 +310,7 @@ protected: - PrintObjectBase(ModelObject *model_object) : m_model_object(model_object) {} - virtual ~PrintObjectBase() {} - // Declared here to allow access from PrintBase through friendship. -- static tbb::mutex& state_mutex(PrintBase *print); -+ static std::mutex& state_mutex(PrintBase *print); - static std::function cancel_callback(PrintBase *print); - // Notify UI about a new warning of a milestone "step" on this PrintObjectBase. - // The UI will be notified by calling a status callback registered on print. -@@ -461,7 +457,7 @@ protected: - friend class PrintObjectBase; - friend class BackgroundSlicingProcess; - -- tbb::mutex& state_mutex() const { return m_state_mutex; } -+ std::mutex& state_mutex() const { return m_state_mutex; } - std::function cancel_callback() { return m_cancel_callback; } - void call_cancel_callback() { m_cancel_callback(); } - // Notify UI about a new warning of a milestone "step" on this PrintBase. -@@ -486,7 +482,7 @@ protected: - status_callback_type m_status_callback; - - private: -- tbb::atomic m_cancel_status; -+ std::atomic m_cancel_status; - - // Callback to be evoked to stop the background processing before a state is updated. - cancel_callback_type m_cancel_callback = [](){}; -@@ -494,7 +490,7 @@ private: - // Mutex used for synchronization of the worker thread with the UI thread: - // The mutex will be used to guard the worker thread against entering a stage - // while the data influencing the stage is modified. -- mutable tbb::mutex m_state_mutex; -+ mutable std::mutex m_state_mutex; - }; - - template -Index: PrusaSlicer-version_2.3.3/src/libslic3r/PrintObject.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/PrintObject.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/PrintObject.cpp -@@ -19,7 +19,6 @@ - #include - - #include --#include - - #include - -Index: PrusaSlicer-version_2.3.3/src/libslic3r/SLA/SupportTree.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/SLA/SupportTree.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/SLA/SupportTree.cpp -@@ -16,9 +16,6 @@ - #include - #include - #include --#include --#include --#include - #include - - //! macro used to mark string used at localization, -Index: PrusaSlicer-version_2.3.3/src/libslic3r/SLAPrint.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/SLAPrint.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/SLAPrint.cpp -@@ -19,8 +19,6 @@ - #include - #endif - --//#include //#include "tbb/mutex.h" -- - #include "I18N.hpp" - - //! macro used to mark string used at localization, -@@ -118,7 +116,7 @@ bool validate_pad(const TriangleMesh &pa - - void SLAPrint::clear() - { -- tbb::mutex::scoped_lock lock(this->state_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - // The following call should stop background processing if it is running. - this->invalidate_all_steps(); - for (SLAPrintObject *object : m_objects) -@@ -212,7 +210,7 @@ SLAPrint::ApplyStatus SLAPrint::apply(co - update_apply_status(false); - - // Grab the lock for the Print / PrintObject milestones. -- tbb::mutex::scoped_lock lock(this->state_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - - // The following call may stop the background processing. - bool invalidate_all_model_objects = false; -@@ -514,7 +512,7 @@ SLAPrint::ApplyStatus SLAPrint::apply(co - void SLAPrint::set_task(const TaskParams ¶ms) - { - // Grab the lock for the Print / PrintObject milestones. -- tbb::mutex::scoped_lock lock(this->state_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - - int n_object_steps = int(params.to_object_step) + 1; - if (n_object_steps == 0) -@@ -884,7 +882,7 @@ bool SLAPrint::is_step_done(SLAPrintObje - { - if (m_objects.empty()) - return false; -- tbb::mutex::scoped_lock lock(this->state_mutex()); -+ std::scoped_lock lock(this->state_mutex()); - for (const SLAPrintObject *object : m_objects) - if (! object->is_step_done_unguarded(step)) - return false; -Index: PrusaSlicer-version_2.3.3/src/libslic3r/SupportMaterial.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/SupportMaterial.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/SupportMaterial.cpp -@@ -12,7 +12,6 @@ - #include - - #include --#include - #include - #include - -Index: PrusaSlicer-version_2.3.3/src/libslic3r/Thread.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/Thread.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/Thread.cpp -@@ -9,10 +9,10 @@ - #include - #include - #include -+#include -+#include - #include --#include - #include --#include - - #include "Thread.hpp" - -@@ -206,13 +206,13 @@ void name_tbb_thread_pool_threads() - nthreads = 1; - #endif - -- if (nthreads != nthreads_hw) -- new tbb::task_scheduler_init(int(nthreads)); -+ if (nthreads != nthreads_hw) -+ tbb::global_control(tbb::global_control::max_allowed_parallelism, nthreads); - - std::atomic nthreads_running(0); - std::condition_variable cv; - std::mutex cv_m; -- auto master_thread_id = tbb::this_tbb_thread::get_id(); -+ auto master_thread_id = std::this_thread::get_id(); - tbb::parallel_for( - tbb::blocked_range(0, nthreads, 1), - [&nthreads_running, nthreads, &master_thread_id, &cv, &cv_m](const tbb::blocked_range &range) { -@@ -226,7 +226,7 @@ void name_tbb_thread_pool_threads() - std::unique_lock lk(cv_m); - cv.wait(lk, [&nthreads_running, nthreads]{return nthreads_running == nthreads;}); - } -- auto thread_id = tbb::this_tbb_thread::get_id(); -+ auto thread_id = std::this_thread::get_id(); - if (thread_id == master_thread_id) { - // The calling thread runs the 0'th task. - assert(range.begin() == 0); -Index: PrusaSlicer-version_2.3.3/src/libslic3r/pchheader.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/pchheader.hpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/pchheader.hpp -@@ -93,12 +93,9 @@ - #include - #include - --#include - #include - #include --#include - #include --#include - - #include - #include -Index: PrusaSlicer-version_2.3.3/src/libslic3r/utils.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/utils.cpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/utils.cpp -@@ -43,7 +43,7 @@ - #include - #include - --#include -+#include - - #if defined(__linux__) || defined(__GNUC__ ) - #include -@@ -118,9 +118,7 @@ void trace(unsigned int level, const cha - void disable_multi_threading() - { - // Disable parallelization so the Shiny profiler works -- static tbb::task_scheduler_init *tbb_init = nullptr; -- if (tbb_init == nullptr) -- tbb_init = new tbb::task_scheduler_init(1); -+ tbb::global_control(tbb::global_control::max_allowed_parallelism, 1); - } - - static std::string g_var_dir; -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/BackgroundSlicingProcess.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/BackgroundSlicingProcess.cpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/BackgroundSlicingProcess.cpp -@@ -465,7 +465,7 @@ void BackgroundSlicingProcess::schedule_ - return; - - // Guard against entering the export step before changing the export path. -- tbb::mutex::scoped_lock lock(m_print->state_mutex()); -+ std::scoped_lock lock(m_print->state_mutex()); - this->invalidate_step(bspsGCodeFinalize); - m_export_path = path; - m_export_path_on_removable_media = export_path_on_removable_media; -@@ -478,7 +478,7 @@ void BackgroundSlicingProcess::schedule_ - return; - - // Guard against entering the export step before changing the export path. -- tbb::mutex::scoped_lock lock(m_print->state_mutex()); -+ std::scoped_lock lock(m_print->state_mutex()); - this->invalidate_step(bspsGCodeFinalize); - m_export_path.clear(); - m_upload_job = std::move(upload_job); -@@ -491,7 +491,7 @@ void BackgroundSlicingProcess::reset_exp - m_export_path.clear(); - m_export_path_on_removable_media = false; - // invalidate_step expects the mutex to be locked. -- tbb::mutex::scoped_lock lock(m_print->state_mutex()); -+ std::scoped_lock lock(m_print->state_mutex()); - this->invalidate_step(bspsGCodeFinalize); - } - } -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/InstanceCheck.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/InstanceCheck.hpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/InstanceCheck.hpp -@@ -13,7 +13,7 @@ - - #if __linux__ - #include --#include -+#include - #include - #endif // __linux__ - -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/Mouse3DController.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/Mouse3DController.cpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/Mouse3DController.cpp -@@ -66,7 +66,7 @@ void update_maximum(std::atomic& maxi - - void Mouse3DController::State::append_translation(const Vec3d& translation, size_t input_queue_max_size) - { -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -+ std::scoped_lock lock(m_input_queue_mutex); - while (m_input_queue.size() >= input_queue_max_size) - m_input_queue.pop_front(); - m_input_queue.emplace_back(QueueItem::translation(translation)); -@@ -77,7 +77,7 @@ void Mouse3DController::State::append_tr - - void Mouse3DController::State::append_rotation(const Vec3f& rotation, size_t input_queue_max_size) - { -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -+ std::scoped_lock lock(m_input_queue_mutex); - while (m_input_queue.size() >= input_queue_max_size) - m_input_queue.pop_front(); - m_input_queue.emplace_back(QueueItem::rotation(rotation.cast())); -@@ -92,7 +92,7 @@ void Mouse3DController::State::append_ro - - void Mouse3DController::State::append_button(unsigned int id, size_t /* input_queue_max_size */) - { -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -+ std::scoped_lock lock(m_input_queue_mutex); - m_input_queue.emplace_back(QueueItem::buttons(id)); - #if ENABLE_3DCONNEXION_DEVICES_DEBUG_OUTPUT - update_maximum(input_queue_max_size_achieved, m_input_queue.size()); -@@ -277,7 +277,7 @@ void Mouse3DController::device_attached( - #if ENABLE_CTRL_M_ON_WINDOWS - m_device_str = format_device_string(vid, pid); - if (auto it_params = m_params_by_device.find(m_device_str); it_params != m_params_by_device.end()) { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - m_params = m_params_ui = it_params->second; - } - else -@@ -295,7 +295,7 @@ void Mouse3DController::device_detached( - int pid = 0; - if (sscanf(device.c_str(), "\\\\?\\HID#VID_%x&PID_%x&", &vid, &pid) == 2) { - if (std::find(_3DCONNEXION_VENDORS.begin(), _3DCONNEXION_VENDORS.end(), vid) != _3DCONNEXION_VENDORS.end()) { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - m_params_by_device[format_device_string(vid, pid)] = m_params_ui; - } - } -@@ -307,12 +307,12 @@ void Mouse3DController::device_detached( - // Filter out mouse scroll events produced by the 3DConnexion driver. - bool Mouse3DController::State::process_mouse_wheel() - { -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -- if (m_mouse_wheel_counter == 0) -- // No 3DConnexion rotation has been captured since the last mouse scroll event. -+ std::scoped_lock lock(m_input_queue_mutex); -+ if (m_mouse_wheel_counter == 0) -+ // No 3DConnexion rotation has been captured since the last mouse scroll event. - return false; - if (std::find_if(m_input_queue.begin(), m_input_queue.end(), [](const QueueItem &item){ return item.is_rotation(); }) != m_input_queue.end()) { -- // There is a rotation stored in the queue. Suppress one mouse scroll event. -+ // There is a rotation stored in the queue. Suppress one mouse scroll event. - -- m_mouse_wheel_counter; - return true; - } -@@ -329,7 +329,7 @@ bool Mouse3DController::State::apply(con - std::deque input_queue; - { - // Atomically move m_input_queue to input_queue. -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -+ std::scoped_lock lock(m_input_queue_mutex); - input_queue = std::move(m_input_queue); - m_input_queue.clear(); - } -@@ -418,7 +418,7 @@ bool Mouse3DController::apply(Camera& ca - #if ENABLE_CTRL_M_ON_WINDOWS - #ifdef _WIN32 - { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - if (m_params_ui_changed) { - m_params = m_params_ui; - m_params_ui_changed = false; -@@ -447,7 +447,7 @@ void Mouse3DController::render_settings_ - Params params_copy; - bool params_changed = false; - { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - params_copy = m_params_ui; - } - -@@ -565,7 +565,7 @@ void Mouse3DController::render_settings_ - - if (params_changed) { - // Synchronize front end parameters to back end. -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - auto pthis = const_cast(this); - #if ENABLE_3DCONNEXION_DEVICES_DEBUG_OUTPUT - if (params_copy.input_queue_max_size != params_copy.input_queue_max_size) -@@ -586,7 +586,7 @@ void Mouse3DController::connected(std::s - m_device_str = device_name; - // Copy the parameters for m_device_str into the current parameters. - if (auto it_params = m_params_by_device.find(m_device_str); it_params != m_params_by_device.end()) { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - m_params = m_params_ui = it_params->second; - } - m_connected = true; -@@ -597,7 +597,7 @@ void Mouse3DController::disconnected() - // Copy the current parameters for m_device_str into the parameter database. - assert(m_connected == ! m_device_str.empty()); - if (m_connected) { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - m_params_by_device[m_device_str] = m_params_ui; - m_device_str.clear(); - m_connected = false; -@@ -621,7 +621,7 @@ bool Mouse3DController::handle_input(con - { - // Synchronize parameters between the UI thread and the background thread. - //FIXME is this necessary on OSX? Are these notifications triggered from the main thread or from a worker thread? -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - if (m_params_ui_changed) { - m_params = m_params_ui; - m_params_ui_changed = false; -@@ -733,7 +733,7 @@ void Mouse3DController::run() - - for (;;) { - { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - if (m_stop) - break; - if (m_params_ui_changed) { -@@ -998,7 +998,7 @@ bool Mouse3DController::connect_device() - #endif // ENABLE_3DCONNEXION_DEVICES_DEBUG_OUTPUT - // Copy the parameters for m_device_str into the current parameters. - if (auto it_params = m_params_by_device.find(m_device_str); it_params != m_params_by_device.end()) { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - m_params = m_params_ui = it_params->second; - } - } -@@ -1023,7 +1023,7 @@ void Mouse3DController::disconnect_devic - BOOST_LOG_TRIVIAL(info) << "Disconnected device: " << m_device_str; - // Copy the current parameters for m_device_str into the parameter database. - { -- tbb::mutex::scoped_lock lock(m_params_ui_mutex); -+ std::scoped_lock lock(m_params_ui_mutex); - m_params_by_device[m_device_str] = m_params_ui; - } - m_device_str.clear(); -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/Mouse3DController.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/Mouse3DController.hpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/Mouse3DController.hpp -@@ -10,12 +10,12 @@ - - #include - #include -+#include - #include - #include - #include - #include - --#include - - namespace Slic3r { - -@@ -85,7 +85,7 @@ class Mouse3DController - // m_input_queue is accessed by the background thread and by the UI thread. Access to m_input_queue - // is guarded with m_input_queue_mutex. - std::deque m_input_queue; -- mutable tbb::mutex m_input_queue_mutex; -+ mutable std::mutex m_input_queue_mutex; - - #ifdef WIN32 - // When the 3Dconnexion driver is running the system gets, by default, mouse wheel events when rotations around the X axis are detected. -@@ -112,12 +112,12 @@ class Mouse3DController - - #if ENABLE_3DCONNEXION_DEVICES_DEBUG_OUTPUT - Vec3d get_first_vector_of_type(unsigned int type) const { -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -+ std::scoped_lock lock(m_input_queue_mutex); - auto it = std::find_if(m_input_queue.begin(), m_input_queue.end(), [type](const QueueItem& item) { return item.type_or_buttons == type; }); - return (it == m_input_queue.end()) ? Vec3d::Zero() : it->vector; - } - size_t input_queue_size_current() const { -- tbb::mutex::scoped_lock lock(m_input_queue_mutex); -+ std::scoped_lock lock(m_input_queue_mutex); - return m_input_queue.size(); - } - std::atomic input_queue_max_size_achieved; -@@ -133,7 +133,7 @@ class Mouse3DController - // UI thread will read / write this copy. - Params m_params_ui; - bool m_params_ui_changed { false }; -- mutable tbb::mutex m_params_ui_mutex; -+ mutable std::mutex m_params_ui_mutex; - - // This is a database of parametes of all 3DConnexion devices ever connected. - // This database is loaded from AppConfig on application start and it is stored to AppConfig on application exit. -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/RemovableDriveManager.cpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/RemovableDriveManager.cpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/RemovableDriveManager.cpp -@@ -84,7 +84,7 @@ void RemovableDriveManager::eject_drive( - this->update(); - #endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS - BOOST_LOG_TRIVIAL(info) << "Ejecting started"; -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - auto it_drive_data = this->find_last_save_path_drive_data(); - if (it_drive_data != m_current_drives.end()) { - // get handle to device -@@ -130,7 +130,7 @@ std::string RemovableDriveManager::get_r - this->update(); - #endif // REMOVABLE_DRIVE_MANAGER_OS_CALLBACKS - -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - if (m_current_drives.empty()) - return std::string(); - std::size_t found = path.find_last_of("\\"); -@@ -146,7 +146,7 @@ std::string RemovableDriveManager::get_r - - std::string RemovableDriveManager::get_removable_drive_from_path(const std::string& path) - { -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - std::size_t found = path.find_last_of("\\"); - std::string new_path = path.substr(0, found); - int letter = PathGetDriveNumberW(boost::nowide::widen(new_path).c_str()); -@@ -285,7 +285,7 @@ void RemovableDriveManager::eject_drive( - - DriveData drive_data; - { -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - auto it_drive_data = this->find_last_save_path_drive_data(); - if (it_drive_data == m_current_drives.end()) - return; -@@ -341,7 +341,7 @@ void RemovableDriveManager::eject_drive( - if (success) { - // Remove the drive_data from m_current drives, searching by value, not by pointer, as m_current_drives may get modified during - // asynchronous execution on m_eject_thread. -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - auto it = std::find(m_current_drives.begin(), m_current_drives.end(), drive_data); - if (it != m_current_drives.end()) - m_current_drives.erase(it); -@@ -361,7 +361,7 @@ std::string RemovableDriveManager::get_r - std::size_t found = path.find_last_of("/"); - std::string new_path = found == path.size() - 1 ? path.substr(0, found) : path; - -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - for (const DriveData &data : m_current_drives) - if (search_for_drives_internal::compare_filesystem_id(new_path, data.path)) - return path; -@@ -377,7 +377,7 @@ std::string RemovableDriveManager::get_r - new_path = new_path.substr(0, found); - - // check if same filesystem -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - for (const DriveData &drive_data : m_current_drives) - if (search_for_drives_internal::compare_filesystem_id(new_path, drive_data.path)) - return drive_data.path; -@@ -452,7 +452,7 @@ RemovableDriveManager::RemovableDrivesSt - - RemovableDriveManager::RemovableDrivesStatus out; - { -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - out.has_eject = - // Cannot control eject on Chromium. - platform_flavor() != PlatformFlavor::LinuxOnChromium && -@@ -468,17 +468,17 @@ RemovableDriveManager::RemovableDrivesSt - // Update is called from thread_proc() and from most of the public methods on demand. - void RemovableDriveManager::update() - { -- tbb::mutex::scoped_lock inside_update_lock; -+ std::unique_lock inside_update_lock(m_inside_update_mutex, std::defer_lock); - #ifdef _WIN32 - // All wake up calls up to now are now consumed when the drive enumeration starts. - m_wakeup = false; - #endif // _WIN32 -- if (inside_update_lock.try_acquire(m_inside_update_mutex)) { -+ if (inside_update_lock.try_lock()) { - // Got the lock without waiting. That means, the update was not running. - // Run the update. - std::vector current_drives = this->search_for_removable_drives(); - // Post update events. -- tbb::mutex::scoped_lock lock(m_drives_mutex); -+ std::scoped_lock lock(m_drives_mutex); - std::sort(current_drives.begin(), current_drives.end()); - if (current_drives != m_current_drives) { - assert(m_callback_evt_handler); -@@ -489,7 +489,7 @@ void RemovableDriveManager::update() - } else { - // Acquiring the m_iniside_update lock failed, therefore another update is running. - // Just block until the other instance of update() finishes. -- inside_update_lock.acquire(m_inside_update_mutex); -+ inside_update_lock.lock(); - } - } - -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/RemovableDriveManager.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/RemovableDriveManager.hpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/RemovableDriveManager.hpp -@@ -5,7 +5,7 @@ - #include - - #include --#include -+#include - #include - - // Custom wxWidget events -@@ -111,9 +111,9 @@ private: - // m_current_drives is guarded by m_drives_mutex - // sorted ascending by path - std::vector m_current_drives; -- mutable tbb::mutex m_drives_mutex; -+ mutable std::mutex m_drives_mutex; - // Locking the update() function to avoid that the function is executed multiple times. -- mutable tbb::mutex m_inside_update_mutex; -+ mutable std::mutex m_inside_update_mutex; - - // Returns drive path (same as path in DriveData) if exists otherwise empty string. - std::string get_removable_drive_from_path(const std::string& path); -Index: PrusaSlicer-version_2.3.3/src/libslic3r/SLA/Concurrency.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/libslic3r/SLA/Concurrency.hpp -+++ PrusaSlicer-version_2.3.3/src/libslic3r/SLA/Concurrency.hpp -@@ -1,8 +1,9 @@ - #ifndef SLA_CONCURRENCY_H - #define SLA_CONCURRENCY_H - -+#include -+ - #include --#include - #include - #include - -@@ -23,7 +24,7 @@ template struct _ccr {}; - template<> struct _ccr - { - using SpinningMutex = tbb::spin_mutex; -- using BlockingMutex = tbb::mutex; -+ using BlockingMutex = std::mutex; - - template - static IteratorOnly loop_(const tbb::blocked_range &range, Fn &&fn) -Index: PrusaSlicer-version_2.3.3/src/slic3r/GUI/BackgroundSlicingProcess.hpp -=================================================================== ---- PrusaSlicer-version_2.3.3.orig/src/slic3r/GUI/BackgroundSlicingProcess.hpp -+++ PrusaSlicer-version_2.3.3/src/slic3r/GUI/BackgroundSlicingProcess.hpp -@@ -213,7 +213,7 @@ private: - State m_state = STATE_INITIAL; - - PrintState m_step_state; -- mutable tbb::mutex m_step_state_mutex; -+ mutable std::mutex m_step_state_mutex; - bool set_step_started(BackgroundSlicingProcessStep step); - void set_step_done(BackgroundSlicingProcessStep step); - bool is_step_done(BackgroundSlicingProcessStep step) const; diff --git a/PrusaSlicer.changes b/PrusaSlicer.changes index f6ed0fd..b4e890d 100644 --- a/PrusaSlicer.changes +++ b/PrusaSlicer.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Dec 24 14:39:28 UTC 2021 - Ben Greiner + +- Update to 2.4.0 + * Big changelog since v2.3.3, most changes decribed in alpha and + beta release notes: + https://github.com/prusa3d/PrusaSlicer/releases + * Send system info: new dialog for telemetry. Opt-in. +- Drop patches + * PrusaSlicer-catch2upd.patch + * PrusaSlicer-issue6681-openvdb.patch + * PrusaSlicer-pr6590-updateTBB.patch + ------------------------------------------------------------------- Tue Nov 23 11:21:48 UTC 2021 - Ben Greiner diff --git a/PrusaSlicer.spec b/PrusaSlicer.spec index 8e29852..0cdd9ca 100644 --- a/PrusaSlicer.spec +++ b/PrusaSlicer.spec @@ -17,21 +17,13 @@ Name: PrusaSlicer -Version: 2.3.3 +Version: 2.4.0 Release: 0 Summary: G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.) License: AGPL-3.0-only Group: Hardware/Printing URL: https://www.prusa3d.com/prusaslicer/ Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_%{version}.tar.gz#/%{name}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM PrusaSlicer-issue6681-openvdb.patch -- gh#prusa3d/PrusaSlicer#6681 -Patch0: https://github.com/prusa3d/PrusaSlicer/commit/e6507594fb6893156056c2123822a2b37f7f179d.patch#/PrusaSlicer-issue6681-openvdb.patch -# PATCH-FIX-UPSTREAM PrusaSlicer-catch2upd.patch -- gh#prusa3d/PrusaSlicer#6518 -Patch1: https://github.com/prusa3d/PrusaSlicer/commit/60768d32486cf05635cc355cbdea906aa60b17a8.patch#/PrusaSlicer-catch2upd.patch -# PATCH-FIX-UPSTREAM PrusaSlicer-pr6590-updateTBB.patch - gh#prusa3d/PrusaSlicer#6590 -Patch2: PrusaSlicer-pr6590-updateTBB.patch -# gh#prusa3d/PrusaSlicer#7332 -Source1: https://raw.githubusercontent.com/theofficialgman/PrusaSlicer/TBB-Fix/cmake/modules/FindTBB.cmake BuildRequires: blosc-devel BuildRequires: cereal-devel BuildRequires: cgal-devel >= 4.13.2 @@ -58,6 +50,7 @@ BuildRequires: nlopt-devel BuildRequires: openexr-devel BuildRequires: openvdb-devel >= 5 BuildRequires: openvdb-tools +BuildRequires: pkgconfig BuildRequires: tbb-devel BuildRequires: update-desktop-files BuildRequires: wxGTK3-devel >= 3.1 @@ -76,8 +69,8 @@ It also works with Mach3, LinuxCNC and Machinekit controllers. %if 0%{?suse_version} sed -i 's/UNKNOWN/%{release}-%{?is_opensuse:open}SUSE-%{suse_version}/' version.inc %endif -rm -r resources/data/flatpak -cp %{SOURCE1} cmake/modules/FindTBB.cmake +# this is not prusaslicer specific, space mouse users install it themselves +rm resources/udev/90-3dconnexion.rules %build # The build process really acquires that much memory per job. We are @@ -101,17 +94,6 @@ cp %{SOURCE1} cmake/modules/FindTBB.cmake %install %cmake_install -for res in 32 128 192; do - mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps/ - ln -sr %{buildroot}%{_datadir}/%{name}/icons/%{name}_${res}px.png \ - %{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps/%{name}.png - ln -sr %{buildroot}%{_datadir}/%{name}/icons/%{name}-gcodeviewer_${res}px.png \ - %{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps/%{name}-gcodeviewer.png -done - -mkdir -p %{buildroot}%{_datadir}/applications -mv %{buildroot}%{_datadir}/{PrusaSlicer/,}applications/PrusaSlicer.desktop -mv %{buildroot}%{_datadir}/{PrusaSlicer/,}applications/PrusaGcodeviewer.desktop %suse_update_desktop_file -r PrusaSlicer Graphics 3DGraphics Science Engineering %suse_update_desktop_file -r PrusaGcodeviewer Graphics 3DGraphics @@ -157,7 +139,7 @@ find %{buildroot}%{_datadir}/%{name}/localization -type d | sed ' %{_bindir}/prusa-slicer %{_bindir}/prusa-gcodeviewer %dir %{_datadir}/%{name}/ -%{_datadir}/%{name}/{icons,models,profiles,shaders,udev}/ +%{_datadir}/%{name}/{icons,models,profiles,shaders,udev,data,shapes}/ %{_datadir}/icons/hicolor/32x32/apps/%{name}.png %{_datadir}/icons/hicolor/128x128/apps/%{name}.png %{_datadir}/icons/hicolor/192x192/apps/%{name}.png