mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-02 14:56:56 +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:
@@ -154,27 +154,32 @@ std::unique_ptr<NetworkAgent> create_agent_from_config(const std::string& log_di
|
||||
if (!app_config)
|
||||
return std::make_unique<NetworkAgent>(nullptr, nullptr);
|
||||
|
||||
// Determine cloud provider from config
|
||||
bool use_orca_cloud = app_config->get_bool("use_orca_cloud");
|
||||
|
||||
// Create cloud agent
|
||||
std::shared_ptr<ICloudServiceAgent> cloud_agent;
|
||||
if (use_orca_cloud || app_config->get_bool("installed_networking")) {
|
||||
CloudAgentProvider provider = use_orca_cloud ? CloudAgentProvider::Orca : CloudAgentProvider::BBL;
|
||||
cloud_agent = NetworkAgentFactory::create_cloud_agent(provider, log_dir);
|
||||
if (!cloud_agent) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to create cloud agent";
|
||||
}
|
||||
// Always create Orca cloud agent as the primary provider
|
||||
auto cloud_agent = NetworkAgentFactory::create_cloud_agent(ORCA_CLOUD_PROVIDER, log_dir);
|
||||
if (!cloud_agent) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Failed to create cloud agent";
|
||||
}
|
||||
|
||||
// Create NetworkAgent with cloud agent only (printer agent added later when printer is selected)
|
||||
auto agent = std::make_unique<NetworkAgent>(std::move(cloud_agent), nullptr);
|
||||
|
||||
if (agent && use_orca_cloud) {
|
||||
if (agent) {
|
||||
// create orca cloud agent first
|
||||
auto* orca_cloud = dynamic_cast<OrcaCloudServiceAgent*>(agent->get_cloud_agent().get());
|
||||
if (orca_cloud) {
|
||||
orca_cloud->configure_urls(app_config);
|
||||
}
|
||||
|
||||
// Initialize third-party cloud agents from config
|
||||
auto providers = app_config->get_cloud_providers();
|
||||
for (const auto& provider : providers) {
|
||||
if (provider == ORCA_CLOUD_PROVIDER)
|
||||
continue; // Primary agent already created above
|
||||
auto third_party_agent = NetworkAgentFactory::create_cloud_agent(provider, log_dir);
|
||||
if (third_party_agent) {
|
||||
agent->add_cloud_agent(provider, std::move(third_party_agent));
|
||||
BOOST_LOG_TRIVIAL(info) << "Initialized third-party cloud agent: " << provider;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return agent;
|
||||
|
||||
Reference in New Issue
Block a user