Skip to content
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

Porting to meson #55

Merged
merged 1 commit into from
Sep 27, 2020
Merged

Conversation

gpoo
Copy link
Contributor

@gpoo gpoo commented Sep 26, 2020

This branch add supports for Meson build system. This PR is on top of #54, so it is only one commit (cca0335)

One can test it as:

$ meson configure _build
$ cd _build
$ ninja

To create the tarball (inside the build directory):

$ ninja dist

I usually build with a prefix that is in my user account. But that is up to every user. It works fine on
Gnome builder once one sets up the following variables: XDG_DATA_DIRS and PYTHONPATH.

@mikelolasagasti
Copy link
Owner

I can't execute after ninja install, I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/revelation", line 79, in do_activate
    self.__init_ui()
  File "/usr/local/bin/revelation", line 418, in __init_ui
    pixbufs = [ self.items.load_icon("info.olasagasti.revelation", size, 0) for size in ( 128, 48, 32, 24, 16) ]
  File "/usr/local/bin/revelation", line 418, in <listcomp>
    pixbufs = [ self.items.load_icon("info.olasagasti.revelation", size, 0) for size in ( 128, 48, 32, 24, 16) ]
gi.repository.GLib.GError: gtk-icon-theme-error-quark: Icon 'info.olasagasti.revelation' not present in theme Adwaita (0)

Which is strange, as icon files are being installed in same /usr/local/share/icons/hicolor/128x128/apps with autotools and meson.

Then, translation files have changed from revelation.mo to info.olasagasti.revelation.mo. I don't know if this will work with defined gettext domain.

@mikelolasagasti
Copy link
Owner

Works after running manually:

$ sudo gtk-update-icon-cache -tf /usr/local/share/icons/hicolor/

In meson_post_install.py icon_cache_dir is set to:

icon_cache_dir = os.path.join(datadir, 'revelation', 'icons', 'hicolor')

That would be:

/usr/local/share/revelation/icons/hicolor

App's custom icons are installed in that path, but logo icon is installed in /usr/local/share/icons/hicolor. I think this, having icons installed in different paths depending what they're for, is compliance with icon specification. Unless this is wrong or not a best practice, adding another gtk-update-icon-cache for the second path would be enough.

po/meson.build Outdated Show resolved Hide resolved
@mikelolasagasti mikelolasagasti merged commit d005e4f into mikelolasagasti:master Sep 27, 2020
@mikelolasagasti
Copy link
Owner

Works great now! Much faster than with autotools!

@gpoo gpoo deleted the porting-to-meson branch September 27, 2020 12:51
@mikelolasagasti mikelolasagasti added this to the 0.5.4 milestone Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants