Path: blob/main/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp
18157 views
--- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-12-20 11:54:34 UTC1+++ src/slic3r/GUI/ConfigWizard.cpp2@@ -616,7 +616,7 @@ void PageWelcome::set_run_reason(ConfigWizard::RunReas3const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY;4welcome_text->Show(data_empty);5cbox_reset->Show(!data_empty);6-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)7+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)8if (!DesktopIntegrationDialog::is_integrated())9cbox_integrate->Show(true);10else11@@ -1674,7 +1674,7 @@ PageDownloader::PageDownloader(ConfigWizard* parent)12));13}1415-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)16+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)17append_text(wxString::Format(_L(18"On Linux systems the process of registration also creates desktop integration files for this version of application."19)));20@@ -1692,7 +1692,7 @@ bool PageDownloader::on_finish_downloader() const21return m_downloader->on_finish();22}2324-#ifdef __linux__25+#if defined(__linux__) || defined(__FreeBSD__)26bool DownloaderUtils::Worker::perform_registration_linux = false;27#endif // __linux__2829@@ -1741,10 +1741,10 @@ bool DownloaderUtils::Worker::perform_url_register()30}31//key_full = "\"C:\\Program Files\\Prusa3D\\PrusaSlicer\\prusa-slicer-console.exe\" \"%1\"";32key_full = key_string;33-#elif __APPLE__34+#elif defined(__APPLE__) || defined(__FreeBSD__)35// Apple registers for custom url in info.plist thus it has to be already registered since build.36// The url will always trigger opening of prusaslicer and we have to check that user has allowed it. (GUI_App::MacOpenURL is the triggered method)37-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)38+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION39// the performation should be called later during desktop integration40perform_registration_linux = true;41#endif42@@ -1760,9 +1760,9 @@ void DownloaderUtils::Worker::deregister()43return;44}45key_full = key_string;46-#elif __APPLE__47+#elif defined(__APPLE__) || defined(__FreeBSD__)48// TODO49-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)50+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION51BOOST_LOG_TRIVIAL(debug) << "DesktopIntegrationDialog::undo_downloader_registration";52DesktopIntegrationDialog::undo_downloader_registration();53perform_registration_linux = false;54@@ -3405,7 +3405,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_c55if ((check_unsaved_preset_changes = install_bundles.size() > 0))56header = _L_PLURAL("A new vendor was installed and one of its printers will be activated", "New vendors were installed and one of theirs printers will be activated", install_bundles.size());5758-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)59+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)60// Desktop integration on Linux61BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << DownloaderUtils::Worker::perform_registration_linux;62if (page_welcome->integrate_desktop())636465