-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Various flatpak fixes and improvements #9527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@anarsoul However, I do want to say that if a solution could be found using C or C++ rather than python, I'd imagine that would be significantly better than the solution I ported over from Prusa Slicer. |
Can you check that you have xdg-desktop-platform-kde installed? And also that you don't have GTK_THEME env variable set? If you can reach out to me on discord, I can try help to debug it.
The thing is that we already have this solution implemented in C code, see The only difference is that it didn't have ORCA_SLICER_DARK_THEME, which is added by this PR. |
The "solution" from PrusaSlicer never actually worked in the BambuStudio Flatpak, FWIW. |
@@ -221,6 +195,12 @@ modules: | |||
dest: external-packages/GMP | |||
sha256: eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c | |||
|
|||
# curl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For CURL and OpenSSL, any reason why you're building those? The runtime versions should be new enough (curl 8.13.0 and openssl 3.3.3).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a way to disable building these. No one backported your patches from Bambu Studio for disabling built-in deps
@cochcoder have you had a chance to do that? |
The issue with dark mode and Plasma (and Breeze being default Gtk theme in Plasma) is upstream issue: flathub/org.gtk.Gtk3theme.Breeze#170 Gtk cannot find Breeze-Dark theme that is specified in the config, but not provided by org.gtk.Gtk3theme.Breeze, because it moves the files around @cochcoder did you have a change to try setting GTK_THEME=Breeze and see whether the issue goes away for you? |
We carry a wxgtk patch [1] that detects dark theme automatically. If it doesn't work, it means that either selected Gtk theme is not installed in flatpak environment, or appropriate xdg-desktop-portal for the DE is not installed. Plasma users may need to install org.gtk.Gtk3theme.Adapta Also see https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Settings.html [1] 0001-Enable-using-a-dark-theme-when-Gnome-dark-style-is-s.patch
If ORCA_SLICER_DARK_THEME is set, dark theme will be applied regardless of system settings.
Pick up build error fix from upstream: Open-Cascade-SAS/OCCT@7236e83 /run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx: In member function ‘Standard_Boolean StdPrs_BRepFont::renderGlyph(Standard_Utf32Char, TopoDS_Shape&)’: /run/build/BambuStudio/deps/build/dep_OCCT-prefix/src/dep_OCCT/src/StdPrs/StdPrs_BRepFont.cxx:465:30: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ [-fpermissive] 465 | const char* aTags = &anOutline->tags[aStartIndex]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | unsigned char*
Newer cmake switched to using BoostConfig.cmake shipped with boost-1.70 or later for detecting boost, to preserve old behavior policy CMP0167 was introduced. Set it to "NEW" to indicate that we want to use .cmake shipped with boost
Gnome 47 has been released a while ago
@SoftFever can you merge this please? Dark mode in Plasma is an upstream (upstreamier :)) issue that is tracked in flathub/org.gtk.Gtk3theme.Breeze#170 This PR also updates runtime version to 47 |
@Noisyfox maybe you can take a look? |
Description
This PR has a various flatpak fixes and improvements:
We already carry a patch for wxgtk to properly select dark theme (if it's available). If it doesn't work, it means that either xdg-desktop-portal is not installed, or selected Gtk theme is not installed in flatpak environment.
Plasma users may need to install org.gtk.Gtk3theme.Adapta
Handle ORCA_SLICER_DARK_THEME env variable in C code instead of carrying completely unnecessary python helpers (again, we already have this code in wxgtk, no need to duplicate it in python). Users of ORCA_SLICER_DARK_THEME env variable can continue using it seamlessly
Bump runtime version to gnome-47 and fix build issues introduced by the switch.
Tests
I verified that the flatpak with these changes works for me, including choosing the dark or light mode system-wide in plasma and forcing dark mode with ORCA_SLICER_DARK_THEME
@cochcoder I'd appreciate the testing from your side
@SoftFever I can help with reviewing flatpak-related PRs if you tag me. I don't monitor all the PRs, but I do pay attention to notification emails