mate-desktop / mate-power-manager

Power management tool for the MATE desktop
https://mate-desktop.org
GNU General Public License v2.0
59 stars 51 forks source link

Switch to meson build system #338

Closed vaurelios closed 9 months ago

vaurelios commented 4 years ago

There are several advantages in using meson build system. here are some

raveit65 commented 4 years ago

Nice idea, but please do not remove autotools project. In all other repos e.g. mate-desktop we have the choice to build with autotools or meson. Thanks.

Edit: and there is a conflict with master branch

raveit65 commented 4 years ago

Thanks, can you try to rebase your branch to master, please? We have a conflict with master branch.

yetist commented 4 years ago

It seems the --enable-tests configure option is lost.

raveit65 commented 4 years ago

@vaurelios Can you please enable meson build for travis CI. Not a big thing, see example https://github.com/mate-desktop/marco/pull/610/commits/1e207c935e3e96c43d619945b6b59bf53422c7bb Use an extra commit. Than we will see a hopefully successfully meson build at travis server ;)

raveit65 commented 4 years ago

Not all directories will be uninstalled.

[rave@mother mate-power-manager-dist]$ sudo ninja -C build uninstall
ninja: Entering directory `build'
[0/1] /usr/bin/meson --internal uninstall
Deleted: /usr/local/libexec/mate-brightness-applet
Deleted: /usr/local/share/mate-panel/applets/org.mate.BrightnessApplet.mate-panel-applet.desktop
Deleted: /usr/local/libexec/mate-inhibit-applet
Deleted: /usr/local/share/mate-panel/applets/org.mate.InhibitApplet.mate-panel-applet.desktop
Deleted: /usr/local/share/applications/mate-power-preferences.desktop
Deleted: /usr/local/share/applications/mate-power-statistics.desktop
Deleted: /usr/local/etc/xdg/autostart/mate-power-manager.desktop
Deleted: /usr/local/share/polkit-1/actions/org.mate.power.policy
Deleted: /usr/local/bin/mate-power-manager
Deleted: /usr/local/share/man/man1/mate-power-manager.1
Deleted: /usr/local/share/man/man1/mate-power-backlight-helper.1
Deleted: /usr/local/share/man/man1/mate-power-statistics.1
Deleted: /usr/local/share/man/man1/mate-power-preferences.1
Deleted: /usr/local/share/dbus-1/services/org.mate.panel.applet.BrightnessAppletFactory.service
Deleted: /usr/local/share/mate-power-manager/ui/brightness-applet-menu.xml
Deleted: /usr/local/share/dbus-1/services/org.mate.panel.applet.InhibitAppletFactory.service
Deleted: /usr/local/share/mate-power-manager/ui/inhibit-applet-menu.xml
Deleted: /usr/local/share/dbus-1/services/org.mate.PowerManager.service
Deleted: /usr/local/share/glib-2.0/schemas/org.mate.power-manager.gschema.xml
Deleted: /usr/local/share/mate-power-manager/acme.ui
Deleted: /usr/local/share/mate-power-manager/icons/hicolor/16x16/actions/gpm-hibernate.png
Deleted: /usr/local/share/mate-power-manager/icons/hicolor/16x16/actions/gpm-suspend.png
Deleted: /usr/local/share/icons/hicolor/16x16/apps/mate-brightness-applet.png
Deleted: /usr/local/share/icons/hicolor/16x16/apps/mate-inhibit-applet.png

<cut>

Deleted: /usr/local/share/icons
Deleted: /usr/local/share/mate-power-manager/icons/hicolor/16x16/actions
Deleted: /usr/local/share/mate-power-manager/icons/hicolor/16x16
Deleted: /usr/local/share/mate-power-manager/icons/hicolor
Deleted: /usr/local/share/mate-power-manager/icons
Could not delete /usr/local/share/glib-2.0/schemas: [Errno 39] Directory not empty: '/usr/local/share/glib-2.0/schemas'.
Could not delete /usr/local/share/glib-2.0: [Errno 39] Directory not empty: '/usr/local/share/glib-2.0'.
Deleted: /usr/local/share/mate-power-manager/ui
Deleted: /usr/local/share/mate-power-manager
Deleted: /usr/local/share/dbus-1/services
Deleted: /usr/local/share/dbus-1
Deleted: /usr/local/share/man/man1
Deleted: /usr/local/share/man
Deleted: /usr/local/bin
Deleted: /usr/local/share/polkit-1/actions
Deleted: /usr/local/share/polkit-1
Deleted: /usr/local/etc/xdg/autostart
Deleted: /usr/local/etc/xdg
Deleted: /usr/local/etc
Deleted: /usr/local/share/applications
Deleted: /usr/local/share/mate-panel/applets
Deleted: /usr/local/share/mate-panel
Could not delete /usr/local/share: [Errno 39] Directory not empty: '/usr/local/share'.
Deleted: /usr/local/libexec

Uninstall finished.

Deleted: 634
Failed: 3

Remember that files created by custom scripts have not been removed.
[rave@mother mate-power-manager-dist]$ 

Ignore glib dir, it's only gschemas.compiled.But /usr/local/share/help and /usr/local/share/locale isn't empty.

raveit65 commented 4 years ago

Any news?

raveit65 commented 4 years ago

Anybody in there? Or should we close this?

vaurelios commented 4 years ago

Any news?

Here all files are removed.

...
Uninstall finished.

Deleted: 569
Failed: 0
raveit65 commented 4 years ago

Same results.

Could not delete /usr/local/share/glib-2.0/schemas: [Errno 39] Directory not empty: '/usr/local/share/glib-2.0/schemas'.
Could not delete /usr/local/share/glib-2.0: [Errno 39] Directory not empty: '/usr/local/share/glib-2.0'.
<cut>
Could not delete /usr/local/share: [Errno 39] Directory not empty: '/usr/local/share'.
<cut>

Uninstall finished.

Deleted: 634
Failed: 3

Remember that files created by custom scripts have not been removed.

But help and po direction are installed by custom scripts, we discused this here https://github.com/mate-desktop/mate-terminal/pull/341#issuecomment-672898038

Running custom install script '/media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/data/meson_post_install.py'

Running custom install script '/usr/bin/meson --internal gettext install --subdir=po --localedir=share/locale --pkgname=mate-power-manager'

Running custom install script '/usr/bin/meson --internal yelphelper install --subdir=help --id=mate-power-manager --installdir=share/help --sources=index.docbook@@legal.xml --symlinks=true --media=figures/applet-brightness.png@@figures/applet-inhibit.png@@figures/gpm-cell-capacity.png@@figures/gpm-charged.png@@figures/gpm-critical.png@@figures/gpm-low.png@@figures/gpm-prefs-ac.png@@figures/gpm-prefs-battery.png@@figures/gpm-prefs-general.png@@figures/gpm-stats-graph.png@@figures/gpm-suspend-problem.png@@figures/gpm-unplugged.png@@figures/gs-prefs.png'

So, this is OK.

raveit65 commented 4 years ago

Sorry, i forgot to test this :/ Meson dist is broken, needed to test package and create tarballs in future.

meson build -Dprefix=/usr
<cut>
meson dist -C build
<cut>
Installing /media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/build/meson-private/dist-build/po/zu.gmo to /media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/build/meson-private/dist-install/usr/share/locale/zu/LC_MESSAGES/mate-power-manager.mo
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 131, in run
    return options.run_func(options)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mdist.py", line 281, in run
    rc = check_dist(names[0], meson_command, extra_meson_args, bld_root, priv_dir)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mdist.py", line 225, in check_dist
    windows_proof_rmtree(installdir)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonlib.py", line 1404, in windows_proof_rmtree
    _make_tree_writable(f)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonlib.py", line 1394, in _make_tree_writable
    os.chmod(fpath, os.stat(fpath).st_mode | stat.S_IWRITE | stat.S_IREAD)
PermissionError: [Errno 1] Operation not permitted: '/media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/build/meson-private/dist-install/usr/share/help/cmn/mate-power-manager/figures/gpm-suspend-problem.png'

@yetist mate-terminal package has the same issue. Any ideas?

vaurelios commented 4 years ago

Sorry, i forgot to test this :/ Meson dist is broken, needed to test package and create tarballs in future.

meson build -Dprefix=/usr
<cut>
meson dist -C build
<cut>
Installing /media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/build/meson-private/dist-build/po/zu.gmo to /media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/build/meson-private/dist-install/usr/share/locale/zu/LC_MESSAGES/mate-power-manager.mo
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 131, in run
    return options.run_func(options)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mdist.py", line 281, in run
    rc = check_dist(names[0], meson_command, extra_meson_args, bld_root, priv_dir)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mdist.py", line 225, in check_dist
    windows_proof_rmtree(installdir)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonlib.py", line 1404, in windows_proof_rmtree
    _make_tree_writable(f)
  File "/usr/lib/python3.8/site-packages/mesonbuild/mesonlib.py", line 1394, in _make_tree_writable
    os.chmod(fpath, os.stat(fpath).st_mode | stat.S_IWRITE | stat.S_IREAD)
PermissionError: [Errno 1] Operation not permitted: '/media/Data/Programme/Linux/Mate-Desktop/git-version/github-matedesktop/mate-power-manager-dist/build/meson-private/dist-install/usr/share/help/cmn/mate-power-manager/figures/gpm-suspend-problem.png'

@yetist mate-terminal package has the same issue. Any ideas?

Here everything work as expected.

The meson dist -C build command exits without error.

...
Distribution package /home/victor/git/mate-power-manager/build/meson-dist/mate-power-manager-1.24.0.tar.xz tested
build/meson-dist/mate-power-manager-1.24.0.tar.xz 4150425f2af00aa30a9a7bab94b9be33af49aa7e5b6f02ba1b6cd51496a84a4c
raveit65 commented 4 years ago

Here everything work as expected. The meson dist -C build command exits without error.

@vaurelios Not here! Which distro and what meson version do you have running?

[root@mother rave]# rpm -qa meson
meson-0.55.1-1.fc32.noarch
raveit65 commented 4 years ago

@rbuj Can you please give me a favour and test if meson dist works for you?

meson build
meson dist -C build
selectiveduplicate commented 4 years ago

@raveit65 This works fine on my machine with meson build && meson dist -C build and creates the release archive:

Distribution package /home/sakib/mate-power-manager/build/meson-dist/mate-power-manager-1.24.0.tar.xz tested
build/meson-dist/mate-power-manager-1.24.0.tar.xz c991333538ba0f8ac8a77f4166dcfc0ef03e6b95a369d34ef0ad015a4047b41c

I have meson-0.55.0-1.fc32.noarch.

raveit65 commented 4 years ago

There is a linking issue when /usr/share/local/help/ isn't empty after testing installation with sudo ninja -C build install && sudo ninja -C build uninstall

PermissionError: [Errno 1] Operation not permitted: '/home/rave/mate-power-manager/build/meson-private/dist-install/usr/local/share/help/fur/mate-power-manager/figures/gpm-cell-capacity.png'

Checking permissions:

[rave@mother mate-power-manager]$ ls -l build/meson-private/dist-install/usr/local/share/help/fur/mate-power-manager/figures/
insgesamt 52
lrwxrwxrwx 1 rave rave 72  3. Sep 12:37 applet-brightness.png -> /usr/local/share/help/C/mate-power-manager/figures/applet-brightness.png
lrwxrwxrwx 1 rave rave 69  3. Sep 12:37 applet-inhibit.png -> /usr/local/share/help/C/mate-power-manager/figures/applet-inhibit.png
lrwxrwxrwx 1 rave rave 72  3. Sep 12:37 gpm-cell-capacity.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-cell-capacity.png
lrwxrwxrwx 1 rave rave 66  3. Sep 12:37 gpm-charged.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-charged.png
lrwxrwxrwx 1 rave rave 67  3. Sep 12:37 gpm-critical.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-critical.png
lrwxrwxrwx 1 rave rave 62  3. Sep 12:37 gpm-low.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-low.png
lrwxrwxrwx 1 rave rave 67  3. Sep 12:37 gpm-prefs-ac.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-prefs-ac.png
lrwxrwxrwx 1 rave rave 72  3. Sep 12:37 gpm-prefs-battery.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-prefs-battery.png
lrwxrwxrwx 1 rave rave 72  3. Sep 12:37 gpm-prefs-general.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-prefs-general.png
lrwxrwxrwx 1 rave rave 70  3. Sep 12:37 gpm-stats-graph.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-stats-graph.png
lrwxrwxrwx 1 rave rave 74  3. Sep 12:37 gpm-suspend-problem.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-suspend-problem.png
lrwxrwxrwx 1 rave rave 68  3. Sep 12:37 gpm-unplugged.png -> /usr/local/share/help/C/mate-power-manager/figures/gpm-unplugged.png
lrwxrwxrwx 1 rave rave 63  3. Sep 12:37 gs-prefs.png -> /usr/local/share/help/C/mate-power-manager/figures/gs-prefs.png

All images are linked to /usr/local/share/help/C/mate-power-manager/figures/ : / In other words, this command failed. meson build && ninja -C build && sudo ninja -C build install && sudo ninja -C build uninstall && meson dist -C build But deleting everything in /usr/local/ and running meson build && meson dist -C build works fine.

Honestly, i don't really understand why people love meson with so much possible problems.

Any way, issue isn't related to PR.

raveit65 commented 4 years ago

Merged. I squashed 2 commits in first one and merged it locally. https://github.com/mate-desktop/mate-power-manager/commit/1db4b409322e559a3d3a03677dd482a0613f3b29 https://github.com/mate-desktop/mate-power-manager/commit/69870bbbbebbd7ecc113b80da96d6dc5d29ee467 https://github.com/mate-desktop/mate-power-manager/commit/c0c36501cfeadc0f526610891b6dd257ce3c8229 https://github.com/mate-desktop/mate-power-manager/commit/007888e9b170257e822c40b353674616b5555204 https://github.com/mate-desktop/mate-power-manager/commit/78bd4114cee53f589945b6f72df10bb65cc4df81

Thanks for all the work and the patience with me ;)

raveit65 commented 4 years ago

@vaurelios We have a serious problem when using meson for installation from current master. see https://github.com/mate-desktop/mate-power-manager/pull/351#pullrequestreview-482994579

[rave@mother ~]$ /usr/bin/mate-power-manager 

** (mate-power-manager:6737): WARNING **: 09:59:52.272: Failed to get session for pid 6737: The name is not activatable

** (mate-power-manager:6737): WARNING **: 09:59:52.277: could not map keysym 1008ffa8 to keycode

** (mate-power-manager:6737): ERROR **: 09:59:52.282: failed to get value: Failed to execute child process ?/usr/sbin/mate-power-backlight-helper? (No such file or directory)
Trace/breakpoint trap (core dumped)

Can you please take a look at it?

raveit65 commented 4 years ago

When using autotools for installation we have /usr/sbin/mate-power-backlight-helper installed.

raveit65 commented 4 years ago
AM_CPPFLAGS += $(NULL)

bin_PROGRAMS =                      \
    mate-power-manager              \
    mate-power-preferences              \
    mate-power-statistics               \
    $(NULL)

sbin_PROGRAMS =                     \
    mate-power-backlight-helper         \
    $(NULL)
raveit65 commented 4 years ago

@vaurelios There are more problem when building with meson, applets are broken, see https://github.com/mate-desktop/mate-power-manager/pull/351#issuecomment-687649533

rbuj commented 4 years ago

@raveit65

The languages argument is deprecated in the gnome module v0.43.0.

https://github.com/mesonbuild/meson/blob/492afe50a439d70df99d6e3e59572aff55e14c6b/mesonbuild/modules/gnome.py#L846-L847

If we omit this obsolescence, languages can be passed as an argument for building the help, so the list of available languages can be generated automatically.

lukefromdc commented 4 years ago

I found that both the brightness and inhibit applets won't load with Meson builds, probably installed to the wrong place based on this error I got with testing the libsecret PR's meson build in https://github.com/mate-desktop/mate-power-manager/pull/351


** (mate-power-manager:8937): ERROR **: 18:20:11.259: failed to get value: Failed to execute child process “/usr/sbin/mate-power-backlight-helper” (No such file or directory)
Trace/breakpoint trap

which means mate-power-backlight-helper also went to the wrong place. This too has been reported by others against master when built with Meson

lukefromdc commented 4 years ago

I agree we should revert this, merge the libsecret work, rebase this on the resulting master, and fix the problems. Otherwise other work is hung up behind fixing this

raveit65 commented 4 years ago

I found more missing files compared to my unpacked fedora RPM package. RPM from autotools tarball:

[rave@mother fedora-32-x86_64-mate-1.26]$ ls -l mate-power-manager-1.25.0-2.fc32.x86_64/usr/bin/
total 352
-rwxr-xr-x 1 rave mock 205584 Sep  6 14:36 mate-power-manager
-rwxr-xr-x 1 rave mock  67424 Sep  6 14:36 mate-power-preferences
-rwxr-xr-x 1 rave mock  79840 Sep  6 14:36 mate-power-statistics
[rave@mother fedora-32-x86_64-mate-1.26]$

Meson installation:

[rave@mother /]$ ls -l /usr/local/bin/
total 540
-rwxr-xr-x 1 root root 552432 Sep  6 14:34 mate-power-manager
[rave@mother /]$ 

Applets can't start because of wrong files. RPM:

[rave@mother fedora-32-x86_64-mate-1.26]$ ls -l mate-power-manager-1.25.0-2.fc32.x86_64/usr/share/mate-panel/applets/
total 16
-rw-r--r-- 1 rave mock 7205 Sep  6 14:36 org.mate.BrightnessApplet.mate-panel-applet
-rw-r--r-- 1 rave mock 7085 Sep  6 14:36 org.mate.InhibitApplet.mate-panel-applet
[rave@mother fedora-32-x86_64-mate-1.26]$ 

Meson installation:

[rave@mother /]$ ls -l /usr/local/share/mate-panel/applets/
total 16
-rw-r--r-- 1 root root 7211 Sep  6 14:34 org.mate.BrightnessApplet.mate-panel-applet.desktop
-rw-r--r-- 1 root root 7091 Sep  6 14:34 org.mate.InhibitApplet.mate-panel-applet.desktop
[rave@mother /]$

Icons are normally under /usr/share/mate-power-manager/ installed. RPM:

[rave@mother fedora-32-x86_64-mate-1.26]$ ls -l mate-power-manager-1.25.0-2.fc32.x86_64/usr/share/mate-power-manager       
total 12
-rw-r--r-- 1 rave rave 1118 Sep  6 14:36 acme.ui
drwxr-xr-x 3 rave rave 4096 Sep  6 14:36 icons
drwxr-xr-x 2 rave rave 4096 Sep  6 14:36 ui
[rave@mother fedora-32-x86_64-mate-1.26]$

Meson installation:

[rave@mother /]$ ls -l /usr/local/share/mate-power-manager/  
total 8
-rw-r--r-- 1 root root 1118 Jan 29  2018 acme.ui
drwxr-xr-x 2 root root 4096 Sep  6 14:35 ui
[rave@mother /]$ 
raveit65 commented 4 years ago

@vaurelios Do you have time to fix this serious issues? This is blocking another PR. Otherwise i would revert the merge and you have all the time of the world to work on this PR again.

vaurelios commented 4 years ago

@raveit65

please revert! after libsecret merge i will took time to fix all these issues.

raveit65 commented 4 years ago

Ok, commits are reverted from master.

raveit65 commented 3 years ago

Port to libsecret is merged.

vaurelios commented 3 years ago

I'm working on it again!

Comparing the install directory tree of both build system I noticed two things in Autotools build:

So my question is: this is the right behavior or there's a problem with Autotools build?

raveit65 commented 3 years ago

In my installations actions and status icons are installed to /usr/share/mate-power-manager/icons/hicolor. And apps dir is installed to /usr/share/icons/hicolor. For example:

[rave@mother mate-power-manager-dist]$ ls -la /usr/local/share/icons/hicolor/24x24/apps/
insgesamt 24
drwxr-xr-x 2 root root 4096 11. Jun 19:08 .
drwxr-xr-x 3 root root 4096  5. Mär 19:58 ..
-rw-r--r-- 1 root root 1160 11. Jun 19:08 mate-brightness-applet.png
-rw-r--r-- 1 root root 1031 11. Jun 19:08 mate-inhibit-applet.png
-rw-r--r-- 1 root root 1913 11. Jun 19:08 mate-power-manager.png
-rw-r--r-- 1 root root 1555 11. Jun 19:08 mate-power-statistics.png

[rave@mother mate-power-manager-dist]$ ls -la /usr/local/share/mate-power-manager/icons/hicolor/24x24/actions/
insgesamt 16
drwxr-xr-x 2 root root 4096 11. Jun 19:08 .
drwxr-xr-x 4 root root 4096 11. Jun 19:08 ..
-rw-r--r-- 1 root root 1035 11. Jun 19:08 gpm-hibernate.png
-rw-r--r-- 1 root root 1031 11. Jun 19:08 gpm-suspend.png

[rave@mother mate-power-manager-dist]$ ls -la /usr/local/share/mate-power-manager/icons/hicolor/24x24/status/
insgesamt 228
drwxr-xr-x 2 root root 4096 11. Jun 19:08 .
drwxr-xr-x 4 root root 4096 11. Jun 19:08 ..
-rw-r--r-- 1 root root 1170 11. Jun 19:08 gpm-ac-adapter.png
-rw-r--r-- 1 root root 1152 11. Jun 19:08 gpm-battery-000-charging.png
-rw-r--r-- 1 root root  747 11. Jun 19:08 gpm-battery-000.png
-rw-r--r-- 1 root root 1151 11. Jun 19:08 gpm-battery-020-charging.png
-rw-r--r-- 1 root root  751 11. Jun 19:08 gpm-battery-020.png
-rw-r--r-- 1 root root 1153 11. Jun 19:08 gpm-battery-040-charging.png
-rw-r--r-- 1 root root  778 11. Jun 19:08 gpm-battery-040.png
-rw-r--r-- 1 root root 1162 11. Jun 19:08 gpm-battery-060-charging.png
-rw-r--r-- 1 root root  783 11. Jun 19:08 gpm-battery-060.png
-rw-r--r-- 1 root root 1174 11. Jun 19:08 gpm-battery-080-charging.png
-rw-r--r-- 1 root root  783 11. Jun 19:08 gpm-battery-080.png
-rw-r--r-- 1 root root 1155 11. Jun 19:08 gpm-battery-100-charging.png
-rw-r--r-- 1 root root  749 11. Jun 19:08 gpm-battery-100.png
-rw-r--r-- 1 root root 1121 11. Jun 19:08 gpm-battery-charged.png
-rw-r--r-- 1 root root  669 11. Jun 19:08 gpm-battery-empty.png
-rw-r--r-- 1 root root  833 11. Jun 19:08 gpm-battery-missing.png
-rw-r--r-- 1 root root 1653 11. Jun 19:08 gpm-brightness-kbd-disabled.png
-rw-r--r-- 1 root root 1540 11. Jun 19:08 gpm-brightness-kbd-invalid.png
-rw-r--r-- 1 root root 1160 11. Jun 19:08 gpm-brightness-kbd.png
-rw-r--r-- 1 root root 2012 11. Jun 19:08 gpm-brightness-lcd-disabled.png
-rw-r--r-- 1 root root 1876 11. Jun 19:08 gpm-brightness-lcd-invalid.png
-rw-r--r-- 1 root root 1160 11. Jun 19:08 gpm-brightness-lcd.png
-rw-r--r-- 1 root root 1828 11. Jun 19:08 gpm-inhibit-invalid.png
-rw-r--r-- 1 root root 1513 11. Jun 19:08 gpm-inhibit.png
-rw-r--r-- 1 root root 1065 11. Jun 19:08 gpm-keyboard-000.png
-rw-r--r-- 1 root root 1060 11. Jun 19:08 gpm-keyboard-020.png
-rw-r--r-- 1 root root 1081 11. Jun 19:08 gpm-keyboard-040.png
-rw-r--r-- 1 root root 1083 11. Jun 19:08 gpm-keyboard-060.png
-rw-r--r-- 1 root root 1107 11. Jun 19:08 gpm-keyboard-080.png
-rw-r--r-- 1 root root 1089 11. Jun 19:08 gpm-keyboard-100.png
-rw-r--r-- 1 root root 1021 11. Jun 19:08 gpm-mouse-000.png
-rw-r--r-- 1 root root 1020 11. Jun 19:08 gpm-mouse-020.png
-rw-r--r-- 1 root root 1035 11. Jun 19:08 gpm-mouse-040.png
-rw-r--r-- 1 root root 1040 11. Jun 19:08 gpm-mouse-060.png
-rw-r--r-- 1 root root 1041 11. Jun 19:08 gpm-mouse-080.png
-rw-r--r-- 1 root root 1022 11. Jun 19:08 gpm-mouse-100.png
-rw-r--r-- 1 root root 1069 11. Jun 19:08 gpm-phone-000.png
-rw-r--r-- 1 root root 1081 11. Jun 19:08 gpm-phone-020.png
-rw-r--r-- 1 root root 1107 11. Jun 19:08 gpm-phone-040.png
-rw-r--r-- 1 root root 1100 11. Jun 19:08 gpm-phone-060.png
-rw-r--r-- 1 root root 1085 11. Jun 19:08 gpm-phone-080.png
-rw-r--r-- 1 root root 1075 11. Jun 19:08 gpm-phone-100.png
-rw-r--r-- 1 root root 1034 11. Jun 19:08 gpm-ups-000-charging.png
-rw-r--r-- 1 root root  969 11. Jun 19:08 gpm-ups-000.png
-rw-r--r-- 1 root root 1060 11. Jun 19:08 gpm-ups-020-charging.png
-rw-r--r-- 1 root root  975 11. Jun 19:08 gpm-ups-020.png
-rw-r--r-- 1 root root 1064 11. Jun 19:08 gpm-ups-040-charging.png
-rw-r--r-- 1 root root  990 11. Jun 19:08 gpm-ups-040.png
-rw-r--r-- 1 root root 1061 11. Jun 19:08 gpm-ups-060-charging.png
-rw-r--r-- 1 root root  989 11. Jun 19:08 gpm-ups-060.png
-rw-r--r-- 1 root root 1069 11. Jun 19:08 gpm-ups-080-charging.png
-rw-r--r-- 1 root root  994 11. Jun 19:08 gpm-ups-080.png
-rw-r--r-- 1 root root 1064 11. Jun 19:08 gpm-ups-100-charging.png
-rw-r--r-- 1 root root  989 11. Jun 19:08 gpm-ups-100.png
-rw-r--r-- 1 root root  916 11. Jun 19:08 gpm-ups-missing.png

Well, i don't know exactly why we use 2 separate dirs, maybe to avoid conflicts, but this is definitely the correct behavior. https://github.com/mate-desktop/mate-power-manager/blob/master/data/icons/Makefile.am#L1

actioniconsdir = $(pkgdatadir)/icons/hicolor
appiconsdir = $(datadir)/icons/hicolor
statusiconsdir = $(pkgdatadir)/icons/hicolor
lukefromdc commented 2 years ago

What is the status of this? Is it still being worked on?

zhuyaliang commented 1 year ago

@vaurelios Can continue updating? I need this feature and can review the code. Thank you

zhuyaliang commented 9 months ago

392