psifidotos / applet-window-appmenu

Plasma 5 applet in order to show the window appmenu
GNU General Public License v2.0
419 stars 33 forks source link

errors #220

Open vir-staring opened 1 year ago

vir-staring commented 1 year ago

Here is the content when installing

CMake Warning (dev) at CMakeLists.txt:1 (project): cmake_minimum_required() should be called prior to this top-level project() call. Please see the cmake-commands(7) manual for usage documentation of both commands. This warning is for project developers. Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 12.2.1 -- The CXX compiler identification is GNU 12.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message): Your project should require at least CMake 3.16.0 to use FindKF5.cmake Call Stack (most recent call first): /usr/share/ECM/find-modules/FindKF5.cmake:30 (ecm_find_package_version_check) CMakeLists.txt:19 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

Installing in /usr. Run /home/vir/Documents/applet-window-appmenu/build/prefix.sh to set the environment for applet_window_appmenu. -- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found KF5Plasma: /usr/lib/cmake/KF5Plasma/KF5PlasmaConfig.cmake (found version "5.105.0") -- Found KF5Wayland: /usr/lib/cmake/KF5Wayland/KF5WaylandConfig.cmake (found version "5.105.0") -- Found KF5WindowSystem: /usr/lib/cmake/KF5WindowSystem/KF5WindowSystemConfig.cmake (found version "5.105.0") -- Found KF5ConfigWidgets: /usr/lib/cmake/KF5ConfigWidgets/KF5ConfigWidgetsConfig.cmake (found version "5.105.0") -- Found KF5: success (found suitable version "5.105.0", minimum required is "5.38.0") found components: Plasma Wayland WindowSystem ConfigWidgets -- Looking for GLIBC -- Looking for GLIBC - found -- Performing Test _OFFT_IS_64BIT -- Performing Test _OFFT_IS_64BIT - Success -- Performing Test HAVE_DATE_TIME -- Performing Test HAVE_DATE_TIME - Success CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message): Your project should require at least CMake 3.16.0 to use FindXCB.cmake Call Stack (most recent call first): /usr/share/ECM/find-modules/FindXCB.cmake:67 (ecm_find_package_version_check) CMakeLists.txt:35 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found XCB_XCB: /usr/lib/libxcb.so (found version "1.15") -- Found XCB_RANDR: /usr/lib/libxcb-randr.so (found version "1.15") -- Found XCB: /usr/lib/libxcb.so;/usr/lib/libxcb-randr.so (found version "1.15") found components: XCB RANDR -- KF5 VERSION : 5.105.0 -- KF5 VERSION CURRENT MINOR : 105 -- LibTaskManager VERSION : 5.27.4 -- LibTaskManager CURRENT VERSION : 27 Installing in /usr. Run /home/vir/Documents/applet-window-appmenu/build/prefix.sh to set the environment for applet_window_appmenu. CMake Warning at /usr/lib/cmake/KF5CoreAddons/KF5CoreAddonsMacros.cmake:37 (message): kcoreaddons_desktop_to_json is deprecated and will be removed in KF6. Convert the desktop files to JSON in source using the desktoptojson executable Call Stack (most recent call first): lib/CMakeLists.txt:8 (kcoreaddons_desktop_to_json)

CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message): Your project should require at least CMake 3.16.0 to use FindXCB.cmake Call Stack (most recent call first): /usr/share/ECM/find-modules/FindXCB.cmake:67 (ecm_find_package_version_check) plugin/CMakeLists.txt:30 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found XCB: /usr/lib/libxcb.so;/usr/lib/libxcb-randr.so (found version "1.15") found components: XCB CMake Warning at /usr/lib/cmake/KF5Package/KF5PackageMacros.cmake:46 (message): Providing metadata with .desktop files is deprecated. Please run "desktoptojson -i /home/vir/Documents/applet-window-appmenu/package/metadata.desktop" to convert the file to json and remove the desktop file Call Stack (most recent call first): /usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake:36 (kpackage_install_package) CMakeLists.txt:74 (plasma_install_package)

CMake Warning at /usr/lib/cmake/KF5CoreAddons/KF5CoreAddonsMacros.cmake:37 (message): kcoreaddons_desktop_to_json is deprecated and will be removed in KF6. Convert the desktop files to JSON in source using the desktoptojson executable Call Stack (most recent call first): /usr/lib/cmake/KF5Package/KF5PackageMacros.cmake:49 (kcoreaddons_desktop_to_json) /usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake:36 (kpackage_install_package) CMakeLists.txt:74 (plasma_install_package)

-- Configuring done (1.8s) CMake Warning at plugin/CMakeLists.txt:12 (add_library): Cannot generate a safe runtime search path for target appmenuplugin because files in some directories may conflict with libraries in implicit directories:

runtime library [libxcb.so.1] in /usr/lib may be hidden by files in:
  /opt/anaconda/lib

Some of these libraries may not be found correctly.

-- Generating done (0.0s) -- Build files have been written to: /home/vir/Documents/applet-window-appmenu/build [ 3%] Automatic MOC for target dbusmenuqt [ 6%] Generating metadata.json [ 9%] Generating org.kde.windowappmenu-plasmoids-metadata.json [ 12%] Automatic MOC for target appmenutest About to parse service type file "/usr/share/kservicetypes5/plasma-applet.desktop" Found property definition "X-Plasma-API" with type "QString" Found property definition "X-Plasma-RootPath" with type "QString" Found property definition "X-Plasma-MainScript" with type "QString" Found property definition "X-Plasma-ContainmentType" with type "QString" Found property definition "X-Plasma-DropMimeTypes" with type "QStringList" Found property definition "X-Plasma-DropUrlPatterns" with type "QStringList" Found property definition "X-Plasma-NotificationArea" with type "QString" Found property definition "X-Plasma-NotificationAreaCategory" with type "QString" Found property definition "X-Plasma-DBusActivationService" with type "QString" Found property definition "X-KDE-ParentApp" with type "QString" Found property definition "X-Plasma-Provides" with type "QStringList" Found property definition "X-Plasma-PreloadWeight" with type "int" Found property definition "X-Plasma-ConfigPlugins" with type "QStringList" Found property definition "X-Plasma-StandAloneApp" with type "bool" Found property definition "X-Plasma-RequiredExtensions" with type "QStringList" Found property definition "NoDisplay" with type "bool" Generated "/home/vir/Documents/applet-window-appmenu/build/lib/metadata.json" About to parse service type file "/usr/share/kservicetypes5/plasma-applet.desktop" Found property definition "X-Plasma-API" with type "QString" Found property definition "X-Plasma-RootPath" with type "QString" Found property definition "X-Plasma-MainScript" with type "QString" Found property definition "X-Plasma-ContainmentType" with type "QString" Found property definition "X-Plasma-DropMimeTypes" with type "QStringList" Found property definition "X-Plasma-DropUrlPatterns" with type "QStringList" Found property definition "X-Plasma-NotificationArea" with type "QString" Found property definition "X-Plasma-NotificationAreaCategory" with type "QString" Found property definition "X-Plasma-DBusActivationService" with type "QString" Found property definition "X-KDE-ParentApp" with type "QString" Found property definition "X-Plasma-Provides" with type "QStringList" Found property definition "X-Plasma-PreloadWeight" with type "int" Found property definition "X-Plasma-ConfigPlugins" with type "QStringList" Found property definition "X-Plasma-StandAloneApp" with type "bool" Found property definition "X-Plasma-RequiredExtensions" with type "QStringList" Found property definition "NoDisplay" with type "bool" Generated "/home/vir/Documents/applet-window-appmenu/build/org.kde.windowappmenu-plasmoids-metadata.json" [ 15%] Automatic MOC for target plasma_applet_windowappmenu [ 15%] Built target org.kde.windowappmenu-plasmoids-metadata-json [ 15%] Built target appmenutest_autogen [ 21%] Building CXX object plugin/libdbusmenuqt/test/CMakeFiles/appmenutest.dir/main.cpp.o [ 21%] Building CXX object plugin/libdbusmenuqt/test/CMakeFiles/appmenutest.dir/appmenutest_autogen/mocs_compilation.cpp.o [ 21%] Built target dbusmenuqt_autogen [ 24%] Generating dbusmenu_interface.cpp, dbusmenu_interface.h [ 27%] Generating dbusmenu_interface.moc [ 39%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/debug.cpp.o [ 39%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/dbusmenuqt_autogen/mocs_compilation.cpp.o [ 39%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/dbusmenutypes_p.cpp.o [ 42%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/dbusmenuimporter.cpp.o [ 42%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/dbusmenushortcut_p.cpp.o [ 45%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/dbusmenu_interface.cpp.o [ 48%] Building CXX object plugin/libdbusmenuqt/CMakeFiles/dbusmenuqt.dir/utils.cpp.o [ 48%] Built target plasma_applet_windowappmenu_autogen [ 51%] Building CXX object lib/CMakeFiles/plasma_applet_windowappmenu.dir/plasma_applet_windowappmenu_autogen/mocs_compilation.cpp.o [ 54%] Building CXX object lib/CMakeFiles/plasma_applet_windowappmenu.dir/decorationpalette.cpp.o [ 57%] Building CXX object lib/CMakeFiles/plasma_applet_windowappmenu.dir/appmenuapplet.cpp.o [ 60%] Linking CXX executable ../../../bin/appmenutest [ 60%] Built target appmenutest /home/vir/Documents/applet-window-appmenu/lib/appmenuapplet.cpp: 在构造函数‘AppMenuApplet::AppMenuApplet(QObject, const QVariantList&)’中: /home/vir/Documents/applet-window-appmenu/lib/appmenuapplet.cpp:51:34: 警告:‘Plasma::Applet::Applet(QObject, const QVariantList&)’ is deprecated: Since 5.86. use Applet(QObject , KPluginMetaData, QVariantList) instead [-Wdeprecated-declarations] 51 | : Plasma::Applet(parent, data) | ^ In file included from /usr/include/KF5/Plasma/Applet:1, from /home/vir/Documents/applet-window-appmenu/lib/appmenuapplet.h:24, from /home/vir/Documents/applet-window-appmenu/lib/appmenuapplet.cpp:22: /usr/include/KF5/plasma/applet.h:731:5: 附注:在此声明 731 | Applet(QObject parent, const QVariantList &args); | ^~ [ 63%] Linking CXX shared module ../bin/plasma_applet_windowappmenu.so [ 63%] Built target plasma_applet_windowappmenu [ 66%] Linking CXX static library ../../lib/libdbusmenuqt.a [ 66%] Built target dbusmenuqt [ 69%] Automatic MOC for target appmenuplugin [ 69%] Built target appmenuplugin_autogen [ 78%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/appmenuplugin_autogen/mocs_compilation.cpp.o [ 78%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/appmenuplugin.cpp.o [ 84%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/commontools.cpp.o [ 93%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/appmenumodel.cpp.o [ 93%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/schemecolors.cpp.o [ 93%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/schemesmodel.cpp.o [ 93%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/wm/abstractwindowmanager.cpp.o [ 93%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/wm/waylandwindowmanager.cpp.o [ 96%] Building CXX object plugin/CMakeFiles/appmenuplugin.dir/wm/x11fallbackwindowmanager.cpp.o /home/vir/Documents/applet-window-appmenu/plugin/wm/waylandwindowmanager.cpp: 在 lambda 函数中: /home/vir/Documents/applet-window-appmenu/plugin/wm/waylandwindowmanager.cpp:107:49: 警告:‘quint32 KWayland::Client::PlasmaWindow::internalId() const’ is deprecated: Since 5.73. Use PlasmaWindow::uuid(const QString &) [-Wdeprecated-declarations] 107 | return w->isValid() && w->internalId() == wid.toUInt(); | ~~~~~^~ In file included from /home/vir/Documents/applet-window-appmenu/plugin/wm/waylandwindowmanager.h:33, from /home/vir/Documents/applet-window-appmenu/plugin/wm/waylandwindowmanager.cpp:20: /usr/include/KF5/KWayland/KWayland/Client/plasmawindowmanagement.h:505:13: 附注:在此声明 505 | quint32 internalId() const; | ^~~~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp: 在构造函数‘WM::X11FallbackWindowManager::X11FallbackWindowManager(QObject)’中: /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:51:52: 警告:‘void KWindowSystem::activeWindowChanged(WId)’ is deprecated: Since 5.101. Use KX11Extras::activeWindowChanged() [-Wdeprecated-declarations] 51 | connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, | ^~~~~~~ In file included from /usr/include/KF5/KWindowSystem/KWindowSystem:1, from /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.h:28, from /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:20: /usr/include/KF5/KWindowSystem/kwindowsystem.h:919:10: 附注:在此声明 919 | void activeWindowChanged(WId id); | ^~~~~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:55:86: 警告:‘void KWindowSystem::windowChanged(WId)’ is deprecated: Since 5.80. Use KWindowSystem::windowChanged(WId, NET::Properties, NET::Properties2) [-Wdeprecated-declarations] 55 | , static_cast<void (KWindowSystem::)(WId)>(&KWindowSystem::windowChanged) | ^ /usr/include/KF5/KWindowSystem/kwindowsystem.h:1027:10: 附注:在此声明 1027 | void windowChanged(WId id); // clazy:exclude=overloaded-signal | ^~~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:55:86: 警告:‘void KWindowSystem::windowChanged(WId)’ is deprecated: Since 5.80. Use KWindowSystem::windowChanged(WId, NET::Properties, NET::Properties2) [-Wdeprecated-declarations] 55 | , static_cast<void (KWindowSystem::)(WId)>(&KWindowSystem::windowChanged) | ^ /usr/include/KF5/KWindowSystem/kwindowsystem.h:1027:10: 附注:在此声明 1027 | void windowChanged(WId id); // clazy:exclude=overloaded-signal | ^~~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:60:73: 警告:‘void KWindowSystem::windowRemoved(WId)’ is deprecated: Since 5.101. Use KX11Extras::windowRemoved() [-Wdeprecated-declarations] 60 | , static_cast<void (KWindowSystem::)(WId)>(&KWindowSystem::windowRemoved) | ^~~~~ /usr/include/KF5/KWindowSystem/kwindowsystem.h:909:10: 附注:在此声明 909 | void windowRemoved(WId id); | ^~~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:72:54: 警告:‘static WId KWindowSystem::activeWindow()’ is deprecated: Since 5.101. Use KX11Extras::activeWindow() instead [-Wdeprecated-declarations] 72 | onActiveWindowChanged(KWindowSystem::activeWindow()); | ~~~~~~~^~ /usr/include/KF5/KWindowSystem/kwindowsystem.h:126:16: 附注:在此声明 126 | static WId activeWindow(); | ^~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp: 在成员函数‘void WM::X11FallbackWindowManager::filterWindow(KWindowInfo&)’中: /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:109:91: 警告:‘static WId KWindowSystem::activeWindow()’ is deprecated: Since 5.101. Use KX11Extras::activeWindow() instead [-Wdeprecated-declarations] 109 | const bool isActive = m_filterByActive ? info.win() == KWindowSystem::activeWindow() : true; | ~~~~~~~^~ /usr/include/KF5/KWindowSystem/kwindowsystem.h:126:16: 附注:在此声明 126 | static WId activeWindow(); | ^~~~ /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp: 在成员函数‘virtual bool WM::X11FallbackWindowManager::nativeEventFilter(const QByteArray&, void, long int)’中: /home/vir/Documents/applet-window-appmenu/plugin/wm/x11fallbackwindowmanager.cpp:274:70: 警告:‘static WId KWindowSystem::activeWindow()’ is deprecated: Since 5.101. Use KX11Extras::activeWindow() instead [-Wdeprecated-declarations] 274 | onActiveWindowChanged(KWindowSystem::activeWindow()); | ~~~~~~~^~ /usr/include/KF5/KWindowSystem/kwindowsystem.h:126:16: 附注:在此声明 126 | static WId activeWindow(); | ^~~~ [100%] Linking CXX shared library ../bin/libappmenuplugin.so [100%] Built target appmenuplugin [sudo] vir 的密码:[ 3%] Built target org.kde.windowappmenu-plasmoids-metadata-json [ 6%] Automatic MOC for target plasma_applet_windowappmenu [ 9%] Built target plasma_applet_windowappmenu_autogen [ 21%] Built target plasma_applet_windowappmenu [ 24%] Automatic MOC for target dbusmenuqt [ 24%] Built target dbusmenuqt_autogen [ 54%] Built target dbusmenuqt [ 57%] Automatic MOC for target appmenuplugin [ 57%] Built target appmenuplugin_autogen [ 87%] Built target appmenuplugin [ 90%] Automatic MOC for target appmenutest [ 90%] Built target appmenutest_autogen [100%] Built target appmenutest

Here is error

Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.windowappmenu/contents/ui/main.qml:29:1: module "org.kde.private.windowAppMenu" is not installed

renyuneyun commented 1 year ago

Hi. What was the command you executed when encountering the error? And what other things you did before encountering this issue? (In particular, did you enter your password as prompted?) You only described some results, but it's very hard to give explanations without knowing the actions (and contexts) that caused the results.

By the way, please quote the errors with code block formatting -- add ``` to the beginning and end (each taking a whole line) of your copied error console outputs. It would make it a lot easier to read.

AndydeCleyre commented 1 year ago

I experience the same error when trying to use the applet, having installed it like this on Pop OS:

$ git clone https://github.com/psifidotos/applet-window-appmenu
$ cd applet-window-appmenu
$ sudo apt install make cmake extra-cmake-modules qtdeclarative5-dev libkf5plasma-dev libqt5x11extras5-dev g++ libsm-dev libkf5configwidgets-dev libkdecorations2-dev libxcb-randr0-dev libkf5wayland-dev plasma-workspace-dev
$ $EDITOR install.sh  # I commented out the last line: 'sudo make install'
$ sh ./install.sh
$ kpackagetool5 -t Plasma/Applet -i package

EDIT: Well I'm trying to do this at the user level, and am not there yet, but getting closer:

diff --git a/install.sh b/install.sh
index 8dbc9a3..da1bdc1 100755
--- a/install.sh
+++ b/install.sh
@@ -2,6 +2,6 @@ if ! [ -a build ] ; then
     mkdir build
 fi
 cd build
-cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release  .. -Wnodev
+cmake -DCMAKE_INSTALL_PREFIX=${HOME}/.local -DCMAKE_BUILD_TYPE=Release  .. -Wnodev
 make -j$(nproc)
-sudo make install
+make install

This doesn't yet replace, e.g. /usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/applets/plasma_applet_windowappmenu.so with a user-level location. Will update this comment after looking closer.

I'm hoping I can just set KDE_INSTALL_PLUGINDIR to something user-level.


EDIT: I gave up and just gave it root permissions to install where it wants and it works fine.