This commit is contained in:
shelvacu 2025-12-24 13:00:14 +08:00 committed by GitHub
commit 27679716d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 6 deletions

View file

@ -165,6 +165,13 @@ endif ()
option(SLIC3R_BUILD_SANDBOXES "Build development sandboxes" OFF)
option(BUILD_TESTS "Build unit tests" OFF)
option(ORCA_TOOLS "Build Orca tools" OFF)
option(ORCA_VERSION_CHECK_DEFAULT "Whether to check for new versions on startup by default" ON)
if (ORCA_VERSION_CHECK_DEFAULT)
add_definitions(-DORCA_VERSION_CHECK_DEFAULT=true)
else ()
add_definitions(-DORCA_VERSION_CHECK_DEFAULT=false)
endif ()
if (FLATPAK)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++20")

View file

@ -161,6 +161,10 @@ If you're running Klipper, it's recommended to add the following configuration t
resolution: 0.1
```
# Note if building for a package manager
If you're building this as a package for a package manager (`apt`, `brew`, `pacman`, `nix`, `chocolatey`, etc.) where the user is not going to be manually updating the software, you should disable the version check with `-DORCA_VERSION_CHECK_DEFAULT=OFF` flag to cmake
# Supports
**OrcaSlicer** is an open-source project and I'm deeply grateful to all my sponsors and backers.

View file

@ -452,6 +452,12 @@ void AppConfig::set_defaults()
if (get("print", "timelapse").empty()) {
set_str("print", "timelapse", "1");
}
if (get("do_version_check").empty()) {
#ifndef ORCA_VERSION_CHECK_DEFAULT
#define ORCA_VERSION_CHECK_DEFAULT true
#endif
set_bool("do_version_check", ORCA_VERSION_CHECK_DEFAULT);
}
if (get("enable_step_mesh_setting").empty()) {
set_bool("enable_step_mesh_setting", true);

View file

@ -998,7 +998,10 @@ void GUI_App::post_init()
bool sys_preset = app_config->get("sync_system_preset") == "true";
this->preset_updater->sync(http_url, language, network_ver, sys_preset ? preset_bundle : nullptr);
this->check_new_version_sf();
if (this->preset_updater->version_check_enabled()) {
this->check_new_version_sf();
}
if (is_user_login() && !app_config->get_stealth_mode()) {
// this->check_privacy_version(0);
request_user_handle(0);
@ -2092,14 +2095,14 @@ void GUI_App::init_app_config()
BOOST_LOG_TRIVIAL(info) << boost::format("gui mode, Current OrcaSlicer Version %1% build %2%") % SoftFever_VERSION % GIT_COMMIT_HASH;
//BBS: remove GCodeViewer as seperate APP logic
if (!app_config)
if (!app_config)
app_config = new AppConfig();
//app_config = new AppConfig(is_editor() ? AppConfig::EAppMode::Editor : AppConfig::EAppMode::GCodeViewer);
m_config_corrupted = false;
// load settings
m_app_conf_exists = app_config->exists();
if (m_app_conf_exists) {
// load settings
m_app_conf_exists = app_config->exists();
if (m_app_conf_exists) {
std::string error = app_config->load();
if (!error.empty()) {
// Orca: if the config file is corrupted, we will show a error dialog and create a default config file.

View file

@ -242,7 +242,6 @@ PresetUpdater::priv::priv()
, cancel(false)
{
//BBS: refine preset updater logic
enabled_version_check = true;
set_download_prefs(GUI::wxGetApp().app_config);
// Install indicies from resources. Only installs those that are either missing or older than in resources.
check_installed_vendor_profiles();
@ -255,6 +254,7 @@ PresetUpdater::priv::priv()
void PresetUpdater::priv::set_download_prefs(AppConfig *app_config)
{
version_check_url = app_config->version_check_url();
enabled_version_check = app_config->get_bool("do_version_check");
auto profile_update_url = app_config->profile_update_url();
if (!profile_update_url.empty())