git: 9f755ee6243b - main - cad/PrusaSlicer: update to 2.8.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 Jul 2024 07:07:47 UTC
The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/ports/commit/?id=9f755ee6243b4c5117f8dfba8009e27086dd1d97 commit 9f755ee6243b4c5117f8dfba8009e27086dd1d97 Author: teodorsigaev@gmail.com <teodorsigaev@gmail.com> AuthorDate: 2024-07-07 17:31:34 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2024-07-09 07:07:35 +0000 cad/PrusaSlicer: update to 2.8.0 PR: 280112 Reported by: teodorsigaev@gmail.com (maintainer) --- cad/PrusaSlicer/Makefile | 5 +-- cad/PrusaSlicer/distinfo | 6 +-- cad/PrusaSlicer/files/patch-CMakeLists.txt | 19 +++------ cad/PrusaSlicer/files/patch-src_CMakeLists.txt | 8 ++-- .../files/patch-src_libslic3r_CMakeLists.txt | 4 +- .../patch-src_libslic3r_Utils_DirectoriesUtils.cpp | 19 +++++++++ .../files/patch-src_slic3r_CMakeLists.txt | 13 +++--- .../files/patch-src_slic3r_GUI_ConfigWizard.cpp | 23 ++++------- .../files/patch-src_slic3r_GUI_ConfigWizard.hpp | 17 ++------ .../files/patch-src_slic3r_GUI_GLCanvas3D.cpp | 4 +- cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.cpp | 6 +-- cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.hpp | 4 +- .../files/patch-src_slic3r_GUI_GUI__App.cpp | 48 +++++++++++----------- .../files/patch-src_slic3r_GUI_GUI__Factories.cpp | 4 +- .../files/patch-src_slic3r_GUI_GUI__Preview.cpp | 28 ------------- .../files/patch-src_slic3r_GUI_GUI__Preview.hpp | 11 ----- .../patch-src_slic3r_GUI_Gizmos_GLGizmoSVG.cpp | 4 +- .../files/patch-src_slic3r_GUI_InstanceCheck.cpp | 6 +-- .../files/patch-src_slic3r_GUI_OpenGLManager.cpp | 10 ++--- .../files/patch-src_slic3r_GUI_OptionsGroup.cpp | 6 +-- .../patch-src_slic3r_GUI_PhysicalPrinterDialog.cpp | 4 +- .../files/patch-src_slic3r_GUI_Plater.cpp | 10 ++--- .../files/patch-src_slic3r_GUI_Preferences.cpp | 26 ++++++++++-- .../patch-src_slic3r_GUI_PresetComboBoxes.cpp | 4 +- .../patch-src_slic3r_GUI_PresetComboBoxes.hpp | 4 +- .../patch-src_slic3r_GUI_RemovableDriveManager.cpp | 4 +- cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp | 28 +++---------- .../patch-src_slic3r_GUI_UnsavedChangesDialog.cpp | 16 ++++---- .../patch-src_slic3r_GUI_UnsavedChangesDialog.hpp | 6 +-- ...tch-src_slic3r_GUI_UserAccountCommunication.cpp | 46 +++++++++++++++++++++ .../files/patch-src_slic3r_GUI_wxExtensions.cpp | 29 ++++++------- .../files/patch-src_slic3r_GUI_wxExtensions.hpp | 6 +-- .../files/patch-src_slic3r_Utils_WifiScanner.cpp | 5 +-- 33 files changed, 213 insertions(+), 220 deletions(-) diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile index e5c9adc945e1..c4421d01825e 100644 --- a/cad/PrusaSlicer/Makefile +++ b/cad/PrusaSlicer/Makefile @@ -1,7 +1,6 @@ PORTNAME= PrusaSlicer DISTVERSIONPREFIX=version_ -DISTVERSION= 2.7.4 -PORTREVISION= 3 +DISTVERSION= 2.8.0 CATEGORIES= cad DIST_SUBDIR= PrusaSlicer @@ -15,7 +14,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= cereal>=1.3.0.10:devel/cereal \ cgal>=5.0.2:math/cgal \ opencascade>=7.7.0:cad/opencascade \ - libbgcode>=0.2.0:cad/libbgcode + libbgcode>=0.2.0_1:cad/libbgcode LIB_DEPENDS+= libbgcode_convert.so:cad/libbgcode \ libbgcode_binarize.so:cad/libbgcode \ diff --git a/cad/PrusaSlicer/distinfo b/cad/PrusaSlicer/distinfo index 1b16531420b3..59cb1f3b0a83 100644 --- a/cad/PrusaSlicer/distinfo +++ b/cad/PrusaSlicer/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1712342295 -SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.4_GH0.tar.gz) = 6370a9593aeac5c56543e66d167ab5fd053df55b9376392c2d6184eb0bf65fc8 -SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.4_GH0.tar.gz) = 65396083 +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 diff --git a/cad/PrusaSlicer/files/patch-CMakeLists.txt b/cad/PrusaSlicer/files/patch-CMakeLists.txt index bb479cff34f2..44016fce0aca 100644 --- a/cad/PrusaSlicer/files/patch-CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2024-02-29 13:03:32 UTC +--- CMakeLists.txt.orig 2024-06-27 09:25:47 UTC +++ CMakeLists.txt @@ -14,6 +14,7 @@ include(CMakeDependentOption) include("version.inc") @@ -8,7 +8,7 @@ set(SLIC3R_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources") file(TO_NATIVE_PATH "${SLIC3R_RESOURCES_DIR}" SLIC3R_RESOURCES_DIR_WIN) -@@ -218,7 +219,7 @@ endif () +@@ -234,7 +235,7 @@ endif () endif () endif () @@ -17,7 +17,7 @@ find_package(PkgConfig REQUIRED) if (CMAKE_VERSION VERSION_LESS "3.1") -@@ -248,6 +249,8 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL +@@ -264,6 +265,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,16 +26,7 @@ # 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) -@@ -457,7 +460,7 @@ find_package(EXPAT REQUIRED) - # no matter what. - find_package(EXPAT REQUIRED) - --add_library(libexpat INTERFACE) -+# add_library(libexpat INTERFACE) - - if (TARGET EXPAT::EXPAT ) - target_link_libraries(libexpat INTERFACE EXPAT::EXPAT) -@@ -631,8 +634,8 @@ elseif (SLIC3R_FHS) +@@ -648,8 +651,8 @@ elseif (SLIC3R_FHS) install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES} PATTERN "*/udev" EXCLUDE ) @@ -46,7 +37,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 -@@ -641,7 +644,8 @@ elseif (SLIC3R_FHS) +@@ -658,7 +661,8 @@ elseif (SLIC3R_FHS) DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer-gcodeviewer.png ) endforeach() diff --git a/cad/PrusaSlicer/files/patch-src_CMakeLists.txt b/cad/PrusaSlicer/files/patch-src_CMakeLists.txt index 77880e102ea7..7d4b3ff67350 100644 --- a/cad/PrusaSlicer/files/patch-src_CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-src_CMakeLists.txt @@ -1,15 +1,15 @@ ---- src/CMakeLists.txt.orig 2023-12-12 14:21:21 UTC +--- src/CMakeLists.txt.orig 2024-06-27 09:25:47 UTC +++ src/CMakeLists.txt -@@ -62,7 +62,7 @@ if (SLIC3R_GUI) +@@ -60,7 +60,7 @@ if (SLIC3R_GUI) + endif() find_package(JPEG MODULE QUIET) - find_package(TIFF MODULE QUIET) # Tiff exported config is broken for static build - find_package(NanoSVG REQUIRED) + #find_package(NanoSVG REQUIRED) string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES}) if (PNG_FOUND AND NOT WX_PNG_BUILTIN) -@@ -131,7 +131,7 @@ if (NOT WIN32 AND NOT APPLE) +@@ -123,7 +123,7 @@ endif () set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer") endif () diff --git a/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt b/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt index a9e06edfca78..770fb44cf65a 100644 --- a/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt @@ -1,6 +1,6 @@ ---- src/libslic3r/CMakeLists.txt.orig 2024-04-05 09:25:31 UTC +--- src/libslic3r/CMakeLists.txt.orig 2024-06-27 09:25:47 UTC +++ src/libslic3r/CMakeLists.txt -@@ -576,7 +576,6 @@ target_link_libraries(libslic3r +@@ -611,7 +611,6 @@ target_link_libraries(libslic3r target_link_libraries(libslic3r libnest2d admesh diff --git a/cad/PrusaSlicer/files/patch-src_libslic3r_Utils_DirectoriesUtils.cpp b/cad/PrusaSlicer/files/patch-src_libslic3r_Utils_DirectoriesUtils.cpp new file mode 100644 index 000000000000..bfe21a052f4d --- /dev/null +++ b/cad/PrusaSlicer/files/patch-src_libslic3r_Utils_DirectoriesUtils.cpp @@ -0,0 +1,19 @@ +--- src/libslic3r/Utils/DirectoriesUtils.cpp.orig 2024-07-03 10:13:37 UTC ++++ src/libslic3r/Utils/DirectoriesUtils.cpp +@@ -3,6 +3,7 @@ + + #include <boost/filesystem/path.hpp> + #include <boost/log/trivial.hpp> ++#include <boost/nowide/convert.hpp> + + #if defined(_WIN32) + +@@ -46,7 +47,7 @@ static std::string GetDataDir() + return boost::nowide::narrow(buffer); + } + +-#elif defined(__linux__) ++#elif (defined(__linux__) || defined(__FreeBSD__)) + + #include <stdlib.h> + #include <pwd.h> diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_CMakeLists.txt b/cad/PrusaSlicer/files/patch-src_slic3r_CMakeLists.txt index 7c735f83f9d0..5f0492369639 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-src_slic3r_CMakeLists.txt @@ -1,7 +1,7 @@ ---- src/slic3r/CMakeLists.txt.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/CMakeLists.txt.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/CMakeLists.txt -@@ -333,7 +333,7 @@ set(SLIC3R_GUI_SOURCES - Utils/WifiScanner.cpp +@@ -375,7 +375,7 @@ set(SLIC3R_GUI_SOURCES + Utils/PrusaConnect.cpp ) -find_package(NanoSVG REQUIRED) @@ -9,13 +9,12 @@ if (APPLE) list(APPEND SLIC3R_GUI_SOURCES -@@ -362,11 +362,12 @@ endforeach() +@@ -404,11 +404,11 @@ encoding_check(libslic3r_gui) encoding_check(libslic3r_gui) --target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast) -+# target_link_libraries(libslic3r_gui libslic3r avrdude imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast) -+target_link_libraries(libslic3r_gui libslic3r avrdude imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES}) +-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 crypto ${wxWidgets_LIBRARIES}) if (MSVC) target_link_libraries(libslic3r_gui Setupapi.lib) diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp index 17e0bdf7b75c..17e8a257528d 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp @@ -1,15 +1,6 @@ ---- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-04-05 09:25:31 UTC +--- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/ConfigWizard.cpp -@@ -69,7 +69,7 @@ - #include "slic3r/GUI/I18N.hpp" - #include "slic3r/Config/Version.hpp" - --#if defined(__linux__) && defined(__WXGTK3__) -+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__WXGTK3__) - #define wxLinux_gtk3 true - #else - #define wxLinux_gtk3 false -@@ -596,7 +596,7 @@ void PageWelcome::set_run_reason(ConfigWizard::RunReas +@@ -638,7 +638,7 @@ void PageWelcome::set_run_reason(ConfigWizard::RunReas const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY; welcome_text->Show(data_empty); cbox_reset->Show(!data_empty); @@ -18,7 +9,7 @@ if (!DesktopIntegrationDialog::is_integrated()) cbox_integrate->Show(true); else -@@ -1518,7 +1518,7 @@ PageDownloader::PageDownloader(ConfigWizard* parent) +@@ -1696,7 +1696,7 @@ PageDownloader::PageDownloader(ConfigWizard* parent) )); } @@ -27,7 +18,7 @@ append_text(wxString::Format(_L( "On Linux systems the process of registration also creates desktop integration files for this version of application." ))); -@@ -1579,7 +1579,7 @@ bool DownloaderUtils::Worker::perform_register(const s +@@ -1759,7 +1759,7 @@ bool DownloaderUtils::Worker::perform_register(const s } //key_full = "\"C:\\Program Files\\Prusa3D\\PrusaSlicer\\prusa-slicer-console.exe\" \"%1\""; key_full = key_string; @@ -36,7 +27,7 @@ // 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) -@@ -1598,7 +1598,7 @@ void DownloaderUtils::Worker::deregister() +@@ -1778,7 +1778,7 @@ void DownloaderUtils::Worker::deregister() return; } key_full = key_string; @@ -45,12 +36,12 @@ // TODO #elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) BOOST_LOG_TRIVIAL(debug) << "DesktopIntegrationDialog::undo_downloader_registration"; -@@ -3063,7 +3063,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_c +@@ -3422,7 +3422,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()); -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) // Desktop integration on Linux - BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << page_downloader->m_downloader->get_perform_registration_linux(); + BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << DownloaderUtils::Worker::perform_registration_linux; if (page_welcome->integrate_desktop()) diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.hpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.hpp index 5f9a904024cc..49df66adfe4d 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.hpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.hpp @@ -1,20 +1,11 @@ ---- src/slic3r/GUI/ConfigWizard.hpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/ConfigWizard.hpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/ConfigWizard.hpp -@@ -31,7 +31,7 @@ namespace DownloaderUtils { - wxWindow* m_parent{ nullptr }; - wxTextCtrl* m_input_path{ nullptr }; - bool downloader_checked{ false }; --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - bool perform_registration_linux{ false }; - #endif // __linux__ - -@@ -50,7 +50,7 @@ namespace DownloaderUtils { +@@ -53,7 +53,7 @@ namespace DownloaderUtils { bool on_finish(); - bool perform_register(const std::string& path_override = {}); + static bool perform_register(const std::string& path); -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) - bool get_perform_registration_linux() { return perform_registration_linux; } + static bool perform_registration_linux; #endif // __linux__ }; diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp index 4ecbcc7e72b3..840d7463283b 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/GLCanvas3D.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/GLCanvas3D.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/GLCanvas3D.cpp -@@ -108,7 +108,7 @@ float RetinaHelper::get_scale_factor() { return float( +@@ -104,7 +104,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. diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.cpp index a96b1e1d5d24..110e5c8a49be 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/GUI.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/GUI.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/GUI.cpp -@@ -492,7 +492,7 @@ void desktop_open_folder(const boost::filesystem::path +@@ -296,7 +296,7 @@ void desktop_open_folder(const boost::filesystem::path const wxString widepath = path.wstring(); const wchar_t* argv[] = { L"explorer", widepath.GetData(), nullptr }; ::wxExecute(const_cast<wchar_t**>(argv), wxEXEC_ASYNC, nullptr); @@ -9,7 +9,7 @@ const char* argv[] = { "open", path.string().c_str(), nullptr }; ::wxExecute(const_cast<char**>(argv), wxEXEC_ASYNC, nullptr); #else -@@ -501,7 +501,7 @@ void desktop_open_folder(const boost::filesystem::path +@@ -305,7 +305,7 @@ void desktop_open_folder(const boost::filesystem::path #endif } diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.hpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.hpp index 14508a97158c..e1da3491b81c 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.hpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI.hpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/GUI.hpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/GUI.hpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/GUI.hpp -@@ -88,7 +88,7 @@ void desktop_open_folder(const boost::filesystem::path +@@ -74,7 +74,7 @@ void desktop_open_folder(const boost::filesystem::path // Ask the destop to open the directory specified by path using the default file explorer. void desktop_open_folder(const boost::filesystem::path& path); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp index 3066068410c9..c50a678ec045 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/GUI_App.cpp.orig 2024-04-05 09:25:31 UTC +--- src/slic3r/GUI/GUI_App.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/GUI_App.cpp -@@ -403,7 +403,7 @@ class SplashScreen : public wxSplashScreen (private) +@@ -411,7 +411,7 @@ class SplashScreen : public wxSplashScreen (private) }; @@ -9,16 +9,7 @@ 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, -@@ -937,7 +937,7 @@ void GUI_App::init_app_config() - // Mac : "~/Library/Application Support/Slic3r" - - if (data_dir().empty()) { -- #ifndef __linux__ -+ #if !defined(__linux__) && !defined(__FreeBSD__) - set_data_dir(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data()); - #else - // Since version 2.3, config dir on Linux is in ${XDG_CONFIG_HOME}. -@@ -1107,7 +1107,8 @@ bool GUI_App::on_init_inner() +@@ -1254,7 +1254,8 @@ bool GUI_App::on_init_inner() // Set initialization of image handlers before any UI actions - See GH issue #7469 wxInitAllImageHandlers(); @@ -28,7 +19,7 @@ #if defined(_WIN32) && ! defined(_WIN64) // Win32 32bit build. if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") { -@@ -1135,7 +1136,7 @@ bool GUI_App::on_init_inner() +@@ -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)); @@ -37,7 +28,7 @@ if (! check_old_linux_datadir(GetAppName())) { std::cerr << "Quitting, user chose to move their data to new location." << std::endl; return false; -@@ -1240,7 +1241,7 @@ bool GUI_App::on_init_inner() +@@ -1387,7 +1388,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"); @@ -46,7 +37,7 @@ wxYield(); #endif scrn->SetText(_L("Loading configuration")+ dots); -@@ -1393,7 +1394,7 @@ bool GUI_App::on_init_inner() +@@ -1546,7 +1547,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. @@ -55,7 +46,7 @@ if (!m_post_initialized && m_opengl_initialized) { #else if (!m_post_initialized) { -@@ -2096,7 +2097,7 @@ bool GUI_App::switch_language() +@@ -2236,7 +2237,7 @@ bool GUI_App::switch_language() } } @@ -64,7 +55,7 @@ static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language, const wxLanguageInfo* system_language) { -@@ -2298,7 +2299,7 @@ bool GUI_App::load_language(wxString language, bool in +@@ -2438,7 +2439,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(); } @@ -73,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. -@@ -2307,6 +2308,7 @@ bool GUI_App::load_language(wxString language, bool in +@@ -2447,6 +2448,7 @@ bool GUI_App::load_language(wxString language, bool in } #endif } @@ -81,7 +72,7 @@ } const wxLanguageInfo *language_info = language.empty() ? nullptr : wxLocale::FindLanguageInfo(language); -@@ -2351,7 +2353,7 @@ bool GUI_App::load_language(wxString language, bool in +@@ -2491,7 +2493,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; @@ -90,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)) { -@@ -2471,7 +2473,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu) +@@ -2612,7 +2614,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")); @@ -99,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) -@@ -2519,7 +2521,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu) +@@ -2646,7 +2648,7 @@ wxMenu* GUI_App::get_config_menu(MainFrame* main_frame case ConfigMenuUpdateApp: app_version_check(true); break; @@ -108,7 +99,7 @@ case ConfigMenuDesktopIntegration: show_desktop_integration_dialog(); break; -@@ -3149,7 +3151,7 @@ void GUI_App::show_desktop_integration_dialog() +@@ -3318,7 +3320,7 @@ void GUI_App::show_desktop_integration_dialog() void GUI_App::show_desktop_integration_dialog() { @@ -117,12 +108,21 @@ //wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null"); DesktopIntegrationDialog dialog(mainframe); dialog.ShowModal(); -@@ -3169,7 +3171,7 @@ void GUI_App::show_downloader_registration_dialog() +@@ -3338,7 +3340,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")); -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) - if (downloader_worker->get_perform_registration_linux()) + 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) + return; + } + +- #if defined(__APPLE__) || (defined(__linux__) && !defined(SLIC3R_DESKTOP_INTEGRATION)) ++ #if defined(__APPLE__) || ((defined(__linux__) || defined(__FreeBSD__)) && !defined(SLIC3R_DESKTOP_INTEGRATION)) + if (app_config && !app_config->get_bool("downloader_url_registered")) + { + notification_manager()->push_notification(NotificationType::URLNotRegistered); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Factories.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Factories.cpp index e01c2f0640e2..154c16db480b 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Factories.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Factories.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/GUI_Factories.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/GUI_Factories.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/GUI_Factories.cpp -@@ -1466,7 +1466,7 @@ void MenuFactory::sys_color_changed(wxMenuBar* menubar +@@ -1499,7 +1499,7 @@ void MenuFactory::sys_color_changed(wxMenuBar* menubar for (size_t id = 0; id < menubar->GetMenuCount(); id++) { wxMenu* menu = menubar->GetMenu(id); sys_color_changed_menu(menu); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Preview.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Preview.cpp deleted file mode 100644 index ccb810cac91d..000000000000 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Preview.cpp +++ /dev/null @@ -1,28 +0,0 @@ ---- src/slic3r/GUI/GUI_Preview.cpp.orig 2023-12-12 14:21:21 UTC -+++ src/slic3r/GUI/GUI_Preview.cpp -@@ -303,7 +303,7 @@ void Preview::load_print(bool keep_z_range) - - void Preview::reload_print(bool keep_volumes) - { --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - // We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955. - // So we are applying a workaround here: a delayed release of OpenGL vertex buffers. - if (!IsShown()) -@@ -313,14 +313,14 @@ void Preview::reload_print(bool keep_volumes) - } - #endif /* __linux__ */ - if ( --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - m_volumes_cleanup_required || - #endif /* __linux__ */ - !keep_volumes) - { - m_canvas->reset_volumes(); - m_loaded = false; --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - m_volumes_cleanup_required = false; - #endif /* __linux__ */ - } diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Preview.hpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Preview.hpp deleted file mode 100644 index b7b873574480..000000000000 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__Preview.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/slic3r/GUI/GUI_Preview.hpp.orig 2023-12-12 14:21:21 UTC -+++ src/slic3r/GUI/GUI_Preview.hpp -@@ -89,7 +89,7 @@ class Preview : public wxPanel - BackgroundSlicingProcess* m_process; - GCodeProcessorResult* m_gcode_result; - --#ifdef __linux__ -+#if defined(__linux__) || defined(__FreeBSD__) - // We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955. - // So we are applying a workaround here. - bool m_volumes_cleanup_required { false }; diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Gizmos_GLGizmoSVG.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Gizmos_GLGizmoSVG.cpp index cd2d110666ac..96d559c54334 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Gizmos_GLGizmoSVG.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Gizmos_GLGizmoSVG.cpp @@ -1,4 +1,4 @@ ---- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp @@ -23,7 +23,7 @@ #include "libslic3r/ClipperUtils.hpp" // union_ex @@ -9,7 +9,7 @@ #include <wx/display.h> // detection of change DPI #include <boost/log/trivial.hpp> -@@ -560,7 +560,7 @@ void GLGizmoSVG::on_dragging(const UpdateData &data) { +@@ -587,7 +587,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" diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_InstanceCheck.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_InstanceCheck.cpp index fed8953a3700..2d4aad87e7d2 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_InstanceCheck.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_InstanceCheck.cpp @@ -1,4 +1,4 @@ ---- src/slic3r/GUI/InstanceCheck.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/InstanceCheck.cpp.orig 2024-06-27 09:25:47 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__ -@@ -226,7 +226,7 @@ namespace instance_check_internal +@@ -229,7 +229,7 @@ namespace instance_check_internal return false; } @@ -18,7 +18,7 @@ static bool send_message(const std::string &message_text, const std::string &version) { -@@ -314,7 +314,7 @@ bool instance_check(int argc, char** argv, bool app_co +@@ -317,7 +317,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; diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OpenGLManager.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OpenGLManager.cpp index 00ce74a6c7e2..d83b04d46975 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OpenGLManager.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OpenGLManager.cpp @@ -1,9 +1,9 @@ ---- src/slic3r/GUI/OpenGLManager.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/OpenGLManager.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/OpenGLManager.cpp -@@ -344,7 +344,7 @@ bool OpenGLManager::init_gl() - glewExperimental = true; - #endif // ENABLE_GL_CORE_PROFILE || ENABLE_OPENGL_ES - GLenum err = glewInit(); +@@ -346,7 +346,7 @@ bool OpenGLManager::init_gl() + if (!m_gl_initialized) { + glewExperimental = true; + GLenum err = glewInit(); - if (err != GLEW_OK) { + if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) { BOOST_LOG_TRIVIAL(error) << "Unable to init glew library: " << glewGetErrorString(err); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OptionsGroup.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OptionsGroup.cpp index 9ee01d7c0472..61172494d9be 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OptionsGroup.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_OptionsGroup.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/OptionsGroup.cpp.orig 2024-02-29 13:03:32 UTC +--- src/slic3r/GUI/OptionsGroup.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/OptionsGroup.cpp -@@ -1081,7 +1081,7 @@ void ogStaticText::SetPathEnd(const std::string& link) +@@ -1215,7 +1215,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())); -@@ -1134,7 +1134,7 @@ void ogStaticText::FocusText(bool focus) +@@ -1268,7 +1268,7 @@ void ogStaticText::FocusText(bool focus) SetFont(focus ? Slic3r::GUI::wxGetApp().link_font() : Slic3r::GUI::wxGetApp().normal_font()); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PhysicalPrinterDialog.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PhysicalPrinterDialog.cpp index 05ce935c25d4..45dc17baa3c2 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PhysicalPrinterDialog.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PhysicalPrinterDialog.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/PhysicalPrinterDialog.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/PhysicalPrinterDialog.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/PhysicalPrinterDialog.cpp -@@ -467,7 +467,7 @@ void PhysicalPrinterDialog::build_printhost_settings(C +@@ -606,7 +606,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")); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp index ca035e9a15a2..466c87ed88bd 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Plater.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/Plater.cpp.orig 2024-04-05 09:25:31 UTC +--- src/slic3r/GUI/Plater.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/Plater.cpp -@@ -2558,7 +2558,7 @@ std::vector<size_t> Plater::priv::load_files(const std +@@ -1163,7 +1163,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 +9,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 -@@ -2605,7 +2605,7 @@ std::vector<size_t> Plater::priv::load_files(const std +@@ -1218,7 +1218,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 +18,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, -@@ -4575,7 +4575,7 @@ void Plater::priv::on_right_click(RBtnEvent& evt) +@@ -3171,7 +3171,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 +27,7 @@ // For some reason on Linux the menu isn't displayed if position is // specified (even though the position is sane). position = wxDefaultPosition; -@@ -5428,7 +5428,7 @@ void Plater::load_project(const wxString& filename) +@@ -4048,7 +4048,7 @@ void Plater::load_project(const wxString& filename) p->reset(); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp index 07094d21f323..7dac66e12ce6 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/Preferences.cpp.orig 2024-04-05 09:25:31 UTC +--- src/slic3r/GUI/Preferences.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/Preferences.cpp -@@ -28,7 +28,7 @@ +@@ -29,7 +29,7 @@ #ifdef WIN32 #include <wx/msw/registry.h> #endif // WIN32 @@ -9,12 +9,30 @@ #include "DesktopIntegrationDialog.hpp" #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) -@@ -758,7 +758,7 @@ void PreferencesDialog::accept(wxEvent&) +@@ -267,7 +267,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 ); +-#ifdef __linux__ ++#if defined __linux__ || defined __FreeBSD__ + tabs->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) { + e.Skip(); + CallAfter([this]() { tabs->GetCurrentPage()->Layout(); }); +@@ -752,7 +752,7 @@ void PreferencesDialog::accept(wxEvent&) downloader->allow(it->second == "1"); if (!downloader->on_finish()) return; -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) +#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) - if( downloader->get_perform_registration_linux()) + 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() + font_example->SetFont(font); + m_values[opt_key] = format("%1%", val); + stb_sizer->Layout(); +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + CallAfter([this]() { refresh_og(m_optgroup_other); }); + #else + refresh_og(m_optgroup_other); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.cpp index ff382585785b..df5098cb98f3 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/PresetComboBoxes.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/PresetComboBoxes.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/PresetComboBoxes.cpp -@@ -787,7 +787,7 @@ void PlaterPresetComboBox::show_edit_menu() +@@ -882,7 +882,7 @@ void PlaterPresetComboBox::show_edit_menu() [this](wxCommandEvent&) { this->switch_to_tab(); }, "cog", menu, []() { return true; }, wxGetApp().plater()); if (m_type == Preset::TYPE_FILAMENT) { diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.hpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.hpp index d0b0a9e05a45..073246d91eaf 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.hpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_PresetComboBoxes.hpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/PresetComboBoxes.hpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/PresetComboBoxes.hpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/PresetComboBoxes.hpp -@@ -119,7 +119,7 @@ class PresetComboBox : public BitmapComboBox (protecte +@@ -129,7 +129,7 @@ class PresetComboBox : public BitmapComboBox (protecte void validate_selection(bool predicate = false); void update_selection(); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_RemovableDriveManager.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_RemovableDriveManager.cpp index 2cdbdc481fb1..6491a415a688 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_RemovableDriveManager.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_RemovableDriveManager.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/RemovableDriveManager.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/RemovableDriveManager.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/RemovableDriveManager.cpp -@@ -744,7 +744,7 @@ namespace search_for_drives_internal +@@ -743,7 +743,7 @@ namespace search_for_drives_internal //confirms if the file is removable drive and adds it to vector if ( diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp index 48846a70ff5a..5018b0d09b12 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Tab.cpp @@ -1,15 +1,6 @@ ---- src/slic3r/GUI/Tab.cpp.orig 2024-04-05 09:25:31 UTC +--- src/slic3r/GUI/Tab.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/Tab.cpp -@@ -279,7 +279,7 @@ void Tab::create_preset_tab() - // Don't set the 2nd parameter to 1, making the sizer rubbery scalable in Y axis may lead - // to wrong vertical size assigned to wxBitmapComboBoxes, see GH issue #7176. - mode_sizer->Add(m_mode_sizer, 0, wxALIGN_RIGHT); -- m_top_hsizer->Add(mode_sizer, 1, wxALIGN_CENTER_VERTICAL | wxRIGHT, wxOSX ? 15 : 10); -+ m_top_hsizer->Add(mode_sizer, 1, wxRIGHT, wxOSX ? 15 : 10); - } - // hide whole top sizer to correct layout later - m_top_hsizer->ShowItems(false); -@@ -296,7 +296,7 @@ void Tab::create_preset_tab() +@@ -278,7 +278,7 @@ void Tab::create_preset_tab() m_treectrl = new wxTreeCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(20 * m_em_unit, -1), wxTR_NO_BUTTONS | wxTR_HIDE_ROOT | wxTR_SINGLE | wxTR_NO_LINES | wxBORDER_SUNKEN | wxWANTS_CHARS); m_treectrl->SetFont(wxGetApp().normal_font()); @@ -18,7 +9,7 @@ m_treectrl->SetBackgroundColour(m_parent->GetBackgroundColour()); #endif m_left_sizer->Add(m_treectrl, 1, wxEXPAND); -@@ -310,7 +310,7 @@ void Tab::create_preset_tab() +@@ -292,7 +292,7 @@ void Tab::create_preset_tab() // This helps to process all the cursor key events on Windows in the tree control, // so that the cursor jumps to the last item. m_treectrl->Bind(wxEVT_TREE_SEL_CHANGED, [this](wxTreeEvent&) { @@ -27,16 +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 -@@ -3700,7 +3700,7 @@ void Tab::load_current_preset() - else - #endif - wxGetApp().tab_panel()->InsertPage(wxGetApp().tab_panel()->FindPage(this), tab, tab->title()); -- #ifdef __linux__ // the tabs apparently need to be explicitly shown on Linux (pull request #1563) -+ #if defined(__linux__) || defined(__FreeBSD__) // the tabs apparently need to be explicitly shown on Linux (pull request #1563) - int page_id = wxGetApp().tab_panel()->FindPage(tab); - wxGetApp().tab_panel()->GetPage(page_id)->Show(true); - #endif // __linux__ -@@ -4121,7 +4121,7 @@ bool Tab::tree_sel_change_delayed() +@@ -4106,7 +4106,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. @@ -45,7 +27,7 @@ std::unique_ptr<wxWindowUpdateLocker> no_updates(new wxWindowUpdateLocker(this)); #else /* On Windows we use DoubleBuffering during rendering, -@@ -4167,7 +4167,7 @@ bool Tab::tree_sel_change_delayed() +@@ -4152,7 +4152,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); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.cpp index d28669d7397e..87d421aee3f3 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.cpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/UnsavedChangesDialog.cpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/UnsavedChangesDialog.cpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/UnsavedChangesDialog.cpp -@@ -31,7 +31,7 @@ +@@ -31,7 +31,7 @@ using boost::optional; using boost::optional; @@ -9,7 +9,7 @@ #define wxLinux true #else #define wxLinux false -@@ -115,7 +115,7 @@ ModelNode::ModelNode(ModelNode* parent, const wxString +@@ -111,7 +111,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) -@@ -124,7 +124,7 @@ wxBitmap ModelNode::get_bitmap(const wxString& color) +@@ -120,7 +120,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; -@@ -228,7 +228,7 @@ void ModelNode::UpdateIcons() +@@ -224,7 +224,7 @@ void ModelNode::UpdateIcons() if (!m_toggle) bmp = bmp.ConvertToDisabled(); @@ -36,7 +36,7 @@ m_icon.CopyFromBitmap(bmp); #else m_icon = bmp; -@@ -380,7 +380,7 @@ void DiffModel::GetValue(wxVariant& variant, const wxD +@@ -376,7 +376,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; -@@ -423,7 +423,7 @@ bool DiffModel::SetValue(const wxVariant& variant, con +@@ -419,7 +419,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; -@@ -628,7 +628,7 @@ DiffViewCtrl::DiffViewCtrl(wxWindow* parent, wxSize si +@@ -647,7 +647,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); diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.hpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.hpp index 51987b4dfcfc..8d783eb5ed2d 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.hpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UnsavedChangesDialog.hpp @@ -1,6 +1,6 @@ ---- src/slic3r/GUI/UnsavedChangesDialog.hpp.orig 2023-12-12 14:21:21 UTC +--- src/slic3r/GUI/UnsavedChangesDialog.hpp.orig 2024-06-27 09:25:47 UTC +++ src/slic3r/GUI/UnsavedChangesDialog.hpp -@@ -52,7 +52,7 @@ class ModelNode +@@ -49,7 +49,7 @@ class ModelNode wxString m_mod_color; wxString m_new_color; @@ -9,7 +9,7 @@ wxIcon get_bitmap(const wxString& color); #else wxBitmap get_bitmap(const wxString& color); -@@ -61,7 +61,7 @@ class ModelNode +@@ -58,7 +58,7 @@ class ModelNode public: bool m_toggle {true}; diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UserAccountCommunication.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UserAccountCommunication.cpp new file mode 100644 index 000000000000..e92da0515b48 --- /dev/null +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_UserAccountCommunication.cpp @@ -0,0 +1,46 @@ +--- src/slic3r/GUI/UserAccountCommunication.cpp.orig 2024-07-03 10:33:48 UTC ++++ src/slic3r/GUI/UserAccountCommunication.cpp +@@ -13,6 +13,7 @@ + #include <boost/filesystem.hpp> + #include <boost/nowide/cstdio.hpp> + #include <boost/nowide/fstream.hpp> ++#include <boost/nowide/convert.hpp> + #include <curl/curl.h> + #include <string> + +@@ -37,7 +38,7 @@ + #include <CommonCrypto/CommonDigest.h> + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + #include <openssl/evp.h> + #include <openssl/bio.h> + #include <openssl/buffer.h> +@@ -137,7 +138,7 @@ bool load_secret(const std::string& opt, std::string& + #endif // wxUSE_SECRETSTORE + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__FreeBSD__) + void load_refresh_token_linux(std::string& refresh_token) *** 110 LINES SKIPPED ***