feature get flutter web resource from server.

This commit is contained in:
alves
2025-12-31 18:21:17 +08:00
parent d82cca2f50
commit 6940b359a0
7 changed files with 150 additions and 49 deletions

View File

@@ -40,6 +40,7 @@ namespace Slic3r {
static const std::string VERSION_CHECK_URL_STABLE = "https://api.github.com/repos/Snapmaker/OrcaSlicer/releases/latest";
static const std::string VERSION_CHECK_URL = "https://api.github.com/repos/Snapmaker/OrcaSlicer/releases";
static const std::string PROFILE_UPDATE_URL = "https://public.resource.snapmaker.com/upgrade/packages/profile/preset_config.json";
static const std::string FLUTTER_UPDATE_URL = "https://public.resource.snapmaker.com/upgrade/packages/flutter/flutter_config.json";
static const std::string MODELS_STR = "models";
const std::string AppConfig::SECTION_FILAMENTS = "filaments";
@@ -1429,6 +1430,11 @@ std::string AppConfig::version_check_url(bool stable_only/* = false*/) const
return from_settings.empty() ? stable_only ? VERSION_CHECK_URL_STABLE : VERSION_CHECK_URL : from_settings;
}
std::string AppConfig::flutter_resource_update_url() const
{
return FLUTTER_UPDATE_URL;
}
std::string AppConfig::profile_update_url() const
{
return PROFILE_UPDATE_URL;

View File

@@ -328,6 +328,8 @@ public:
// Get the Orca profile update url.
std::string profile_update_url() const;
std::string flutter_resource_update_url() const;
// Returns the original Slic3r version found in the ini file before it was overwritten
// by the current version
Semver orig_version() const { return m_orig_version; }