-
Notifications
You must be signed in to change notification settings - Fork 66
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
Migrate to KDE Plasma 6 #344
Conversation
Initial attempts to port to KDE Plasma 6 + Qt 6, but QML things currently breaks Plasma 5. Uses CMake flag `-D QT_MAJOR_VERSION=6` to control. Plugin not showing up in setings, but can be loaded if Plasma 6 loads config of Plasma 5. Mouse position is also broken. Some hacks are used, marked with "TODO" in code. Signed-off-by: fxzjshm <fxzjshm@163.com>
`plasma_install_package` is moved to Plasma package. Signed-off-by: fxzjshm <fxzjshm@163.com>
Plasma 6 dropped support of reading metadata.desktop, so converted to metadata.json (`desktoptojson -i <file>`, as suggested by configuration step with Plasma 5) with minor edits. Also adapted to new APIs in QML files. TODO: Icons in settings page is missing. Signed-off-by: fxzjshm <fxzjshm@163.com>
Explicitly resolve URLs to restore the old behavior. Reference: https://doc.qt.io/qt-6/qml-changes-qt6.html#url-resolution Signed-off-by: fxzjshm <fxzjshm@163.com>
Fixes: 09f7fc2 ("Fix compile error with Plasma 6") Signed-off-by: fxzjshm <fxzjshm@163.com>
TODO: contents/ui/main.qml:163: TypeError: Cannot read property 'activity' of null Signed-off-by: fxzjshm <fxzjshm@163.com>
C++ part should be compatible with Qt 5 and 6 now, but didn't find how to make QML code compatible with both. So this PR may serve as a separate branch with KDE Plasma 6 support, and anyone interested in this can build and test it. |
It fails to install via install_pkg and works with very few backgrounds, mine of which seems to be broken even though its just an image with basic shaders |
@Kaydax The scene you mentioned seems to work on my side. Please provide more detail, e.g. error log & behavior of the program. |
No error log, just shows a blank white screen as the background when the scene is loaded. I also have issues with selecting the steam folder to even select themes in the first place so I think something is just very wrong on my end or something is not compiling right. |
Ok I wonder if it has something to do with QT paths trying to use QT 5 instead of 6, im going to retest this now once I set qt6 as my main qt |
Here is one error im getting when running
|
Ok so found one issue. My scene works only if its downloaded from the workshop, but if its using the raw source files of the wallpaper engine project, it refuses to work. This has never been an issue up until now |
Same as you, here is Archlinux updated. |
@Kaydax @kamikaze211 |
Sorry, maybe it is my problem. Here is what I did in my terminal:
And I got the error message. |
Oh, my fault, forget to set default branch of forked repository to this. Have changed to
inside |
I tried it again.
And I still got this error:
Is there any mistake did I make? |
Weird. Could you please post system information and CMake configure log?
KF6 version should be 5.245.0 or later. I suspect it still uses Plasma 5 somehow. I've made a fresh install of Arch Linux in VM, enabled |
Very sorry to waste a lot of your time.
Here is some packages about kf6 that is not on version 5.249:
Also I tried to find the packages about kf5:
So should I uninstall kf5 packages? |
I checked the printout message when I execute the command :
It contains the 2 lines:
But also has some warning message:
|
@kamikaze211 Noticed that kpackagetool6 -i plugin/ || kpackagetool6 -u plugin/ for installing and upgrading; Footnotes |
@fxzjshm
But after I restart plasma service, I still cannot find the wallpaper-engine-kde-plugin in desktop/wallpaper settings. |
After some researching, I tried to remove something, and rebuild everything, and now it works.
After all of this, I can use this plugin on Plasma 6 RC2 now. Also, if you need scene wallpaper support, just run this:
|
wow, this worked for me too, even after I thought I tried this before, I must have missed something when deleting, thank you for sharing your steps to solve it |
Here's an amateur bash script using the commands you provided. I prefer to keep my git projects in a ~/.gtclone folder. #!/bin/bash
#remove everything that had been existed.
rm -r ~/.local/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde
rm -r ~/.local/share/kpackage/generic/com.github.casout.wallpaperEngineKde/
sudo rm -r /usr/share/plasma/wallpapers/com.github.casout.wallpaperEngineKde/
sudo rm /usr/lib/qt6/qml/com/github/catsout/wallpaperEngineKde/libWallpaperEngineKde.so
sudo rm -r /usr/lib/qt6/qml/com/github/catsout/wallpaperEngineKde/qmldir
#build from source
mkdir -p ~/.gtclone
cd ~/.gtclone
git clone https://github.com/fxzjshm/wallpaper-engine-kde-plugin ; cd wallpaper-engine-kde-plugin/
git fetch && git checkout qt6 && git submodule update --init
mkdir -p build ; cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DQT_MAJOR_VERSION=6 -DUSE_PLASMAPKG=ON && make -j$nproc && kpackagetool6 -i ../plugin/ && sudo make install && systemctl --user restart plasma-plasmashell.service I'm getting a build error for mpv, I'm running openSUSE Tumbleweed with the unstable kde repos enabled. This is the relevant cmake error. I do have mpv-devel installed. Your branch is up to date with 'origin/qt6'.
-- QT_MAJOR_VERSION = 6
CMake Deprecation Warning at src/backend_scene/third_party/glslang/CMakeLists.txt:36 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at src/backend_scene/third_party/glslang/CMakeLists.txt:247 (find_package):
Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
are removed. Run "cmake --help-policy CMP0148" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
src/backend_scene/third_party/glslang/CMakeLists.txt:311 (find_host_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Google Mock was not found - tests based on that will not build
-- spirv-tools not linked - illegal SPIRV may be generated for HLSL
-- Configuring done (0.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/domglusk/.gtclone/wallpaper-engine-kde-plugin/build
[ 0%] Built target mpvbackend_autogen_timestamp_deps
[ 2%] Built target OSDependent
[ 3%] Built target HLSL
[ 5%] Built target spirv-reflect
[ 7%] Built target GenericCodeGen
[ 9%] Built target glad
[ 10%] Built target OGLCompiler
[ 14%] Built target wpUtils
[ 14%] Built target mpvbackend_autogen
[ 17%] Built target wpTimer
[ 18%] Built target wpAudio
[ 22%] Built target wpRGraph
[ 23%] Built target wpLooper
[ 48%] Built target MachineIndependent
[ 51%] Built target wpParticle
[ 54%] Built target mpvbackend
[ 55%] Built target glslang
[ 62%] Built target SPIRV
[ 67%] Built target wpScene
[ 75%] Built target wpVulkan
[ 80%] Built target wpVulkanRender
[ 92%] Built target wescene-renderer
[ 92%] Built target wescene-renderer-qml_autogen_timestamp_deps
[ 93%] Built target wescene-renderer-qml_autogen
[ 96%] Built target wescene-renderer-qml
[ 96%] Built target WallpaperEngineKde_autogen_timestamp_deps
[ 96%] Built target WallpaperEngineKde_autogen
[ 97%] Linking CXX shared library libWallpaperEngineKde.so
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: backend_mpv/libmpvbackend.a(MpvBackend.cpp.o): warning: relocation against `_ZN7QString6_emptyE@@Qt_6' in read-only section `.text'
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: backend_mpv/libmpvbackend.a(MpvBackend.cpp.o): relocation R_X86_64_PC32 against symbol `__libc_single_threaded@@GLIBC_2.32' cannot be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/WallpaperEngineKde.dir/build.make:183: src/libWallpaperEngineKde.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:713: src/CMakeFiles/WallpaperEngineKde.dir/all] Error 2
make: *** [Makefile:136: all] Error 2 |
Reproduced on a fresh install of openSUSE Tumbleweed, but with a different error log:
and not reproduced if compile with Clang |
|
Add flags Alternatively, as the error log indicates, enabling position-independent code on all targets ( |
This fixes errors like "relocation R_X86_64_PC32 against symbol `...' cannot be used when making a shared object" when building on openSUSE Tumbleweed. Related log: catsout#344 (comment) Signed-off-by: fxzjshm <fxzjshm@163.com>
I found a problem that: scene wallpapers can't scroll on Y axis. Sorry I didn't see the TODO list. Finally, I had successfully made a desktop file to help me to open scene.pkg file first you need to compile the sceneviewerdo as this : #344 (comment) create a desktop file
edit the desktop file
copy & patse the contents below into it and save
notice that:this is just en example restart dolphin, and select scene.pkg file with right click, then choose open with ...search & select the open_with_sceneviewer option, then you will get a window show the scene wallpaperoptional:you can use the plugin to conveniently open the folders where the scene.pkg file is |
Your updating code makes it compile correctky and install, but it's not showing up as a wallpaper plugin option in the wallpaper settings. |
That's strange, it shows up in my virtual machine. |
If you had tried to install before, then some files may be existed, make sure you had deleted them first.
Then use USE_PLASMAPKG=OFF for system-wide installation From #344 (comment) |
Has anyone else experience on QT6.7 (arch beta) the select library folder just does nothing? |
@Logical-sh |
debug.log |
I am a developer, so I am comfortable trying things/patches, I am just very not familiar with qt/kde coding. |
Reported by @Logical-sh at catsout#344 (comment) Fixes: de11e8b ("Fix settings page") Signed-off-by: fxzjshm <fxzjshm@163.com>
@Logical-sh |
Scenes are working just fine, but plasma crashes every time consistently when switching, and web wallpapers do not work. I get
|
Due to QtMultimedia and Plasma Workspace updated to 6, there are three issues.
I tried to modify QtMultimedia.qml following this site: MediaPlayer QML Type. The errors were gone, but what I got was blackscreen without loading any videos. (Lots of properties seem deprecated on QtMultimedia 6) |
also getting this not sure if its the same as above. back on plasma 5 this same wallpaper works fine
|
All webpage wallpapers appear to be broken, for scenes I believe the ones that were working on plasma5 also work on plasma6, could someone on plasma5 please test if this scene is broken on plasma5, it's broken on plasma6. |
Amazing! Worked for me as well! |
It looks like there is an open bug for qt6 regarding missing flushMode, not sure if it was intentional or not: https://bugreports.qt.io/browse/QTBUG-110310 |
For me web is not working everything else seems to be working. Garuda - arch kde 6.0.1 https://bin.garudalinux.org/?536f8d8dde6dfa56#2pA7A8JBj7bzV51tmmX7UoYkK8BQRufo41ibaqnaN2Us |
When I deleted flushmode on the code, it still showed a lot of non-existent properties such as source, muted, volume and so on. It's no doubt that the whole code of the backend of QtMultimedia needs to be reworked. I'm not familiar with Qt and QML, so I have no idea about it. Also, the detection of window on Plasma 6 does change, that's why we can't let the backend of MPV pause on any focused or maximized windows. WindowModel.qml is also needed to be reworked. |
I built this and installed it and works great but there's 2 major issues.
edit: actually it pauses when "pause if PC is on battery power" is enabled, but thats it |
The problem is fixed now, see solution at #367 (comment) |
Operating System: Manjaro Linux |
Initial attempts to port to KDE Plasma 6 + Qt 6,
but changes in QML files currently break Plasma 5.
Uses CMake flag
-D QT_MAJOR_VERSION=6
to build for Plasma 6, likecmake ~/workspace/wallpaper-engine-kde-plugin -DQT_MAJOR_VERSION=6 -DUSE_PLASMAPKG=OFF
TODO:
Plugin not showing up in settings, but can be loaded if Plasma 6 loads config of Plasma 5.Migrated.brokenunusable with "Folder view" layout because unknown layer covering on desktop; works with "Desktop" layout & in standalone viewer.Some hacks are used, marked with "TODO" in code.Related: #339
I'm new to Qt and KDE so can only fix simplest things like API changes;
more experienced developer may needed.