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

Support gnome.compile_resources with generated resources files #706

Closed
baedert opened this issue Aug 23, 2016 · 2 comments

Comments

@baedert
Copy link

commented Aug 23, 2016

I'm trying to generate a .gresource.xml file for gnome.compile_resources in my meson.build using a configure_file, but passing the configure_file to gnome.compile_resources results in the .gresource.xml file not being found. The strange part is that the generated file is correctly placed in the builddir (with correct name and contents) but glib-compile-resources still can't find it.

@baedert

This comment has been minimized.

Copy link
Author

commented Aug 23, 2016

This is how I currently implemented this:

glsl_sources = [
  'gl3-texture-2d.fs.glsl',
  'gl3-texture-2d.vs.glsl',
  'gl3-texture-rect.fs.glsl',
  'gl3-texture-rect.vs.glsl',
  'gl2-texture-2d.fs.glsl',
  'gl2-texture-2d.fs.glsl',
  'gl2-texture-rect.vs.glsl',
  'gl2-texture-rect.vs.glsl',
  'gles2-texture.fs.glsl',
  'gles2-texture.vs.glsl',
]
resource_xml = ''
foreach glsl_file : glsl_sources
  resource_xml += '    <file alias="glsl/@0@">resources/glsl/@0@</file>\n'.format(glsl_file)
endforeach


cdata = configuration_data()
cdata.set('GDK_GRESOURCE_XML_FILES', resource_xml)
gdkresources_xml = configure_file(
  input  : 'gdk.gresource.xml.meson',
  output : 'gdk.gresource.xml',
  configuration : cdata
)

gdkresources = gnome.compile_resources(
  'gdkresources',
  gdkresources_xml,
  source_dir: meson.build_root(),
  # source_dir: '.',
  c_name: '_gdk',
  extra_args: '--manual-register'
)

The source_dir part is just a test, none of the options I tried seem to be working.

@nirbheek nirbheek added the gnome label Oct 25, 2016

@nirbheek nirbheek added this to the 0.37.0 milestone Nov 11, 2016

@nirbheek nirbheek added the generators label Dec 14, 2016

@nirbheek nirbheek modified the milestones: 0.37.0, 0.38.0 Dec 18, 2016

@nirbheek nirbheek modified the milestones: 0.38.0, 0.39.0 Feb 1, 2017

@nirbheek nirbheek modified the milestones: 0.39.0, 0.40.0 Mar 9, 2017

@nirbheek nirbheek modified the milestone: 0.40.0 Apr 22, 2017

gnomesysadmins pushed a commit to GNOME/geary that referenced this issue Dec 11, 2017
Port build system to Meson. Bug 777044.
Some remarks:

* Note that Meson adds a hard dependency on Python 3.

* All dependencies and defines are now listed together.

* Some build files were put in their respective subdirectories, e.g. the Geary
  engine library will be built from the Meson file in `src/engine`.

* `--fatal-warnings` is no longer an explicit flag, as Meson provides
  `-Dwerror=true` for this.

* An explicit resource file needs to be used. The issue to support this from
  Meson itself can be found at mesonbuild/meson#706 .

* The `gnome.yelp()` function parses a LINGUAS file so we no longer need to keep
  track of all languages in our build system.

* There are no Debian scripts defined in the meson.build files to keep them
  clean, but they can be kept as separate scripts in `build-aux`.

* Left out the `dist` target as there is now `ninja dist`

* `geary-docs` is disabled by default, as valadoc-0.38.3 returns errors.

https://bugzilla.gnome.org/show_bug.cgi?id=777044
@nirbheek

This comment has been minimized.

Copy link
Member

commented Dec 20, 2017

This was fixed in dabf0c1 (0.38.1 and 0.39.0), but I forgot about this issue.

@nirbheek nirbheek closed this Dec 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.