Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ffe5e0c
feature add printer info sync entrance.
LiuLikeQian Mar 16, 2026
1303cbe
feature limit only one nozzle and not allow to choose nozzle.
LiuLikeQian Mar 16, 2026
c3ac794
fix remove not work code.
LiuLikeQian Mar 16, 2026
b170b26
feature select the u1 machine and show the sync btn entrance. fix the…
LiuLikeQian Mar 17, 2026
876c723
feature when on U1 switch the nozzle diameter and show a tips.
LiuLikeQian Mar 17, 2026
644527f
feature add Graphic Effect Steel Plate for U1
LiuLikeQian Mar 17, 2026
142e5bb
feature add new plate for U1, and U1 default show 3 plates and use su…
LiuLikeQian Mar 17, 2026
45c6e57
feature only U1 has new plate.
LiuLikeQian Mar 17, 2026
4d185b2
feature merge U1 nozzle to U1 type and handle it the same logic.
LiuLikeQian Mar 18, 2026
e92633b
feature upload or print notify web the nozzle info
LiuLikeQian Mar 18, 2026
2c2aa19
feature remove not work code.
LiuLikeQian Mar 18, 2026
224c403
feature rename the graphic effect plate, add dialog for sync nozzle s…
LiuLikeQian Mar 19, 2026
b324fc8
feature sync nozzle info and set the nozzle combobox data.
LiuLikeQian Mar 19, 2026
887101e
feature add tips for plate use filament.
LiuLikeQian Mar 20, 2026
3654ea0
feature remove the nozzle modify entrance.
LiuLikeQian Mar 20, 2026
a78dbcb
feature update the Smooth PEI Plate layer temp.
LiuLikeQian Mar 20, 2026
e1b5320
feature update the plate name for snapmaker u1.
LiuLikeQian Mar 20, 2026
2ffdf64
feature update ui img, guide page merge the nozzle for machine, updat…
LiuLikeQian Mar 30, 2026
a331726
feature update guide page machine select.
LiuLikeQian Mar 30, 2026
440c7c2
feature update guide ui, profiles source.
LiuLikeQian Mar 30, 2026
1301e1d
feature export 3mf include the graphic plate,process soft and load no…
LiuLikeQian Mar 30, 2026
20145b4
feature add tips for smooth pei plater for filament relations,and gra…
LiuLikeQian Mar 31, 2026
b1f9931
feature add file for filament tips.
LiuLikeQian Mar 31, 2026
803347c
feature revert the profiles change.
LiuLikeQian Apr 1, 2026
b4b9321
Merge branch 'dev_2.3.2_alves' of https://github.com/Snapmaker/OrcaSl…
LiuLikeQian Apr 1, 2026
ae0d9fb
fix revert to old profiles
LiuLikeQian Apr 1, 2026
9e4b0f1
Merge branch 'main' into dev_2.3.2_alves
LiuLikeQian Apr 1, 2026
35b7b9d
feature remove not work code.
LiuLikeQian Apr 1, 2026
dcac898
feature add config for tips on filament.
LiuLikeQian Apr 1, 2026
ebb8b5b
feature add nozzle changed and tips filament relations for slice.
LiuLikeQian Apr 1, 2026
6a06009
feature add nozzle for filament tips.
LiuLikeQian Apr 1, 2026
6241343
feature remove the not work code.
LiuLikeQian Apr 2, 2026
1c24d19
feature render panel add graphic hot bed for Custom plater.
LiuLikeQian Apr 2, 2026
4cc3638
fix the judge logic for sync machine filament info.
LiuLikeQian Apr 2, 2026
e28efd7
feature load relations json from profiles source,upgrade translations.
LiuLikeQian Apr 2, 2026
ad905cb
feature update the translation.
LiuLikeQian Apr 2, 2026
1bde7c6
feature update translation,fix sync nozzle bug.
LiuLikeQian Apr 3, 2026
bb75a7e
feature update the translations.
LiuLikeQian Apr 3, 2026
2177da1
fix machine sync question .
LiuLikeQian Apr 3, 2026
2c04618
feature update the hot bed tmp
LiuLikeQian Apr 3, 2026
f598484
Merge branch 'dev_2.3.2_alves' of https://github.com/Snapmaker/OrcaSl…
LiuLikeQian Apr 3, 2026
74e384a
feature update the hot bed tmp
LiuLikeQian Apr 7, 2026
a85a8d6
fix warning rule not work question.
LiuLikeQian Apr 7, 2026
0d3d069
fix switch machine and the device show incorrect.
LiuLikeQian Apr 7, 2026
6c9c339
feature update the config for tips hot bed and use the filament to sl…
LiuLikeQian Apr 7, 2026
037f522
feature fix upgrade lead to resource update fail question.
LiuLikeQian Apr 7, 2026
988ca3b
feature merge main function.
LiuLikeQian Apr 9, 2026
8d8d1ff
feature revert not work code.
LiuLikeQian Apr 9, 2026
c2872d0
feature update the request type.
LiuLikeQian Apr 9, 2026
ce38014
fix build fail bug.
LiuLikeQian Apr 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/libslic3r/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,9 +1517,14 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out)
// SoftFever: copy directory recursively
void copy_directory_recursively(const boost::filesystem::path &source, const boost::filesystem::path &target, std::function<bool(const std::string)> filter)
{
BOOST_LOG_TRIVIAL(info) << Slic3r::format("copy_directory_recursively %1% -> %2%", source, target);
BOOST_LOG_TRIVIAL(debug) << Slic3r::format("copy_directory_recursively %1% -> %2%", source, target);
std::string error_message;

if (!boost::filesystem::exists(source) || !boost::filesystem::is_directory(source)) {
BOOST_LOG_TRIVIAL(error) << Slic3r::format("copy_directory_recursively source is invalid: %1%", source);
throw Slic3r::CriticalException(Slic3r::format(("Copying directory %1% to %2% failed: source directory does not exist"),source, target));
}

if (boost::filesystem::exists(target))
boost::filesystem::remove_all(target);
boost::filesystem::create_directories(target);
Expand Down
98 changes: 69 additions & 29 deletions src/slic3r/Utils/PresetUpdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,20 @@ void PresetUpdater::priv::sync_update_flutter_resource(bool isAuto_check)
return;
}

if (currentSoftVersion > maxSpVersion || currentSoftVersion < minSpVersion) {
bool maxRes = false;
bool minRes = false;

if (!maxSupportPcVersion.empty())
{
maxRes = currentSoftVersion > maxSpVersion;
}

if (!minSupportPcVersion.empty())
{
minRes = currentSoftVersion < minSpVersion;
}

if (maxRes || minRes) {
if (!isAuto_check) {
wxCommandEvent* evt = new wxCommandEvent(EVT_NO_WEB_RESOURCE_UPDATE);
GUI::wxGetApp().QueueEvent(evt);
Expand Down Expand Up @@ -854,7 +867,7 @@ void PresetUpdater::priv::sync_update_flutter_resource(bool isAuto_check)
BOOST_LOG_TRIVIAL(fatal) << "request server flutter update data error:" << errorMsg;
}
})
.perform();
.perform_sync();
}
// Orca: sync config update for currect App version
void PresetUpdater::priv::sync_config(bool isAuto_check)
Expand Down Expand Up @@ -936,8 +949,18 @@ void PresetUpdater::priv::sync_config(bool isAuto_check)
return;
}

if (currentSoftVersion > maxSpVersion || currentSoftVersion < minSpVersion)
{
bool maxRes = false;
bool minRes = false;

if (!maxSupportPcVersion.empty()) {
maxRes = currentSoftVersion > maxSpVersion;
}

if (!minSupportPcVersion.empty()) {
minRes = currentSoftVersion < minSpVersion;
}

if (maxRes || minRes) {
if (!isAuto_check) {
wxCommandEvent* evt = new wxCommandEvent(EVT_NO_PRESET_UPDATE);
GUI::wxGetApp().QueueEvent(evt);
Expand Down Expand Up @@ -973,7 +996,7 @@ void PresetUpdater::priv::sync_config(bool isAuto_check)
BOOST_LOG_TRIVIAL(fatal) << "request server preset update data error:" << errorMsg;
}
})
.perform();
.perform_sync();
}

void PresetUpdater::priv::sync_tooltip(std::string http_url, std::string language)
Expand Down Expand Up @@ -1282,12 +1305,6 @@ bool PresetUpdater::priv::install_bundles_rsrc(const std::vector<std::string>& b

BOOST_LOG_TRIVIAL(info) << format("Installing %1% bundles from resources ...", bundles.size());

// File filter for directory copy: skip binary and large files that don't need to be in system presets
auto should_skip_file = [](const std::string name) {
return boost::iends_with(name, ".stl") || boost::iends_with(name, ".png") || boost::iends_with(name, ".svg") ||
boost::iends_with(name, ".jpeg") || boost::iends_with(name, ".jpg") || boost::iends_with(name, ".3mf");
};

for (const auto &bundle : bundles) {
auto path_in_rsrc = (this->rsrc_path / bundle).replace_extension(".json");
auto path_in_vendors = (this->vendor_path / bundle).replace_extension(".json");
Expand All @@ -1296,23 +1313,29 @@ bool PresetUpdater::priv::install_bundles_rsrc(const std::vector<std::string>& b
//BBS: add directory support
auto print_in_rsrc = this->rsrc_path / bundle;
auto print_in_vendors = this->vendor_path / bundle;
fs::path print_folder(print_in_vendors);
if (fs::exists(print_folder))
fs::remove_all(print_folder);
fs::create_directories(print_folder);
updates.updates.emplace_back(std::move(print_in_rsrc), std::move(print_in_vendors), Version(), bundle, "", "", should_skip_file, false, true, true);
bool source_dir_valid = fs::exists(print_in_rsrc) && fs::is_directory(print_in_rsrc);
bool source_dir_has_entries = false;
if (source_dir_valid) {
source_dir_has_entries = (boost::filesystem::directory_iterator(print_in_rsrc) != boost::filesystem::directory_iterator());
}

// Rules file is not a slicer preset; ensure it is always deployed next to system filament JSON.
if (bundle == PresetBundle::SM_BUNDLE) {
fs::path rules_src = rsrc_path / bundle / "filament" / "filament_hot_bed_nozzles.json";
fs::path rules_dst = vendor_path / bundle / "filament" / "filament_hot_bed_nozzles.json";
if (fs::exists(rules_src)) {
fs::create_directories(rules_dst.parent_path());
updates.updates.emplace_back(std::move(rules_src), std::move(rules_dst), Version(), bundle, "", "", false, false, true);
}
// Guard against empty / missing source: never clear target unless we do have source content to copy.
if (source_dir_valid && source_dir_has_entries) {
fs::path print_folder(print_in_vendors);
if (fs::exists(print_folder))
fs::remove_all(print_folder);
fs::create_directories(print_folder);
updates.updates.emplace_back(std::move(print_in_rsrc), std::move(print_in_vendors), Version(), bundle, "", "",[](const std::string name){
// return false if name is end with .stl, case insensitive
return boost::iends_with(name, ".stl") || boost::iends_with(name, ".png") || boost::iends_with(name, ".svg") ||
boost::iends_with(name, ".jpeg") || boost::iends_with(name, ".jpg") || boost::iends_with(name, ".3mf");
}, false, true, true);
} else {
BOOST_LOG_TRIVIAL(warning) << "[Orca Updater]: skip vendor directory replace, source missing or empty: "
<< print_in_rsrc.string();
}

// Rules file is not a slicer preset; ensure it is always deployed next to system filament JSON.
// Rules file is not a slicer preset; deploy even when full vendor dir sync was skipped above.
if (bundle == PresetBundle::SM_BUNDLE) {
fs::path rules_src = rsrc_path / bundle / "filament" / "filament_hot_bed_nozzles.json";
fs::path rules_dst = vendor_path / bundle / "filament" / "filament_hot_bed_nozzles.json";
Expand Down Expand Up @@ -1522,15 +1545,26 @@ Updates PresetUpdater::priv::get_config_updates(const Semver &old_slic3r_version
version.config_version = cache_ver;
version.comment = description;

updates.updates.emplace_back(std::move(file_path), std::move(path_in_vendor.string()), std::move(version), vendor_name, changelog, "", force_update, false, legal);
// Update expects fs::path (not std::string paths from file_path / .string()).
updates.updates.emplace_back(fs::path(path), fs::path(path_in_vendor), std::move(version), vendor_name,
std::move(changelog), "", force_update, false, legal);

//BBS: add directory support
updates.updates.emplace_back(cache_path / "profiles" / vendor_name, vendor_path / vendor_name, Version(), vendor_name, "", "",
auto vendor_dir_in_cache = cache_profile_path / vendor_name;
if (fs::exists(vendor_dir_in_cache) && fs::is_directory(vendor_dir_in_cache)) {
updates.updates.emplace_back(fs::path(vendor_dir_in_cache), fs::path(vendor_path / vendor_name),
Version(), vendor_name, "", "", force_update, true, legal);
} else {
BOOST_LOG_TRIVIAL(warning) << "[Orca Updater]: skip vendor directory update, source missing: "
<< vendor_dir_in_cache.string();
}
updates.updates.emplace_back(cache_profile_path / vendor_name, vendor_path / vendor_name, Version(), vendor_name,
"", "",
should_skip_file, force_update, true, legal);

// Rules file is not a slicer preset; ensure it is always deployed next to system filament JSON.
if (vendor_name == PresetBundle::SM_BUNDLE) {
fs::path rules_src = cache_path / "profiles" / vendor_name / "filament" / "filament_hot_bed_nozzles.json";
fs::path rules_src = cache_profile_path / vendor_name / "filament" / "filament_hot_bed_nozzles.json";
fs::path rules_dst = vendor_path / vendor_name / "filament" / "filament_hot_bed_nozzles.json";
if (fs::exists(rules_src)) {
// Ensure target directory exists
Expand Down Expand Up @@ -1861,7 +1895,10 @@ void PresetUpdater::load_flutter_web(const std::string& zip_file, bool serverUpd

if (!p->extract_file(zip_file, temp_path.string())) {
if (!serverUpdate)
GUI::MessageDialog(nullptr, _L("Import Failed")).ShowModal();
{
BOOST_LOG_TRIVIAL(error) << "extract_file Failed ";
GUI::MessageDialog(nullptr, _L("Import Failed")).ShowModal();
}
return;
}

Expand All @@ -1870,6 +1907,7 @@ void PresetUpdater::load_flutter_web(const std::string& zip_file, bool serverUpd

auto app = dynamic_cast<GUI::GUI_App*>(wxTheApp);
if (!app) {
BOOST_LOG_TRIVIAL(error) << "update source on web fail ";
GUI::MessageDialog(nullptr, _L("Import Failed")).ShowModal();
}

Expand Down Expand Up @@ -2032,6 +2070,7 @@ void PresetUpdater::import_system_profile()

// 3. 解压zip文件到临时目录
if (!p->extract_file(zip_file, temp_path.string())) {
BOOST_LOG_TRIVIAL(error) << "extract_file Failed ";
GUI::MessageDialog(nullptr, _L("Import Failed")).ShowModal();
return;
}
Expand All @@ -2042,6 +2081,7 @@ void PresetUpdater::import_system_profile()

auto app = dynamic_cast<GUI::GUI_App*>(wxTheApp);
if (!app) {
BOOST_LOG_TRIVIAL(error) << "import profiles fail ";
GUI::MessageDialog(nullptr, _L("Import Failed")).ShowModal();
}

Expand Down