blackadderkate / weather-widget-2

Updated version of Weather Widget by Kotelnik
GNU General Public License v2.0
106 stars 23 forks source link

(Plasma 6 beta) Widget wont install to panel for new user account for @Drommer #165

Closed blackadderkate closed 7 months ago

blackadderkate commented 8 months ago

In my current user account (where the applet was added to the panel and configured) everything works fine after upgrading from Plasma 5 to Plasma 6 and upgrading the applet. I created a new user to set up Plasma 6 cleanly, but adding an applet to the panel is not working. I see a message about incompatibility with the current version of Plasma. Any idea why this is happening?

Originally posted by @Drommer in https://github.com/blackadderkate/weather-widget-2/issues/157#issuecomment-1984268869

blackadderkate commented 8 months ago

@drommer Are you using the version you compiled? It could be a permissions issue...

lainedfles commented 8 months ago

Hi, @blackadderkate thanks for your efforts with this plasmoid! I've submitted #166 which resolves problems building on Archlinux.

@Drommer I presume that you're the AUR packager? If so, thank you for your work there as well! In case you're interested, here is an attached plasma6-applets-weather-widget-3-git.patch.txt & inline diff of my PKGBUILD modifications to get this working on my systems (presuming wget https://github.com/blackadderkate/weather-widget-2/pull/166.patch has been executed):

diff --git a/PKGBUILD b/PKGBUILD
index e2a28fb..6bc6ad8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,18 @@
 # Maintainer: Drommer <drommer@github.com>

 _gitname="weather-widget-2"
-pkgname=plasma5-applets-weather-widget-2-git
-pkgver=r191.02b7367
+pkgname=plasma6-applets-weather-widget-3-git
+pkgver=r334.2cd11f5
 pkgrel=1
 pkgdesc="An updated version of the plasma-applet-weather-widget by Kotelnik"
 arch=('x86_64')
 url="https://github.com/blackadderkate/$_gitname"
 license=('GPL')
-depends=('plasma-workspace' 'qt5-graphicaleffects' 'qt5-xmlpatterns')
+depends=('plasma-workspace' 'qt6-5compat' 'qt6-declarative')
 makedepends=('git' 'extra-cmake-modules')
-source=("git+$url.git")
-sha256sums=('SKIP')
+source=("git+$url.git#branch=QT6" '166.patch')
+sha256sums=('SKIP'
+            'a46e9913c8bab0190757ae26ab44d11de81261a0b199d9dadf9b0e6401d8d2ac')

 pkgver() {
     cd "$_gitname"
@@ -20,6 +21,7 @@ pkgver() {

 prepare() {
   mkdir -p build
+  patch --directory="${_gitname}" --forward --strip=1 --input="${srcdir}/166.patch"
 }

 build() {
Drommer commented 8 months ago

@Drommer Are you using the version you compiled? It could be a permissions issue...

Yes, I only tested the version I compiled. I will check the release version later.

@Drommer I presume that you're the AUR packager? If so, thank you for your work there as well! In case you're interested, here is an attached inline diff of my PKGBUILD modifications to get this working on my systems.

Yeah, that's my package. Thanks, I'll try it when I have access to my laptop. Hopefully blackadderkate will include your changes in the repository soon. P.S. I noticed that your patch still has the same restrictions for QT_MIN_VERSION and KF5_MIN_VERSION. Probably they should be changed too, since the new version will not be backwards compatible with Plasma 5. Or am I wrong?

lainedfles commented 8 months ago

Yeah, that's my package. Thanks, I'll try it when I have access to my laptop. Hopefully blackadderkate will include your changes in the repository soon. P.S. I noticed that your patch still has the same restrictions for QT_MIN_VERSION and KF5_MIN_VERSION. Probably they should be changed too, since the new version will not be backwards compatible with Plasma 5. Or am I wrong?

I'd spent a bit of time chasing the same path but it will require significant code changes to get it building with KF_MIN_VERSION & QT_MIN_VERSION greater than 5. For example: https://github.com/blackadderkate/weather-widget-2/blob/2cd11f518d3bd8c9b0ea61ed69ff93153629c452/package/contents/ui/CompactItem.qml#L21

There's additional component changes required as referenced here. Until then, qt6-5compat is required.

Drommer commented 8 months ago

@blackadderkate I have checked and can confirm that with the changes by @lainedfles the widget is now available to add to the dashboard and is working fine.