mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 09:07:39 +00:00
Introducing Orca Cloud: https://cloud.orcaslicer.com (#13414)
* Add OrcaCloud sync platform and preset bundle sharing system Introduce OrcaCloud, a cloud sync platform for user presets, alongside a preset bundle system that enables sharing printer/filament/process profiles as local exportable bundles or subscribed cloud bundles. OrcaCloud platform: - Auth to Orca Cloud - Encrypted token storage (file-based or system keychain) - User preset sync with - Profile migration from default/bambu folders on first login - Homepage integration with entrance to cloud.orcaslicer.com Preset bundles: - Local bundle import/export with bundle_structure.json metadata - Subscribed cloud bundles with version-based update checking - Thread-safe concurrent bundle access with read-write mutex - Canonical bundle preset naming (_local/<id>/... and _subscribed/<id>/...) - Bundle presets are read-only; grouped under subheaders in combo boxes - PresetBundleDialog with auto-sync toggle, refresh, update notifications - Hyperlinked bundle names to cloud bundle pages Co-authored-by: Sabriel Koh <sabrielkcr@gmail.com> Co-authored-by: Derrick <derrick992110@gmail.com> Co-authored-by: Mykola Nahirnyi <mnahirnyi@amcbridge.com> Co-authored-by: Ian Chua <iancrb00@gmail.com> Co-authored-by: Draginraptor <draginraptor@gmail.com> Co-authored-by: ExPikaPaka <112851715+ExPikaPaka@users.noreply.github.com> Co-authored-by: Ian Bassi <ian.bassi@outlook.com> Co-authored-by: Ocraftyone <Ocraftyone@users.noreply.github.com> Co-authored-by: yw4z <ywsyildiz@gmail.com> Co-authored-by: peterm-m <101202951+peterm-m@users.noreply.github.com> * Fixed an issue on Windows it failed to login Orca Cloud with Google account
This commit is contained in:
@@ -1064,30 +1064,17 @@ void PresetUpdater::priv::sync_printer_config(std::string http_url)
|
||||
|
||||
bool PresetUpdater::priv::install_bundles_rsrc(const std::vector<std::string>& bundles, bool snapshot) const
|
||||
{
|
||||
Updates updates;
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << format("Installing %1% bundles from resources ...", bundles.size());
|
||||
|
||||
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");
|
||||
updates.updates.emplace_back(std::move(path_in_rsrc), std::move(path_in_vendors), Version(), bundle, "", "");
|
||||
|
||||
//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, "", "",[](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);
|
||||
// Use the Core library function to install bundles
|
||||
// This function is now in libslic3r so both Core and GUI can use it
|
||||
if (!Slic3r::install_vendor_bundles_from_resources(bundles)) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to install bundles from resources";
|
||||
return false;
|
||||
}
|
||||
|
||||
return perform_updates(std::move(updates), snapshot);
|
||||
// Snapshot logic is currently commented out in perform_updates, so we don't need to handle it here
|
||||
// If snapshot logic is needed in the future, it can be added here
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user