1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

cad/PrusaSlicer: Update to 2.8.1

PR:		282145
This commit is contained in:
Teodor Sigaev 2024-10-29 03:13:29 +08:00 committed by Li-Wen Hsu
parent c6b7113060
commit ea2855f6a7
No known key found for this signature in database
GPG Key ID: 7377A4A02A2954DD
56 changed files with 1900 additions and 205 deletions

View File

@ -1,7 +1,6 @@
PORTNAME= PrusaSlicer
DISTVERSIONPREFIX=version_
DISTVERSION= 2.8.0
PORTREVISION= 2
DISTVERSION= 2.8.1
CATEGORIES= cad
DIST_SUBDIR= PrusaSlicer

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1719924925
SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.8.0_GH0.tar.gz) = 58d484f85b34d83026f8220bab983f855fbcd72767d0887f21f5cc382e5b19ab
SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.8.0_GH0.tar.gz) = 69806919
TIMESTAMP = 1728981634
SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.8.1_GH0.tar.gz) = f71033dd4e9fdd8e5ac7b5be5803d0d6d09ec0fd87de92b152b3c6bbae04c103
SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.8.1_GH0.tar.gz) = 69409077

View File

@ -1,4 +1,4 @@
--- CMakeLists.txt.orig 2024-06-27 09:25:47 UTC
--- CMakeLists.txt.orig 2024-09-18 13:39:04 UTC
+++ CMakeLists.txt
@@ -14,6 +14,7 @@ include(CMakeDependentOption)
include("version.inc")
@ -17,7 +17,7 @@
find_package(PkgConfig REQUIRED)
if (CMAKE_VERSION VERSION_LESS "3.1")
@@ -264,6 +265,8 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL
@@ -263,6 +264,8 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
add_compile_options(-Werror=return-type)
@ -26,7 +26,20 @@
# removes LOTS of extraneous Eigen warnings (GCC only supports it since 6.1)
# https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
@@ -648,8 +651,8 @@ elseif (SLIC3R_FHS)
@@ -371,10 +374,10 @@ set(MINIMUM_BOOST_VERSION "1.66.0")
# 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;nowide")
+set(_boost_components "system;filesystem;thread;log;log_setup;locale;regex;chrono;atomic;date_time;iostreams;nowide")
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
-find_package(Eigen3 3.3.7 REQUIRED)
+find_package(Eigen3 3.3.7 REQUIRED NO_MODULE)
add_library(boost_libs INTERFACE)
add_library(boost_headeronly INTERFACE)
@@ -636,8 +639,8 @@ elseif (SLIC3R_FHS)
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
PATTERN "*/udev" EXCLUDE
)
@ -37,7 +50,7 @@
foreach(SIZE 32 128 192)
install(FILES ${SLIC3R_RESOURCES_DIR}/icons/PrusaSlicer_${SIZE}px.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer.png
@@ -658,7 +661,8 @@ elseif (SLIC3R_FHS)
@@ -646,7 +649,8 @@ elseif (SLIC3R_FHS)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer-gcodeviewer.png
)
endforeach()

View File

@ -1,5 +1,5 @@
--- src/avrdude/arduino.c.orig 2023-07-25 13:23:52 UTC
+++ src/avrdude/arduino.c
--- bundled_deps/avrdude/avrdude/arduino.c.orig 2024-09-18 13:39:04 UTC
+++ bundled_deps/avrdude/avrdude/arduino.c
@@ -28,6 +28,7 @@
#include "ac_cfg.h"

View File

@ -1,5 +1,5 @@
--- src/avrdude/libavrdude.h.orig 2022-09-06 07:09:19 UTC
+++ src/avrdude/libavrdude.h
--- bundled_deps/avrdude/avrdude/libavrdude.h.orig 2024-09-18 13:39:04 UTC
+++ bundled_deps/avrdude/avrdude/libavrdude.h
@@ -950,6 +950,8 @@ int read_config_builtin();
// Header file for alloca()
#if defined(WIN32NATIVE)

View File

@ -1,5 +1,5 @@
--- src/avrdude/main.c.orig 2022-09-06 07:09:19 UTC
+++ src/avrdude/main.c
--- bundled_deps/avrdude/avrdude/main.c.orig 2024-09-18 13:39:04 UTC
+++ bundled_deps/avrdude/avrdude/main.c
@@ -806,7 +806,7 @@ int avrdude_main(int argc, char * argv [])
avrdude_message(MSG_NOTICE, "\n%s: Version %s, compiled on %s at %s\n"
"%sCopyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/\n"

View File

@ -1,5 +1,5 @@
--- src/hidapi/CMakeLists.txt.orig 2022-09-06 07:09:19 UTC
+++ src/hidapi/CMakeLists.txt
--- bundled_deps/hidapi/CMakeLists.txt.orig 2024-09-18 13:39:04 UTC
+++ bundled_deps/hidapi/CMakeLists.txt
@@ -1,8 +1,9 @@
-
if (WIN32)
@ -11,10 +11,10 @@
else ()
# Assume Linux or Unix other than Mac OS
set(HIDAPI_IMPL linux/hid.c)
@@ -16,4 +17,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
@@ -16,4 +17,6 @@ target_link_libraries(hidapi PRIVATE dl)
# Don't link the udev library, as there are two versions out there (libudev.so.0, libudev.so.1), so they are linked explicitely.
# target_link_libraries(hidapi udev)
target_link_libraries(hidapi dl)
target_link_libraries(hidapi PRIVATE dl)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ target_link_libraries(hidapi usb iconv)
+ target_link_libraries(hidapi usb iconv)
endif()

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
--- src/hints/HintsToPot.cpp.orig 2022-11-13 19:31:07 UTC
+++ src/hints/HintsToPot.cpp
--- bundled_deps/hints/HintsToPot.cpp.orig 2024-09-18 13:39:04 UTC
+++ bundled_deps/hints/HintsToPot.cpp
@@ -2,6 +2,7 @@
#include <vector>
#include <string>

View File

@ -1,6 +1,6 @@
--- src/CMakeLists.txt.orig 2024-06-27 09:25:47 UTC
--- src/CMakeLists.txt.orig 2024-09-18 13:39:04 UTC
+++ src/CMakeLists.txt
@@ -60,7 +60,7 @@ if (SLIC3R_GUI)
@@ -46,7 +46,7 @@ if (SLIC3R_GUI)
endif()
find_package(JPEG MODULE QUIET)
@ -9,7 +9,7 @@
string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES})
if (PNG_FOUND AND NOT WX_PNG_BUILTIN)
@@ -123,7 +123,7 @@ endif ()
@@ -109,7 +109,7 @@ endif ()
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
endif ()

View File

@ -1,4 +1,4 @@
--- src/hidapi/libusb/hid.c.orig 2022-11-13 14:36:46 UTC
--- src/hidapi/libusb/hid.c.orig 2024-10-15 09:14:40 UTC
+++ src/hidapi/libusb/hid.c
@@ -0,0 +1,1514 @@
+/*******************************************************

View File

@ -1,4 +1,4 @@
--- src/libnanosvg/nanosvgrast.h.orig 2024-01-12 13:12:38 UTC
--- src/libnanosvg/nanosvgrast.h.orig 2024-10-16 10:58:04 UTC
+++ src/libnanosvg/nanosvgrast.h
@@ -0,0 +1,1482 @@
+/*
@ -61,7 +61,7 @@
+*/
+
+// Allocated rasterizer context.
+NSVGrasterizer* nsvgCreateRasterizer(void);
+static NSVGrasterizer* nsvgCreateRasterizer(void);
+
+// Rasterizes SVG image, returns RGBA image (non-premultiplied alpha)
+// r - pointer to rasterizer context
@ -72,18 +72,18 @@
+// w - width of the image to render
+// h - height of the image to render
+// stride - number of bytes per scaleline in the destination buffer
+void nsvgRasterize(NSVGrasterizer* r,
+static void nsvgRasterize(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty, float scale,
+ unsigned char* dst, int w, int h, int stride);
+
+// As above, but allow X and Y axes to scale independently for non-square aspects
+void nsvgRasterizeXY(NSVGrasterizer* r,
+static void nsvgRasterizeXY(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty,
+ float sx, float sy,
+ unsigned char* dst, int w, int h, int stride);
+
+// Deletes rasterizer context.
+void nsvgDeleteRasterizer(NSVGrasterizer*);
+static void nsvgDeleteRasterizer(NSVGrasterizer*);
+
+
+#ifndef NANOSVGRAST_CPLUSPLUS
@ -92,7 +92,7 @@
+#endif
+#endif
+
+#ifdef NANOSVGRAST_IMPLEMENTATION
+#if 1 || defined(NANOSVGRAST_IMPLEMENTATION)
+
+#include <math.h>
+#include <stdlib.h>
@ -168,7 +168,7 @@
+ int width, height, stride;
+};
+
+NSVGrasterizer* nsvgCreateRasterizer(void)
+static NSVGrasterizer* nsvgCreateRasterizer(void)
+{
+ NSVGrasterizer* r = (NSVGrasterizer*)malloc(sizeof(NSVGrasterizer));
+ if (r == NULL) goto error;
@ -184,7 +184,7 @@
+ return NULL;
+}
+
+void nsvgDeleteRasterizer(NSVGrasterizer* r)
+static void nsvgDeleteRasterizer(NSVGrasterizer* r)
+{
+ NSVGmemPage* p;
+
@ -1383,7 +1383,7 @@
+}
+*/
+
+void nsvgRasterizeXY(NSVGrasterizer* r,
+static void nsvgRasterizeXY(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty,
+ float sx, float sy,
+ unsigned char* dst, int w, int h, int stride)
@ -1473,7 +1473,7 @@
+ r->stride = 0;
+}
+
+void nsvgRasterize(NSVGrasterizer* r,
+static void nsvgRasterize(NSVGrasterizer* r,
+ NSVGimage* image, float tx, float ty, float scale,
+ unsigned char* dst, int w, int h, int stride)
+{

View File

@ -1,9 +1,10 @@
--- src/libslic3r/Arrange/Core/NFP/NFPConcave_CGAL.cpp.orig 2024-03-01 12:13:10 UTC
--- src/libslic3r/Arrange/Core/NFP/NFPConcave_CGAL.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/Arrange/Core/NFP/NFPConcave_CGAL.cpp
@@ -5,6 +5,8 @@
#include "NFP.hpp"
#include "NFPConcave_CGAL.hpp"
@@ -2,6 +2,9 @@
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
+
+#include <boost/next_prior.hpp>
+
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

View File

@ -1,10 +1,10 @@
--- src/libslic3r/CMakeLists.txt.orig 2024-06-27 09:25:47 UTC
--- src/libslic3r/CMakeLists.txt.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/CMakeLists.txt
@@ -611,7 +611,6 @@ target_link_libraries(libslic3r
target_link_libraries(libslic3r
@@ -611,7 +611,6 @@ target_link_libraries(libslic3r PRIVATE
target_link_libraries(libslic3r PRIVATE
libnest2d
admesh
- libcereal
libigl
miniz
boost_libs
clipper
libexpat

View File

@ -1,10 +1,11 @@
--- src/libslic3r/CutSurface.cpp.orig 2024-03-01 11:43:14 UTC
--- src/libslic3r/CutSurface.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/CutSurface.cpp
@@ -29,6 +29,7 @@ using namespace Slic3r;
using namespace Slic3r;
#include "ExPolygonsIndex.hpp"
@@ -27,6 +27,8 @@ using namespace Slic3r;
//#define DEBUG_OUTPUT_DIR std::string("C:/data/temp/cutSurface/")
using namespace Slic3r;
+#include <boost/next_prior.hpp>
+
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Exact_integer.h>
#include <CGAL/Surface_mesh.h>

View File

@ -1,11 +1,11 @@
--- src/libslic3r/EmbossShape.hpp.orig 2024-01-12 13:37:33 UTC
--- src/libslic3r/EmbossShape.hpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/EmbossShape.hpp
@@ -12,7 +12,7 @@
#include "Point.hpp" // Transform3d
#include "ExPolygon.hpp"
#include "ExPolygonSerialize.hpp"
-#include "nanosvg/nanosvg.h" // NSVGimage
+#include "libnanosvg/nanosvg.h" // NSVGimage
+#include <libnanosvg/nanosvg.h> // NSVGimage
namespace Slic3r {

View File

@ -1,12 +1,11 @@
--- src/libslic3r/Format/SL1_SVG.cpp.orig 2023-12-12 14:21:21 UTC
--- src/libslic3r/Format/SL1_SVG.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/Format/SL1_SVG.cpp
@@ -10,7 +10,8 @@
#include "libslic3r/Format/ZipperArchiveImport.hpp"
@@ -28,7 +28,7 @@
#include <utility>
#include <cstddef>
#define NANOSVG_IMPLEMENTATION
-#include "nanosvg/nanosvg.h"
+#define NANOSVGRAST_IMPLEMENTATION
+#include "libnanosvg/nanosvgrast.h"
+#include <libnanosvg/nanosvgrast.h>
#include <limits>
#include <cstdint>
namespace Slic3r {
class SLAPrint;

View File

@ -0,0 +1,11 @@
--- src/libslic3r/Format/SVG.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/Format/SVG.cpp
@@ -7,7 +7,7 @@
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
#include <boost/log/trivial.hpp>
-#include <nanosvg/nanosvg.h>
+#include <libnanosvg/nanosvg.h>
#include <memory>
#include <string>
#include <utility>

View File

@ -1,4 +1,4 @@
--- src/libslic3r/Geometry/VoronoiUtilsCgal.cpp.orig 2024-03-01 11:50:11 UTC
--- src/libslic3r/Geometry/VoronoiUtilsCgal.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/Geometry/VoronoiUtilsCgal.cpp
@@ -2,6 +2,7 @@
///|/
@ -8,7 +8,7 @@
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Surface_sweep_2_algorithms.h>
@@ -325,4 +326,4 @@ VoronoiUtilsCgal::is_voronoi_diagram_planar_angle(cons
@@ -333,4 +334,4 @@ VoronoiUtilsCgal::is_voronoi_diagram_planar_angle(cons
return true;
}

View File

@ -1,11 +1,11 @@
--- src/libslic3r/MeshBoolean.cpp.orig 2024-03-01 11:44:05 UTC
--- src/libslic3r/MeshBoolean.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/MeshBoolean.cpp
@@ -8,6 +8,8 @@
#include "libslic3r/TryCatchSignal.hpp"
@@ -10,6 +10,8 @@
#undef PI
+#include <boost/next_prior.hpp>
+
// Include igl first. It defines "L" macro which then clashes with our localization
#include <igl/copyleft/cgal/mesh_boolean.h>
#undef L
#include <igl/copyleft/cgal/mesh_boolean.h> // IWYU pragma: keep
#include <igl/MeshBooleanType.h>

View File

@ -0,0 +1,11 @@
--- src/libslic3r/NSVGUtils.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/NSVGUtils.cpp
@@ -5,7 +5,7 @@
#include "NSVGUtils.hpp"
#include <boost/nowide/fstream.hpp>
-#include <nanosvg/nanosvg.h>
+#include <libnanosvg/nanosvg.h>
#include <array>
#include <algorithm>
#include <sstream>

View File

@ -1,11 +1,11 @@
--- src/libslic3r/NSVGUtils.hpp.orig 2023-12-12 14:21:21 UTC
--- src/libslic3r/NSVGUtils.hpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/NSVGUtils.hpp
@@ -11,7 +11,7 @@
@@ -15,7 +15,7 @@
#include "Polygon.hpp"
#include "ExPolygon.hpp"
#include "EmbossShape.hpp" // ExPolygonsWithIds
-#include "nanosvg/nanosvg.h" // load SVG file
+#include "libnanosvg/nanosvg.h" // load SVG file
+#include <libnanosvg/nanosvg.h>
#include "libslic3r/Point.hpp"
#include "libslic3r/libslic3r.h"
// Helper function to work with nano svg
namespace Slic3r {

View File

@ -1,4 +1,4 @@
--- src/libslic3r/Platform.cpp.orig 2023-12-12 14:21:21 UTC
--- src/libslic3r/Platform.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/Platform.cpp
@@ -90,6 +90,10 @@ void detect_platform()
BOOST_LOG_TRIVIAL(info) << "Platform: OpenBSD";
@ -11,3 +11,11 @@
#else
// This should not happen.
BOOST_LOG_TRIVIAL(info) << "Platform: Unknown";
@@ -138,6 +142,7 @@ std::string platform_flavor_to_string(PlatformFlavor p
case PlatformFlavor::WSL : return "WSL";
case PlatformFlavor::WSL2 : return "WSL2";
case PlatformFlavor::OpenBSD : return "OpenBSD";
+ case PlatformFlavor::FreeBSD : return "FreeBSD";
case PlatformFlavor::GenericOSX : return "GenericOSX";
case PlatformFlavor::OSXOnX86 : return "OSXOnX86";
case PlatformFlavor::OSXOnArm : return "OSXOnArm";

View File

@ -1,6 +1,6 @@
--- src/libslic3r/SupportSpotsGenerator.cpp.orig 2024-02-29 13:03:32 UTC
--- src/libslic3r/SupportSpotsGenerator.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/SupportSpotsGenerator.cpp
@@ -1054,7 +1054,7 @@ SliceMappings update_active_object_parts(const Layer
@@ -1062,7 +1062,7 @@ SliceMappings update_active_object_parts(const Layer
}
}
const float bottom_z = layer->bottom_z();

View File

@ -1,4 +1,4 @@
--- src/libslic3r/Triangulation.cpp.orig 2024-03-01 11:48:14 UTC
--- src/libslic3r/Triangulation.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/libslic3r/Triangulation.cpp
@@ -2,6 +2,9 @@
///|/
@ -8,5 +8,5 @@
+#include <boost/next_prior.hpp>
+
#include "Triangulation.hpp"
#include "IntersectionPoints.hpp"
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

View File

@ -1,10 +1,10 @@
--- src/occt_wrapper/CMakeLists.txt.orig 2023-06-19 12:07:14 UTC
--- src/occt_wrapper/CMakeLists.txt.orig 2024-09-18 13:39:04 UTC
+++ src/occt_wrapper/CMakeLists.txt
@@ -19,14 +19,13 @@ generate_export_header(OCCTWrapper)
generate_export_header(OCCTWrapper)
-find_package(OpenCASCADE 7.6.2 REQUIRED)
-find_package(OpenCASCADE 7.6.1 REQUIRED)
+list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib/cmake)
+find_package(OpenCASCADE REQUIRED)
@ -15,12 +15,12 @@
- TKSTEPAttr
- TKSTEPBase
+ -L${CMAKE_INSTALL_PREFIX}/lib
+ TKXSDRAWSTEP
+ TKDESTEP
+ TKXSDRAWSTEP
+ TKDESTEP
TKXCAF
TKXSBase
TKVCAF
@@ -58,5 +57,5 @@ include(GNUInstallDirs)
@@ -59,5 +58,5 @@ include(GNUInstallDirs)
include(GNUInstallDirs)

View File

@ -1,26 +1,45 @@
--- src/slic3r/CMakeLists.txt.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/CMakeLists.txt.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/CMakeLists.txt
@@ -375,7 +375,8 @@ set(SLIC3R_GUI_SOURCES
Utils/PrusaConnect.cpp
@@ -382,7 +382,8 @@ set(SLIC3R_GUI_SOURCES
Utils/ServiceConfig.cpp
)
-find_package(NanoSVG REQUIRED)
+# find_package(NanoSVG REQUIRED)
+#find_package(NanoSVG REQUIRED)
+find_package(OpenSSL REQUIRED)
if (APPLE)
list(APPEND SLIC3R_GUI_SOURCES
@@ -404,11 +405,11 @@ encoding_check(libslic3r_gui)
encoding_check(libslic3r_gui)
-target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui libvgcode GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
+target_link_libraries(libslic3r_gui libslic3r avrdude imgui libvgcode GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto)
@@ -426,7 +427,6 @@ target_link_libraries(
PUBLIC
libslic3r
avrdude
- libcereal
imgui
libvgcode
GLEW::GLEW
@@ -434,19 +434,21 @@ target_link_libraries(
hidapi
libcurl
${wxWidgets_LIBRARIES}
- NanoSVG::nanosvg
- NanoSVG::nanosvgrast
stb_dxt
fastfloat
+ OpenSSL::SSL
+ OpenSSL::Crypto
)
if (MSVC)
target_link_libraries(libslic3r_gui Setupapi.lib)
target_link_libraries(libslic3r_gui PUBLIC Setupapi.lib)
-elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
target_link_libraries(libslic3r_gui PUBLIC ${DBUS_LIBRARIES})
elseif (APPLE)
target_link_libraries(libslic3r_gui ${DISKARBITRATION_LIBRARY} ${COREWLAN_LIBRARY})
target_link_libraries(libslic3r_gui PUBLIC ${DISKARBITRATION_LIBRARY} ${COREWLAN_LIBRARY})
endif()
+
+add_definitions(-DBOOST_LOG_DYN_LINK)
#if (SLIC3R_STATIC)
# FIXME: This was previously exported by wx-config but the wxWidgets

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/BitmapCache.cpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/GUI/BitmapCache.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/BitmapCache.cpp
@@ -20,8 +20,9 @@
#include <wx/rawbmp.h>
@ -7,8 +7,8 @@
-#include <nanosvg/nanosvg.h>
-#include <nanosvg/nanosvgrast.h>
+#include <wx/display.h>
+#include "libnanosvg/nanosvg.h"
+#include "libnanosvg/nanosvgrast.h"
+#include <libnanosvg/nanosvg.h>
+#include <libnanosvg/nanosvgrast.h>
namespace Slic3r { namespace GUI {

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/ConfigWizard.cpp
@@ -638,7 +638,7 @@ void PageWelcome::set_run_reason(ConfigWizard::RunReas
const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY;
@ -18,7 +18,16 @@
append_text(wxString::Format(_L(
"On Linux systems the process of registration also creates desktop integration files for this version of application."
)));
@@ -1759,7 +1759,7 @@ bool DownloaderUtils::Worker::perform_register(const s
@@ -1714,7 +1714,7 @@ bool PageDownloader::on_finish_downloader() const
return m_downloader->on_finish();
}
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
bool DownloaderUtils::Worker::perform_registration_linux = false;
#endif // __linux__
@@ -1763,10 +1763,10 @@ bool DownloaderUtils::Worker::perform_url_register()
}
//key_full = "\"C:\\Program Files\\Prusa3D\\PrusaSlicer\\prusa-slicer-console.exe\" \"%1\"";
key_full = key_string;
@ -26,17 +35,24 @@
+#elif defined(__APPLE__) || defined(__FreeBSD__)
// Apple registers for custom url in info.plist thus it has to be already registered since build.
// The url will always trigger opening of prusaslicer and we have to check that user has allowed it. (GUI_App::MacOpenURL is the triggered method)
#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
@@ -1778,7 +1778,7 @@ void DownloaderUtils::Worker::deregister()
-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION
// the performation should be called later during desktop integration
perform_registration_linux = true;
#endif
@@ -1782,9 +1782,9 @@ void DownloaderUtils::Worker::deregister()
return;
}
key_full = key_string;
-#elif __APPLE__
+#elif defined(__APPLE__) || defined(__FreeBSD__)
// TODO
#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION
BOOST_LOG_TRIVIAL(debug) << "DesktopIntegrationDialog::undo_downloader_registration";
@@ -3422,7 +3422,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_c
DesktopIntegrationDialog::undo_downloader_registration();
perform_registration_linux = false;
@@ -3421,7 +3421,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_c
if ((check_unsaved_preset_changes = install_bundles.size() > 0))
header = _L_PLURAL("A new vendor was installed and one of its printers will be activated", "New vendors were installed and one of theirs printers will be activated", install_bundles.size());

View File

@ -1,9 +1,9 @@
--- src/slic3r/GUI/ConfigWizard.hpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/ConfigWizard.hpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/ConfigWizard.hpp
@@ -53,7 +53,7 @@ namespace DownloaderUtils {
@@ -54,7 +54,7 @@ namespace DownloaderUtils {
bool on_finish();
static bool perform_register(const std::string& path);
static bool perform_download_register(const std::string& path);
static bool perform_url_register();
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
static bool perform_registration_linux;

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/DesktopIntegrationDialog.hpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/GUI/DesktopIntegrationDialog.hpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/DesktopIntegrationDialog.hpp
@@ -2,7 +2,7 @@
///|/
@ -9,7 +9,7 @@
#ifndef slic3r_DesktopIntegrationDialog_hpp_
#define slic3r_DesktopIntegrationDialog_hpp_
@@ -46,4 +46,4 @@ class DesktopIntegrationDialog : public wxDialog (priv
@@ -47,4 +47,4 @@ class DesktopIntegrationDialog : public wxDialog (priv
} // namespace Slic3r
#endif // slic3r_DesktopIntegrationDialog_hpp_

View File

@ -0,0 +1,29 @@
--- src/slic3r/GUI/EditGCodeDialog.cpp.orig 2024-10-15 09:06:23 UTC
+++ src/slic3r/GUI/EditGCodeDialog.cpp
@@ -566,7 +566,7 @@ void ParamsModel::GetValue(wxVariant& variant, const w
ParamsNode* node = static_cast<ParamsNode*>(item.GetID());
if (col == (unsigned int)0)
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
variant << wxDataViewIconText(node->text, get_bmp_bundle(node->icon_name)->GetIconFor(m_ctrl->GetParent()));
#else
variant << DataViewBitmapText(node->text, get_bmp_bundle(node->icon_name)->GetBitmapFor(m_ctrl->GetParent()));
@@ -581,7 +581,7 @@ bool ParamsModel::SetValue(const wxVariant& variant, c
ParamsNode* node = static_cast<ParamsNode*>(item.GetID());
if (col == (unsigned int)0) {
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
wxDataViewIconText data;
data << variant;
node->icon = data.GetIcon();
@@ -658,7 +658,7 @@ ParamsViewCtrl::ParamsViewCtrl(wxWindow *parent, wxSiz
this->AssociateModel(model);
model->SetAssociatedControl(this);
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
wxDataViewIconTextRenderer* rd = new wxDataViewIconTextRenderer();
#ifdef SUPPORTS_MARKUP
rd->EnableMarkup(true);

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/Field.cpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/GUI/Field.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/Field.cpp
@@ -221,7 +221,7 @@ bool Field::is_matched(const std::string& string, cons
@@ -222,7 +222,7 @@ static wxString na_value(bool for_spin_ctrl = false)
static wxString na_value(bool for_spin_ctrl = false)
{

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/GLCanvas3D.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/GLCanvas3D.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/GLCanvas3D.cpp
@@ -104,7 +104,7 @@ float RetinaHelper::get_scale_factor() { return float(
@@ -107,7 +107,7 @@ float RetinaHelper::get_scale_factor() { return float(
#endif // __WXGTK3__
// Fixed the collision between BuildVolume::Type::Convex and macro Convex defined inside /usr/include/X11/X.h that is included by WxWidgets 3.0.

View File

@ -1,13 +1,13 @@
--- src/slic3r/GUI/GLTexture.cpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/GUI/GLTexture.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/GLTexture.cpp
@@ -25,8 +25,8 @@
#define STB_DXT_IMPLEMENTATION
#include "stb_dxt/stb_dxt.h"
#include <stb_dxt.h>
-#include <nanosvg/nanosvg.h>
-#include <nanosvg/nanosvgrast.h>
+#include "libnanosvg/nanosvg.h"
+#include "libnanosvg/nanosvgrast.h"
+#include <libnanosvg/nanosvg.h>
+#include <libnanosvg/nanosvgrast.h>
#include "libslic3r/Utils.hpp"

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/GUI_App.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/GUI_App.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/GUI_App.cpp
@@ -411,7 +411,7 @@ class SplashScreen : public wxSplashScreen (private)
@@ -412,7 +412,7 @@ class SplashScreen : public wxSplashScreen (private)
};
@ -9,26 +9,26 @@
bool static check_old_linux_datadir(const wxString& app_name) {
// If we are on Linux and the datadir does not exist yet, look into the old
// location where the datadir was before version 2.3. If we find it there,
@@ -1254,7 +1254,8 @@ bool GUI_App::on_init_inner()
@@ -1256,6 +1256,9 @@ bool GUI_App::on_init_inner()
// Set initialization of image handlers before any UI actions - See GH issue #7469
wxInitAllImageHandlers();
-
+ // Silence warnings generated with wxWidgets 3.2
+ wxSizerFlags::DisableConsistencyChecks();
#if defined(_WIN32) && ! defined(_WIN64)
// Win32 32bit build.
if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") {
@@ -1282,7 +1283,7 @@ bool GUI_App::on_init_inner()
wxCHECK_MSG(wxDirExists(resources_dir), false,
wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir));
+ // Silence warnings generated with wxWidgets 3.2
+ wxSizerFlags::DisableConsistencyChecks();
+
// Set our own gui log as an active target
m_log_gui = new LogGui();
wxLog::SetActiveTarget(m_log_gui);
@@ -1286,7 +1289,7 @@ bool GUI_App::on_init_inner()
const wxString resources_dir = from_u8(Slic3r::resources_dir());
wxCHECK_MSG(wxDirExists(resources_dir), false, wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir));
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
if (! check_old_linux_datadir(GetAppName())) {
std::cerr << "Quitting, user chose to move their data to new location." << std::endl;
return false;
@@ -1387,7 +1388,7 @@ bool GUI_App::on_init_inner()
@@ -1391,7 +1394,7 @@ bool GUI_App::on_init_inner()
if (!default_splashscreen_pos)
// revert "restore_win_position" value if application wasn't crashed
get_app_config()->set("restore_win_position", "1");
@ -37,7 +37,7 @@
wxYield();
#endif
scrn->SetText(_L("Loading configuration")+ dots);
@@ -1546,7 +1547,7 @@ bool GUI_App::on_init_inner()
@@ -1557,7 +1560,7 @@ bool GUI_App::on_init_inner()
// and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized.
// Since issue #9774 Where same problem occured on MacOS Ventura, we decided to have this check on MacOS as well.
@ -46,7 +46,7 @@
if (!m_post_initialized && m_opengl_initialized) {
#else
if (!m_post_initialized) {
@@ -2236,7 +2237,7 @@ bool GUI_App::switch_language()
@@ -2247,7 +2250,7 @@ bool GUI_App::switch_language()
}
}
@ -55,7 +55,7 @@
static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language,
const wxLanguageInfo* system_language)
{
@@ -2438,7 +2439,7 @@ bool GUI_App::load_language(wxString language, bool in
@@ -2449,7 +2452,7 @@ bool GUI_App::load_language(wxString language, bool in
m_language_info_best = wxLocale::FindLanguageInfo(best_language);
BOOST_LOG_TRIVIAL(trace) << boost::format("Best translation language detected (may be different from user locales): %1%") % m_language_info_best->CanonicalName.ToUTF8().data();
}
@ -64,7 +64,7 @@
wxString lc_all;
if (wxGetEnv("LC_ALL", &lc_all) && ! lc_all.IsEmpty()) {
// Best language returned by wxWidgets on Linux apparently does not respect LC_ALL.
@@ -2447,6 +2448,7 @@ bool GUI_App::load_language(wxString language, bool in
@@ -2458,6 +2461,7 @@ bool GUI_App::load_language(wxString language, bool in
}
#endif
}
@ -72,7 +72,7 @@
}
const wxLanguageInfo *language_info = language.empty() ? nullptr : wxLocale::FindLanguageInfo(language);
@@ -2491,7 +2493,7 @@ bool GUI_App::load_language(wxString language, bool in
@@ -2502,7 +2506,7 @@ bool GUI_App::load_language(wxString language, bool in
} else if (m_language_info_system != nullptr && language_info->CanonicalName.BeforeFirst('_') == m_language_info_system->CanonicalName.BeforeFirst('_'))
language_info = m_language_info_system;
@ -81,7 +81,7 @@
// If we can't find this locale , try to use different one for the language
// instead of just reporting that it is impossible to switch.
if (! wxLocale::IsAvailable(language_info->Language)) {
@@ -2612,7 +2614,7 @@ wxMenu* GUI_App::get_config_menu(MainFrame* main_frame
@@ -2623,7 +2627,7 @@ wxMenu* GUI_App::get_config_menu(MainFrame* main_frame
local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _L("Take Configuration &Snapshot"), _L("Capture a configuration snapshot"));
local_menu->Append(config_id_base + ConfigMenuUpdateConf, _L("Check for Configuration Updates"), _L("Check for configuration updates"));
local_menu->Append(config_id_base + ConfigMenuUpdateApp, _L("Check for Application Updates"), _L("Check for new version of application"));
@ -90,7 +90,7 @@
//if (DesktopIntegrationDialog::integration_possible())
local_menu->Append(config_id_base + ConfigMenuDesktopIntegration, _L("Desktop Integration"), _L("Desktop Integration"));
#endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
@@ -2646,7 +2648,7 @@ wxMenu* GUI_App::get_config_menu(MainFrame* main_frame
@@ -2657,7 +2661,7 @@ wxMenu* GUI_App::get_config_menu(MainFrame* main_frame
case ConfigMenuUpdateApp:
app_version_check(true);
break;
@ -99,7 +99,7 @@
case ConfigMenuDesktopIntegration:
show_desktop_integration_dialog();
break;
@@ -3318,7 +3320,7 @@ void GUI_App::show_desktop_integration_dialog()
@@ -3336,7 +3340,7 @@ void GUI_App::show_desktop_integration_dialog()
void GUI_App::show_desktop_integration_dialog()
{
@ -108,16 +108,16 @@
//wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
DesktopIntegrationDialog dialog(mainframe);
dialog.ShowModal();
@@ -3338,7 +3340,7 @@ void GUI_App::show_downloader_registration_dialog()
@@ -3356,7 +3360,7 @@ void GUI_App::show_downloader_registration_dialog()
if (msg.ShowModal() == wxID_YES) {
auto downloader_worker = new DownloaderUtils::Worker(nullptr);
downloader_worker->perform_register(app_config->get("url_downloader_dest"));
downloader_worker->perform_download_register(app_config->get("url_downloader_dest"));
-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)
if (DownloaderUtils::Worker::perform_registration_linux)
DesktopIntegrationDialog::perform_downloader_desktop_integration();
#endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
@@ -3746,7 +3748,7 @@ void GUI_App::start_download(std::string url)
@@ -3790,7 +3794,7 @@ void GUI_App::start_download(std::string url)
return;
}

View File

@ -1,20 +1,20 @@
--- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp
@@ -23,7 +23,7 @@
#include "libslic3r/ClipperUtils.hpp" // union_ex
#include "imgui/imgui_stdlib.h" // using std::string for inputs
-#include "nanosvg/nanosvg.h" // load SVG file
+#include "libnanosvg/nanosvg.h" // load SVG file
+#include <libnanosvg/nanosvg.h> // load SVG file
#include <wx/display.h> // detection of change DPI
#include <boost/log/trivial.hpp>
@@ -587,7 +587,7 @@ void GLGizmoSVG::on_dragging(const UpdateData &data) {
@@ -589,7 +589,7 @@ void GLGizmoSVG::on_dragging(const UpdateData &data) {
void GLGizmoSVG::on_dragging(const UpdateData &data) { m_rotate_gizmo.dragging(data); }
#include "slic3r/GUI/BitmapCache.hpp"
-#include "nanosvg/nanosvgrast.h"
+#include "libnanosvg/nanosvgrast.h"
+#include <libnanosvg/nanosvgrast.h>
#include "libslic3r/AABBTreeLines.hpp" // aabb lines for draw filled expolygon
namespace{

View File

@ -0,0 +1,16 @@
--- src/slic3r/GUI/HintNotification.cpp.orig 2024-10-15 09:07:17 UTC
+++ src/slic3r/GUI/HintNotification.cpp
@@ -161,6 +161,13 @@ TagCheckResult tag_check_system(const std::string& tag
return TagCheckNegative;
#endif // __linux__
+ if (tag == "FreeBSD")
+#ifdef __FreeBSD__
+ return TagCheckAffirmative;
+#else
+ return TagCheckNegative;
+#endif // __FreeBSD__
+
if (tag == "OSX")
#ifdef __APPLE__
return TagCheckAffirmative;

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/IconManager.cpp.orig 2024-01-12 13:38:59 UTC
--- src/slic3r/GUI/IconManager.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/IconManager.cpp
@@ -6,8 +6,8 @@
#include <boost/nowide/cstdio.hpp>
@ -6,8 +6,8 @@
#include <boost/algorithm/string.hpp>
-#include "nanosvg/nanosvg.h"
-#include "nanosvg/nanosvgrast.h"
+#include "libnanosvg/nanosvg.h"
+#include "libnanosvg/nanosvgrast.h"
+#include <libnanosvg/nanosvg.h>
+#include <libnanosvg/nanosvgrast.h>
#include "libslic3r/Utils.hpp" // ScopeGuard
#include "3DScene.hpp" // glsafe

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/ImGuiWrapper.cpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/GUI/ImGuiWrapper.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/ImGuiWrapper.cpp
@@ -40,8 +40,8 @@
#include "GUI_App.hpp"
@ -6,8 +6,8 @@
#include "../Utils/MacDarkMode.hpp"
-#include <nanosvg/nanosvg.h>
-#include <nanosvg/nanosvgrast.h>
+#include "libnanosvg/nanosvg.h"
+#include "libnanosvg/nanosvgrast.h"
+#include <libnanosvg/nanosvg.h>
+#include <libnanosvg/nanosvgrast.h>
// suggest location
#include "libslic3r/ClipperUtils.hpp" // Slic3r::intersection

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/InstanceCheck.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/InstanceCheck.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/InstanceCheck.cpp
@@ -27,7 +27,7 @@
#include <strsafe.h>
@ -9,7 +9,7 @@
#include <dbus/dbus.h> /* Pull in all of D-Bus headers. */
#endif //__linux__
@@ -229,7 +229,7 @@ namespace instance_check_internal
@@ -240,7 +240,7 @@ namespace instance_check_internal
return false;
}
@ -18,7 +18,7 @@
static bool send_message(const std::string &message_text, const std::string &version)
{
@@ -317,7 +317,7 @@ bool instance_check(int argc, char** argv, bool app_co
@@ -328,7 +328,7 @@ bool instance_check(int argc, char** argv, bool app_co
hashed_path = std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
#else
boost::system::error_code ec;

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/OptionsGroup.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/OptionsGroup.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/OptionsGroup.cpp
@@ -1215,7 +1215,7 @@ void ogStaticText::SetPathEnd(const std::string& link)
@@ -1216,7 +1216,7 @@ void ogStaticText::SetPathEnd(const std::string& link)
void ogStaticText::SetPathEnd(const std::string& link)
{
@ -9,7 +9,7 @@
Bind(wxEVT_ENTER_WINDOW, [this, link](wxMouseEvent& event) {
SetToolTip(OptionsGroup::get_url(get_app_config()->get("suppress_hyperlinks") != "1" ? link : std::string()));
@@ -1268,7 +1268,7 @@ void ogStaticText::FocusText(bool focus)
@@ -1269,7 +1269,7 @@ void ogStaticText::FocusText(bool focus)
SetFont(focus ? Slic3r::GUI::wxGetApp().link_font() :
Slic3r::GUI::wxGetApp().normal_font());

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/PhysicalPrinterDialog.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/PhysicalPrinterDialog.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/PhysicalPrinterDialog.cpp
@@ -606,7 +606,7 @@ void PhysicalPrinterDialog::build_printhost_settings(C
@@ -607,7 +607,7 @@ void PhysicalPrinterDialog::build_printhost_settings(C
// Always fill in the "printhost_port" combo box from the config and select it.
{
Choice* choice = dynamic_cast<Choice*>(m_optgroup->get_field("printhost_port"));

View File

@ -1,6 +1,15 @@
--- src/slic3r/GUI/Plater.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/Plater.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/Plater.cpp
@@ -1163,7 +1163,7 @@ std::vector<size_t> Plater::priv::load_files(const std
@@ -894,7 +894,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
auto open_external_login = [this](wxCommandEvent& evt){
DownloaderUtils::Worker::perform_url_register();
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__)
// Remove all desktop files registering prusaslicer:// url done by previous versions.
DesktopIntegrationDialog::undo_downloader_registration_rigid();
#if defined(SLIC3R_DESKTOP_INTEGRATION)
@@ -1201,7 +1201,7 @@ std::vector<size_t> Plater::priv::load_files(const std
// when loading a project file. However, creating the dialog on heap causes issues on macOS, where it does not
// appear at all. Therefore, we create the dialog on stack on Win and macOS, and on heap on Linux, which
// is the only system that needed the workarounds in the first place.
@ -9,7 +18,7 @@
auto progress_dlg = new wxProgressDialog(loading, "", 100, find_toplevel_parent(q), wxPD_APP_MODAL | wxPD_AUTO_HIDE);
Slic3r::ScopeGuard([&progress_dlg](){ if (progress_dlg) progress_dlg->Destroy(); progress_dlg = nullptr; });
#else
@@ -1218,7 +1218,7 @@ std::vector<size_t> Plater::priv::load_files(const std
@@ -1256,7 +1256,7 @@ std::vector<size_t> Plater::priv::load_files(const std
bool is_project_file = type_prusa;
try {
if (type_3mf || type_zip_amf) {
@ -18,7 +27,7 @@
// On Linux Constructor of the ProgressDialog calls DisableOtherWindows() function which causes a disabling of all children of the find_toplevel_parent(q)
// And a destructor of the ProgressDialog calls ReenableOtherWindows() function which revert previously disabled children.
// But if printer technology will be changes during project loading,
@@ -3171,7 +3171,7 @@ void Plater::priv::on_right_click(RBtnEvent& evt)
@@ -3225,7 +3225,7 @@ void Plater::priv::on_right_click(RBtnEvent& evt)
Vec2d mouse_position = evt.data.first;
wxPoint position(static_cast<int>(mouse_position.x()),
static_cast<int>(mouse_position.y()));
@ -27,7 +36,7 @@
// For some reason on Linux the menu isn't displayed if position is
// specified (even though the position is sane).
position = wxDefaultPosition;
@@ -4048,7 +4048,7 @@ void Plater::load_project(const wxString& filename)
@@ -4106,7 +4106,7 @@ void Plater::load_project(const wxString& filename)
p->reset();

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/Preferences.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/Preferences.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/Preferences.cpp
@@ -29,7 +29,7 @@
#ifdef WIN32
@ -9,7 +9,7 @@
#include "DesktopIntegrationDialog.hpp"
#endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
@@ -267,7 +267,7 @@ void PreferencesDialog::build()
@@ -270,7 +270,7 @@ void PreferencesDialog::build()
tabs = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME | wxNB_DEFAULT);
#else
tabs = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL |wxNB_NOPAGETHEME | wxNB_DEFAULT );
@ -18,7 +18,7 @@
tabs->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
e.Skip();
CallAfter([this]() { tabs->GetCurrentPage()->Layout(); });
@@ -752,7 +752,7 @@ void PreferencesDialog::accept(wxEvent&)
@@ -755,7 +755,7 @@ void PreferencesDialog::accept(wxEvent&)
downloader->allow(it->second == "1");
if (!downloader->on_finish())
return;
@ -27,7 +27,7 @@
if(DownloaderUtils::Worker::perform_registration_linux)
DesktopIntegrationDialog::perform_downloader_desktop_integration();
#endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
@@ -1111,7 +1111,7 @@ void PreferencesDialog::create_settings_font_widget()
@@ -1113,7 +1113,7 @@ void PreferencesDialog::create_settings_font_widget()
font_example->SetFont(font);
m_values[opt_key] = format("%1%", val);
stb_sizer->Layout();

View File

@ -0,0 +1,20 @@
--- src/slic3r/GUI/Search.cpp.orig 2024-10-15 09:09:17 UTC
+++ src/slic3r/GUI/Search.cpp
@@ -455,7 +455,7 @@ void OptionsSearcher::check_and_hide_dialog()
void OptionsSearcher::check_and_hide_dialog()
{
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
// Temporary linux specific workaround:
// has_focus(search_dialog) always returns false
// That's why search dialog will be hidden whole the time
@@ -531,7 +531,7 @@ void OptionsSearcher::process_key_down_from_input(wxKe
search_dialog->Hide();
else if (search_dialog && (key == WXK_UP || key == WXK_DOWN || key == WXK_NUMPAD_ENTER || key == WXK_RETURN)) {
search_dialog->KeyDown(e);
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
search_dialog->SetFocus();
#endif // __linux__
}

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/Tab.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/Tab.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/Tab.cpp
@@ -278,7 +278,7 @@ void Tab::create_preset_tab()
m_treectrl = new wxTreeCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(20 * m_em_unit, -1),
@ -18,7 +18,7 @@
// Events queue is opposite On Linux. wxEVT_SET_FOCUS invokes after wxEVT_TREE_SEL_CHANGED,
// and a result wxEVT_KILL_FOCUS doesn't invoke for the TextCtrls.
// see https://github.com/prusa3d/PrusaSlicer/issues/5720
@@ -4106,7 +4106,7 @@ bool Tab::tree_sel_change_delayed()
@@ -4143,7 +4143,7 @@ bool Tab::tree_sel_change_delayed()
// There is a bug related to Ubuntu overlay scrollbars, see https://github.com/prusa3d/PrusaSlicer/issues/898 and https://github.com/prusa3d/PrusaSlicer/issues/952.
// The issue apparently manifests when Show()ing a window with overlay scrollbars while the UI is frozen. For this reason,
// we will Thaw the UI prematurely on Linux. This means destroing the no_updates object prematurely.
@ -27,7 +27,7 @@
std::unique_ptr<wxWindowUpdateLocker> no_updates(new wxWindowUpdateLocker(this));
#else
/* On Windows we use DoubleBuffering during rendering,
@@ -4152,7 +4152,7 @@ bool Tab::tree_sel_change_delayed()
@@ -4189,7 +4189,7 @@ bool Tab::tree_sel_change_delayed()
if (wxGetApp().mainframe!=nullptr && wxGetApp().mainframe->is_active_and_shown_tab(this))
activate_selected_page(throw_if_canceled);

View File

@ -0,0 +1,11 @@
--- src/slic3r/GUI/TopBar.cpp.orig 2024-10-15 09:10:59 UTC
+++ src/slic3r/GUI/TopBar.cpp
@@ -52,7 +52,7 @@ TopBarItemsCtrl::Button::Button(wxWindow* parent, cons
Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& event) { set_hovered(false); event.Skip(); });
Bind(wxEVT_PAINT, [this](wxPaintEvent&) { render(); });
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
Bind(wxEVT_LEFT_UP, [this](wxMouseEvent& event) {
#else
Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& event) {

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/UnsavedChangesDialog.cpp.orig 2024-06-27 09:25:47 UTC
--- src/slic3r/GUI/UnsavedChangesDialog.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/UnsavedChangesDialog.cpp
@@ -31,7 +31,7 @@ using boost::optional;
@@ -32,7 +32,7 @@ using boost::optional;
using boost::optional;
@ -9,7 +9,7 @@
#define wxLinux true
#else
#define wxLinux false
@@ -111,7 +111,7 @@ ModelNode::ModelNode(ModelNode* parent, const wxString
@@ -112,7 +112,7 @@ ModelNode::ModelNode(ModelNode* parent, const wxString
UpdateIcons();
}
@ -18,7 +18,7 @@
wxIcon ModelNode::get_bitmap(const wxString& color)
#else
wxBitmap ModelNode::get_bitmap(const wxString& color)
@@ -120,7 +120,7 @@ wxBitmap ModelNode::get_bitmap(const wxString& color)
@@ -121,7 +121,7 @@ wxBitmap ModelNode::get_bitmap(const wxString& color)
wxBitmap bmp = get_solid_bmp_bundle(64, 16, into_u8(color))->GetBitmapFor(m_parent_win);
if (!m_toggle)
bmp = bmp.ConvertToDisabled();
@ -27,7 +27,7 @@
return bmp;
#else
wxIcon icon;
@@ -224,7 +224,7 @@ void ModelNode::UpdateIcons()
@@ -225,7 +225,7 @@ void ModelNode::UpdateIcons()
if (!m_toggle)
bmp = bmp.ConvertToDisabled();
@ -36,7 +36,7 @@
m_icon.CopyFromBitmap(bmp);
#else
m_icon = bmp;
@@ -376,7 +376,7 @@ void DiffModel::GetValue(wxVariant& variant, const wxD
@@ -377,7 +377,7 @@ void DiffModel::GetValue(wxVariant& variant, const wxD
case colToggle:
variant = node->m_toggle;
break;
@ -45,7 +45,7 @@
case colIconText:
variant << wxDataViewIconText(node->m_text, node->m_icon);
break;
@@ -419,7 +419,7 @@ bool DiffModel::SetValue(const wxVariant& variant, con
@@ -420,7 +420,7 @@ bool DiffModel::SetValue(const wxVariant& variant, con
case colToggle:
node->m_toggle = variant.GetBool();
return true;
@ -54,7 +54,7 @@
case colIconText: {
wxDataViewIconText data;
data << variant;
@@ -647,7 +647,7 @@ void DiffViewCtrl::AppendBmpTextColumn(const wxString&
@@ -648,7 +648,7 @@ void DiffViewCtrl::AppendBmpTextColumn(const wxString&
void DiffViewCtrl::AppendBmpTextColumn(const wxString& label, unsigned model_column, int width, bool set_expander/* = false*/)
{
m_columns_width.emplace(this->GetColumnCount(), width);

View File

@ -1,6 +1,6 @@
--- src/slic3r/GUI/UpdateDialogs.cpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/GUI/UpdateDialogs.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/UpdateDialogs.cpp
@@ -147,7 +147,7 @@ AppUpdateDownloadDialog::AppUpdateDownloadDialog( cons
@@ -153,7 +153,7 @@ AppUpdateDownloadDialog::AppUpdateDownloadDialog( cons
versions->Add(new wxStaticText(this, wxID_ANY, ver_online.to_string()));
content_sizer->Add(versions);
content_sizer->AddSpacer(VERT_SPACING);
@ -9,7 +9,7 @@
cbox_run = new wxCheckBox(this, wxID_ANY, _(L("Run installer after download. (Otherwise file explorer will be opened)")));
content_sizer->Add(cbox_run);
#endif
@@ -253,7 +253,7 @@ AppUpdateDownloadDialog::~AppUpdateDownloadDialog() {}
@@ -259,7 +259,7 @@ bool AppUpdateDownloadDialog::run_after_download() con
bool AppUpdateDownloadDialog::run_after_download() const
{

View File

@ -1,4 +1,4 @@
--- src/slic3r/GUI/UserAccountCommunication.cpp.orig 2024-07-03 10:33:48 UTC
--- src/slic3r/GUI/UserAccountCommunication.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/GUI/UserAccountCommunication.cpp
@@ -13,6 +13,7 @@
#include <boost/filesystem.hpp>
@ -35,7 +35,7 @@
load_refresh_token_linux(refresh_token);
#endif
}
@@ -253,7 +254,7 @@ void UserAccountCommunication::set_username(const std:
@@ -254,7 +255,7 @@ void UserAccountCommunication::set_username(const std:
save_secret("tokens", m_session->get_shared_session_key(), tokens);
}
else {

View File

@ -0,0 +1,11 @@
--- src/slic3r/GUI/WipeTowerDialog.cpp.orig 2024-10-15 09:12:21 UTC
+++ src/slic3r/GUI/WipeTowerDialog.cpp
@@ -379,7 +379,7 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::
int xpos = m_gridsizer_advanced->GetPosition().x;
if (!m_page_advanced->IsEnabled()) {
dc.SetTextForeground(wxSystemSettings::GetColour(
-#if defined (__linux__) && defined (__WXGTK2__)
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined (__WXGTK2__)
wxSYS_COLOUR_BTNTEXT
#else
wxSYS_COLOUR_GRAYTEXT

View File

@ -0,0 +1,11 @@
--- src/slic3r/Utils/AppUpdater.cpp.orig 2024-10-15 09:13:05 UTC
+++ src/slic3r/Utils/AppUpdater.cpp
@@ -156,7 +156,7 @@ AppUpdater::priv::priv() :
AppUpdater::priv::priv() :
m_cancel (false)
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
, m_default_dest_folder (boost::filesystem::path("/tmp"))
#else
, m_default_dest_folder (boost::filesystem::path(data_dir()) / "cache")

View File

@ -1,9 +1,9 @@
--- src/slic3r/Utils/FontConfigHelp.hpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/Utils/FontConfigHelp.hpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/Utils/FontConfigHelp.hpp
@@ -5,7 +5,7 @@
#ifndef slic3r_FontConfigHelp_hpp_
@@ -6,7 +6,7 @@
#define slic3r_FontConfigHelp_hpp_
#include <string>
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
#define EXIST_FONT_CONFIG_INCLUDE

View File

@ -1,6 +1,6 @@
--- src/slic3r/Utils/WxFontUtils.cpp.orig 2023-12-12 14:21:21 UTC
--- src/slic3r/Utils/WxFontUtils.cpp.orig 2024-09-18 13:39:04 UTC
+++ src/slic3r/Utils/WxFontUtils.cpp
@@ -12,7 +12,7 @@
@@ -19,7 +19,7 @@
#include <wx/uri.h>
#include <wx/fontutil.h> // wxNativeFontInfo
#include <wx/osx/core/cfdictionary.h>
@ -9,7 +9,7 @@
#include "slic3r/Utils/FontConfigHelp.hpp"
#endif
@@ -76,7 +76,7 @@ bool WxFontUtils::can_load(const wxFont &font)
@@ -83,7 +83,7 @@ bool WxFontUtils::can_load(const wxFont &font)
#elif defined(__APPLE__)
return true;
//return is_valid_ttf(get_file_path(font));
@ -18,7 +18,7 @@
return true;
// font config check file path take about 4000ms for chech them all
//std::string font_path = Slic3r::GUI::get_font_path(font);
@@ -97,7 +97,7 @@ std::unique_ptr<Emboss::FontFile> WxFontUtils::create_
@@ -104,7 +104,7 @@ std::unique_ptr<Emboss::FontFile> WxFontUtils::create_
return nullptr;
}
return Emboss::create_font_file(file_path.c_str());
@ -27,7 +27,7 @@
std::string font_path = Slic3r::GUI::get_font_path(font);
if (font_path.empty()){
BOOST_LOG_TRIVIAL(error) << "Can not read font('" << get_human_readable_name(font) << "'), "
@@ -118,7 +118,7 @@ EmbossStyle::Type WxFontUtils::get_current_type()
@@ -125,7 +125,7 @@ EmbossStyle::Type WxFontUtils::get_current_type()
return EmbossStyle::Type::wx_win_font_descr;
#elif defined(__APPLE__)
return EmbossStyle::Type::wx_mac_font_descr;
@ -36,10 +36,3 @@
return EmbossStyle::Type::wx_lin_font_descr;
#else
return EmbossStyle::Type::undefined;
@@ -351,4 +351,4 @@ std::unique_ptr<Emboss::FontFile> WxFontUtils::set_bol
// There is NO bold font by wx
font.SetWeight(orig_weight);
return nullptr;
-}
\ No newline at end of file
+}

View File

@ -1,6 +1,6 @@
--- tests/libslic3r/test_emboss.cpp.orig 2023-12-12 14:21:21 UTC
--- tests/libslic3r/test_emboss.cpp.orig 2024-09-18 13:39:04 UTC
+++ tests/libslic3r/test_emboss.cpp
@@ -195,7 +195,7 @@ TEST_CASE("Visualize glyph from font", "[Emboss]")
@@ -196,7 +196,7 @@ TEST_CASE("Visualize glyph from font", "[Emboss]")
#endif // VISUALIZE
#include "test_utils.hpp"