Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/cad/PrusaSlicer/files/patch-src_slic3r_GUI_ConfigWizard.cpp
18157 views
1
--- src/slic3r/GUI/ConfigWizard.cpp.orig 2024-12-20 11:54:34 UTC
2
+++ src/slic3r/GUI/ConfigWizard.cpp
3
@@ -616,7 +616,7 @@ void PageWelcome::set_run_reason(ConfigWizard::RunReas
4
const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY;
5
welcome_text->Show(data_empty);
6
cbox_reset->Show(!data_empty);
7
-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
8
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)
9
if (!DesktopIntegrationDialog::is_integrated())
10
cbox_integrate->Show(true);
11
else
12
@@ -1674,7 +1674,7 @@ PageDownloader::PageDownloader(ConfigWizard* parent)
13
));
14
}
15
16
-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
17
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)
18
append_text(wxString::Format(_L(
19
"On Linux systems the process of registration also creates desktop integration files for this version of application."
20
)));
21
@@ -1692,7 +1692,7 @@ bool PageDownloader::on_finish_downloader() const
22
return m_downloader->on_finish();
23
}
24
25
-#ifdef __linux__
26
+#if defined(__linux__) || defined(__FreeBSD__)
27
bool DownloaderUtils::Worker::perform_registration_linux = false;
28
#endif // __linux__
29
30
@@ -1741,10 +1741,10 @@ bool DownloaderUtils::Worker::perform_url_register()
31
}
32
//key_full = "\"C:\\Program Files\\Prusa3D\\PrusaSlicer\\prusa-slicer-console.exe\" \"%1\"";
33
key_full = key_string;
34
-#elif __APPLE__
35
+#elif defined(__APPLE__) || defined(__FreeBSD__)
36
// Apple registers for custom url in info.plist thus it has to be already registered since build.
37
// 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)
38
-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
39
+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION
40
// the performation should be called later during desktop integration
41
perform_registration_linux = true;
42
#endif
43
@@ -1760,9 +1760,9 @@ void DownloaderUtils::Worker::deregister()
44
return;
45
}
46
key_full = key_string;
47
-#elif __APPLE__
48
+#elif defined(__APPLE__) || defined(__FreeBSD__)
49
// TODO
50
-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
51
+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION
52
BOOST_LOG_TRIVIAL(debug) << "DesktopIntegrationDialog::undo_downloader_registration";
53
DesktopIntegrationDialog::undo_downloader_registration();
54
perform_registration_linux = false;
55
@@ -3405,7 +3405,7 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_c
56
if ((check_unsaved_preset_changes = install_bundles.size() > 0))
57
header = _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());
58
59
-#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
60
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)
61
// Desktop integration on Linux
62
BOOST_LOG_TRIVIAL(debug) << "ConfigWizard::priv::apply_config integrate_desktop" << page_welcome->integrate_desktop() << " perform_registration_linux " << DownloaderUtils::Worker::perform_registration_linux;
63
if (page_welcome->integrate_desktop())
64
65