File OrcaSlicer-Build.patch of Package OrcaSlicer
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 197694e02..03b566ec3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -302,6 +302,10 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
add_compile_options(-gz=zstd)
endif()
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=template-id-cdtor" )
+ endif()
+
endif()
if (SLIC3R_ASAN)
@@ -407,6 +411,8 @@ if(SLIC3R_STATIC)
set(Boost_USE_STATIC_LIBS ON)
# Use boost libraries linked statically to the C++ runtime.
# set(Boost_USE_STATIC_RUNTIME ON)
+else()
+ add_definitions(-DBOOST_LOG_DYN_LINK)
endif()
#set(Boost_DEBUG ON)
# set(Boost_COMPILER "-mgw81")
diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
index 2c362dba2..8cadccbcc 100644
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -524,11 +524,8 @@ target_include_directories(libslic3r PUBLIC ${OpenCASCADE_INCLUDE_DIR})
find_package(JPEG REQUIRED)
set(OCCT_LIBS
- TKXDESTEP
- TKSTEP
- TKSTEP209
- TKSTEPAttr
- TKSTEPBase
+ TKDESTEP
+ TKXSDRAWSTEP
TKXCAF
TKXSBase
TKVCAF
@@ -573,11 +570,13 @@ target_link_libraries(libslic3r
PNG::PNG
ZLIB::ZLIB
${OCCT_LIBS}
+ webkit2gtk-4.1
Clipper2
mcut
JPEG::JPEG
qoi
- opencv_world
+ opencv_imgproc
+ opencv_core
)
if(NOT SLIC3R_STATIC)
diff --git a/src/libslic3r/PrintBase.cpp b/src/libslic3r/PrintBase.cpp
index 25b282c7b..61726e2f1 100644
--- a/src/libslic3r/PrintBase.cpp
+++ b/src/libslic3r/PrintBase.cpp
@@ -79,7 +79,7 @@ std::string PrintBase::output_filename(const std::string &format, const std::str
cfg.opt_string("input_filename_base") + default_ext :
this->placeholder_parser().process(format, 0, &cfg);
if (filename.extension().empty())
- filename = boost::filesystem::change_extension(filename, default_ext);
+ filename = boost::filesystem::path(filename).replace_extension(default_ext);
return filename.string();
} catch (std::runtime_error &err) {
throw Slic3r::PlaceholderParserError(L("Failed processing of the filename_format template.") + "\n" + err.what());
diff --git a/src/slic3r/GUI/AuxiliaryDataViewModel.cpp b/src/slic3r/GUI/AuxiliaryDataViewModel.cpp
index 50368b854..cad5cf545 100644
--- a/src/slic3r/GUI/AuxiliaryDataViewModel.cpp
+++ b/src/slic3r/GUI/AuxiliaryDataViewModel.cpp
@@ -337,7 +337,7 @@ wxDataViewItemArray AuxiliaryModel::ImportFile(AuxiliaryModelNode* sel, wxArrayS
dir_path += "\\" + src_bfs_path.filename().generic_wstring();
boost::system::error_code ec;
- if (!fs::copy_file(src_bfs_path, fs::path(dir_path.ToStdWstring()), fs::copy_option::overwrite_if_exists, ec))
+ if (!fs::copy_file(src_bfs_path, fs::path(dir_path.ToStdWstring()), fs::copy_options::overwrite_existing, ec))
continue;
// Update model data
diff --git a/src/slic3r/GUI/CalibrationWizardCaliPage.cpp b/src/slic3r/GUI/CalibrationWizardCaliPage.cpp
index cd63eaf38..d41214674 100644
--- a/src/slic3r/GUI/CalibrationWizardCaliPage.cpp
+++ b/src/slic3r/GUI/CalibrationWizardCaliPage.cpp
@@ -382,7 +382,7 @@ void CalibrationCaliPage::update_subtask(MachineObject* obj)
m_printing_panel->update_subtask_name(wxString::Format("%s", GUI::from_u8(obj->subtask_name)));
if (obj->get_modeltask() && obj->get_modeltask()->design_id > 0) {
- m_printing_panel->show_profile_info(wxString::FromUTF8(obj->get_modeltask()->profile_name));
+ m_printing_panel->show_profile_info(true, wxString::FromUTF8(obj->get_modeltask()->profile_name));
}
else {
m_printing_panel->show_profile_info(false);
@@ -502,4 +502,4 @@ float CalibrationCaliPage::get_selected_calibration_nozzle_dia(MachineObject* ob
return 0.4;
}
-}}
\ No newline at end of file
+}}
diff --git a/src/slic3r/GUI/CreatePresetsDialog.cpp b/src/slic3r/GUI/CreatePresetsDialog.cpp
index 6606d5f5f..4ac1b8f0f 100644
--- a/src/slic3r/GUI/CreatePresetsDialog.cpp
+++ b/src/slic3r/GUI/CreatePresetsDialog.cpp
@@ -3083,7 +3083,7 @@ bool CreatePrinterPresetDialog::save_printable_area_config(Preset *preset)
Utils::slash_to_back_slash(m_custom_model);
config.set("bed_custom_model", m_custom_model);
config.set("bed_custom_texture", m_custom_texture);
- } else if(m_create_type.create_nozzle){
+ } else if(!!(m_create_type.create_nozzle)){
std::string selected_printer_preset_name = into_u8(m_select_printer->GetStringSelection());
std::unordered_map<std::string, std::shared_ptr<Preset>>::iterator itor = m_printer_name_to_preset.find(selected_printer_preset_name);
assert(m_printer_name_to_preset.end() != itor);
diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
index 1ec7b537e..19eb186df 100644
--- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp
+++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
@@ -374,7 +374,7 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
// 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"));
- choice->set_values({ m_config->opt_string("printhost_port") });
+ choice->set_value( m_config->opt_string("printhost_port") );
choice->set_selection();
}
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index f3782be14..0bbc6e6df 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -9277,7 +9277,7 @@ void Plater::import_model_id(wxString download_info)
/* load project */
// Orca: If download is a zip file, treat it as if file has been drag and dropped on the plater
if (target_path.extension() == ".zip")
- this->load_files(wxArrayString(1, target_path.string()));
+ this->load_files(wxArrayString(1, new wxString(target_path.string())));
else
this->load_project(target_path.wstring());
/*BBS set project info after load project, project info is reset in load project */
@@ -10265,7 +10265,7 @@ bool Plater::preview_zip_archive(const boost::filesystem::path& archive_path)
std::replace(name.begin(), name.end(), '\\', '/');
// rename if file exists
std::string filename = path.filename().string();
- std::string extension = boost::filesystem::extension(path);
+ std::string extension = boost::filesystem::path(path).extension().string();
std::string just_filename = filename.substr(0, filename.size() - extension.size());
std::string final_filename = just_filename;
diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp
index a26e13448..e28fe5f95 100644
--- a/src/slic3r/GUI/RemovableDriveManager.cpp
+++ b/src/slic3r/GUI/RemovableDriveManager.cpp
@@ -22,7 +22,7 @@
#include <pwd.h>
#include <boost/filesystem.hpp>
#include <boost/system/error_code.hpp>
-#include <boost/filesystem/convenience.hpp>
+// #include <boost/filesystem/convenience.hpp>
#include <boost/process.hpp>
#endif
@@ -202,7 +202,7 @@ namespace search_for_drives_internal
stat(path.c_str(), &buf);
uid_t uid = buf.st_uid;
if (getuid() == uid)
- out.emplace_back(DriveData{ boost::filesystem::basename(boost::filesystem::path(path)), path });
+ out.emplace_back(DriveData{ boost::filesystem::path(path).stem().string(), path });
}
}
}
diff --git a/src/slic3r/GUI/SendMultiMachinePage.cpp b/src/slic3r/GUI/SendMultiMachinePage.cpp
index bf766d78d..319e848ae 100644
--- a/src/slic3r/GUI/SendMultiMachinePage.cpp
+++ b/src/slic3r/GUI/SendMultiMachinePage.cpp
@@ -450,7 +450,7 @@ BBL::PrintParams SendMultiMachinePage::request_params(MachineObject* obj)
bool timelapse = app_config->get("print", "timelapse") == "1" ? true : false;
auto use_ams = false;
- AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
+ AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
@@ -875,7 +875,7 @@ wxBoxSizer* SendMultiMachinePage::create_item_radiobox(wxString title, wxWindow*
void SendMultiMachinePage::OnSelectRadio(wxMouseEvent& event)
{
- AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
+ AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
while (node) {
@@ -895,7 +895,7 @@ void SendMultiMachinePage::OnSelectRadio(wxMouseEvent& event)
void SendMultiMachinePage::on_select_radio(std::string param)
{
- AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
+ AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
while (node) {
@@ -915,7 +915,7 @@ void SendMultiMachinePage::on_select_radio(std::string param)
bool SendMultiMachinePage::get_value_radio(std::string param)
{
- AmsRadioSelectorList::Node* node = m_radio_group.GetFirst();
+ AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
auto groupid = 0;
while (node) {
AmsRadioSelector* rs = node->GetData();