Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/cad/OrcaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp
46591 views
1
--- src/slic3r/GUI/GUI_App.cpp.orig 2026-03-22 17:56:38 UTC
2
+++ src/slic3r/GUI/GUI_App.cpp
3
@@ -473,7 +473,7 @@ class SplashScreen : public wxSplashScreen (private)
4
m_constant_text;
5
};
6
7
-#ifdef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__)
9
static void migrate_flatpak_legacy_datadir(const boost::filesystem::path &data_dir_path)
10
{
11
if(!boost::filesystem::exists("/.flatpak-info"))
12
@@ -927,6 +927,7 @@ void GUI_App::post_init()
13
}
14
else {
15
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << "Found glcontext not ready, postpone the init";
16
+ plater_->canvas3D()->enable_render(true);
17
}
18
//#endif
19
if (is_editor())
20
@@ -2319,7 +2320,7 @@ bool GUI_App::init_opengl()
21
22
bool GUI_App::init_opengl()
23
{
24
-#ifdef __linux__
25
+#if defined(__linux__) || defined(__FreeBSD__)
26
bool status = m_opengl_mgr.init_gl();
27
m_opengl_initialized = true;
28
return status;
29
@@ -2761,7 +2762,7 @@ bool GUI_App::on_init_inner()
30
wxCHECK_MSG(wxDirExists(resources_dir), false,
31
wxString::Format(_L("Resources path does not exist or is not a directory: %s"), resources_dir));
32
33
-#ifdef __linux__
34
+#if defined(__linux__) || defined(__FreeBSD__)
35
if (! check_old_linux_datadir(GetAppName())) {
36
std::cerr << "Quitting, user chose to move their data to new location." << std::endl;
37
return false;
38
@@ -2907,7 +2908,7 @@ bool GUI_App::on_init_inner()
39
40
BOOST_LOG_TRIVIAL(info) << "begin to show the splash screen...";
41
//BBS use BBL splashScreen
42
- scrn = new SplashScreen(bmp, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_TIMEOUT, 1500, splashscreen_pos);
43
+ scrn = new SplashScreen(bmp, wxSPLASH_CENTRE_ON_SCREEN, 0, splashscreen_pos);
44
wxYield();
45
scrn->SetText(_L("Loading configuration")+ dots);
46
}
47
@@ -3143,6 +3144,11 @@ bool GUI_App::on_init_inner()
48
mainframe->Show(true);
49
BOOST_LOG_TRIVIAL(info) << "main frame firstly shown";
50
51
+ if (scrn) {
52
+ scrn->Close();
53
+ scrn = nullptr;
54
+ }
55
+
56
//#if BBL_HAS_FIRST_PAGE
57
//BBS: set tp3DEditor firstly
58
/*plater_->canvas3D()->enable_render(false);
59
@@ -5000,7 +5006,7 @@ void GUI_App::check_new_version(bool show_tips, int by
60
#ifdef __APPLE__
61
platform = "macos";
62
#endif
63
-#ifdef __LINUX__
64
+#if defined(__linux__) || defined(__FreeBSD__)
65
platform = "linux";
66
#endif
67
std::string query_params = (boost::format("?name=slicer&version=%1%&guide_version=%2%")
68
@@ -5083,7 +5089,7 @@ std::string detect_updater_os()
69
return "win";
70
#elif defined(__APPLE__)
71
return "macos";
72
-#elif defined(__linux__) || defined(__LINUX__)
73
+#elif defined(__linux__) || defined(__LINUX__) || defined(__FreeBSD__)
74
return "linux";
75
#else
76
return "unknown";
77
@@ -6151,7 +6157,7 @@ bool GUI_App::switch_language()
78
}
79
}
80
81
-#ifdef __linux__
82
+#if defined(__linux__) || defined(__FreeBSD__)
83
static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language,
84
const wxLanguageInfo* system_language)
85
{
86
@@ -6359,7 +6365,7 @@ bool GUI_App::load_language(wxString language, bool in
87
m_language_info_best->CanonicalName.ToUTF8().data();
88
app_config->set("language", m_language_info_best->CanonicalName.ToUTF8().data());
89
}
90
-#ifdef __linux__
91
+#if defined(__linux__) || defined(__FreeBSD__)
92
wxString lc_all;
93
if (wxGetEnv("LC_ALL", &lc_all) && !lc_all.IsEmpty()) {
94
// Best language returned by wxWidgets on Linux apparently does not respect LC_ALL.
95
@@ -6417,7 +6423,7 @@ bool GUI_App::load_language(wxString language, bool in
96
BOOST_LOG_TRIVIAL(info) << "Using Czech dictionaries for Slovak language";
97
}
98
99
-#ifdef __linux__
100
+#if defined(__linux__) || defined(__FreeBSD__)
101
// If we can't find this locale , try to use different one for the language
102
// instead of just reporting that it is impossible to switch.
103
if (!wxLocale::IsAvailable(locale_language_info->Language) && m_language_info_system) {
104
@@ -7599,7 +7605,7 @@ void GUI_App::show_desktop_integration_dialog()
105
106
void GUI_App::show_desktop_integration_dialog()
107
{
108
-#ifdef __linux__
109
+#if defined(__linux__) || defined(__FreeBSD__)
110
//wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
111
DesktopIntegrationDialog dialog(mainframe);
112
dialog.ShowModal();
113
@@ -7985,7 +7991,7 @@ void GUI_App::associate_url(std::wstring url_prefix)
114
key_full.Create(false);
115
}
116
key_full = key_string;
117
-#elif defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
118
+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION)
119
DesktopIntegrationDialog::perform_downloader_desktop_integration(into_u8(url_prefix));
120
#endif // WIN32
121
}
122
123