feat(updater): Versionsprüfung auf Gitea OrcaSlicer-KX Releases umleiten

Ersetzt die orcaslicer.com/latest URL durch die Gitea API:
  https://gitea.it-drui.de/api/v1/repos/viewit/OrcaSlicer-KX/releases/latest

Das Gitea-JSON hat dasselbe Format wie GitHub (tag_name, html_url,
prerelease) — der bestehende Parser in check_new_version_sf() funktioniert
ohne weitere Änderungen. Telemetrie-Query-Parameter und Upstream-Signaturen
werden nicht mehr angehängt.
This commit is contained in:
thysson2701
2026-06-29 23:42:09 +02:00
parent d9051009a5
commit 392741b6ac
3 changed files with 9 additions and 35 deletions

View File

@@ -40,11 +40,8 @@ using namespace nlohmann;
namespace Slic3r {
static const std::string VERSION_CHECK_URL = "https://gradients.garden/orcaslicer_imagemap/current_version.json";
static const std::string VERSION_CHECK_URL_LEGACY = "https://check-version.orcaslicer.com/latest";
static const std::string VERSION_CHECK_MODE = "platform_json";
static const std::string VERSION_DOWNLOAD_URL = "https://gitlab.com/sentient_stardust/orcaslicer-imagemap";
static const std::string PROFILE_UPDATE_URL = "https://api.github.com/repos/OrcaSlicer/orcaslicer-profiles/releases/tags";
static const std::string VERSION_CHECK_URL = "https://gitea.it-drui.de/api/v1/repos/viewit/OrcaSlicer-KX/releases/latest";
static const std::string PROFILE_UPDATE_URL = "https://check-version.orcaslicer.com/profile";
static const std::string MODELS_STR = "models";
const std::string AppConfig::SECTION_FILAMENTS = "filaments";

View File

@@ -5765,20 +5765,14 @@ void GUI_App::check_new_version_sf(bool show_tips, int by_user)
detect_updater_os_info()
};
const std::string query_string = build_updater_query(query);
if (!query_string.empty()) {
const bool has_query = version_check_url.find('?') != std::string::npos;
if (!has_query)
version_check_url.push_back('?');
else if (!version_check_url.empty() && version_check_url.back() != '&' && version_check_url.back() != '?')
version_check_url.push_back('&');
version_check_url += query_string;
}
// KX fork: do not append upstream telemetry query params to Gitea API URL
const std::string query_string;
auto http = Http::get(version_check_url);
maybe_attach_updater_signature(http, query_string, version_check_url);
// KX fork: skip upstream signature headers — we query Gitea, not orcaslicer.com
// maybe_attach_updater_signature(http, query_string, version_check_url);
http.header("accept", "application/vnd.github.v3+json")
http.header("accept", "application/json")
.timeout_connect(5)
.timeout_max(10)
.on_error([&](std::string body, std::string error, unsigned http_status) {

View File

@@ -387,25 +387,8 @@ void PresetUpdater::priv::sync_version() const
{
if (! enabled_version_check) { return; }
#if 0
Http::get(version_check_url)
.size_limit(SLIC3R_VERSION_BODY_MAX)
.on_progress([this](Http::Progress, bool &cancel) {
cancel = this->cancel;
})
.on_error([&](std::string body, std::string error, unsigned http_status) {
(void)body;
BOOST_LOG_TRIVIAL(error) << format("Error getting: `%1%`: HTTP %2%, %3%",
version_check_url,
http_status,
error);
})
.on_complete([&](std::string body, unsigned /* http_status */) {
boost::trim(body);
parse_version_string(body);
})
.perform_sync();
#endif
// Version check is handled by GUI_App::check_new_version_sf() which queries the
// Gitea releases API directly. Nothing to do here.
}
// Parses version string obtained in sync_version() and sends events to UI thread.