From 19998ae48755bb0995e460d0956700cf84a470da Mon Sep 17 00:00:00 2001 From: thysson2701 Date: Mon, 29 Jun 2026 23:42:09 +0200 Subject: [PATCH] =?UTF-8?q?feat(updater):=20Versionspr=C3=BCfung=20auf=20G?= =?UTF-8?q?itea=20OrcaSlicer-KX=20Releases=20umleiten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/libslic3r/AppConfig.cpp | 2 +- src/slic3r/GUI/GUI_App.cpp | 16 +++++----------- src/slic3r/Utils/PresetUpdater.cpp | 21 ++------------------- 3 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index e84f469670b..02c52f11ceb 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -40,7 +40,7 @@ using namespace nlohmann; namespace Slic3r { -static const std::string VERSION_CHECK_URL = "https://check-version.orcaslicer.com/latest"; +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"; diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 8913dd68d7f..fd961317306 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -5632,20 +5632,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) { diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index 6d94af35d76..40247eb0fd3 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -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.