mirror of https://gitlab.com/ita1024/waf.git
demos: add GResource examples in glib2 demo
This commit is contained in:
parent
9cd10fe885
commit
471e8faf6e
|
@ -0,0 +1 @@
|
||||||
|
print('This is a resource file!')
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<gresources>
|
||||||
|
<gresource prefix="/org/glib2/test">
|
||||||
|
<file>file.js</file>
|
||||||
|
</gresource>
|
||||||
|
</gresources>
|
|
@ -16,6 +16,8 @@ def configure(conf):
|
||||||
|
|
||||||
conf.check_cfg (package='glib-2.0', uselib_store='GLIB', atleast_version='2.25.0',
|
conf.check_cfg (package='glib-2.0', uselib_store='GLIB', atleast_version='2.25.0',
|
||||||
args='--cflags --libs')
|
args='--cflags --libs')
|
||||||
|
conf.check_cfg (package='gio-2.0', uselib_store='GIO', atleast_version='2.25.0',
|
||||||
|
args='--cflags --libs')
|
||||||
conf.check_cfg (package='gobject-2.0', uselib_store='GOBJECT', atleast_version='2.25.0',
|
conf.check_cfg (package='gobject-2.0', uselib_store='GOBJECT', atleast_version='2.25.0',
|
||||||
args='--cflags --libs')
|
args='--cflags --libs')
|
||||||
|
|
||||||
|
@ -23,8 +25,8 @@ def configure(conf):
|
||||||
def build(bld):
|
def build(bld):
|
||||||
app = bld (
|
app = bld (
|
||||||
features = 'c cprogram glib2',
|
features = 'c cprogram glib2',
|
||||||
use = 'GLIB GOBJECT',
|
use = 'GLIB GIO GOBJECT',
|
||||||
source = 'main.c',
|
source = 'main.c org.glib2.test.gresource.xml',
|
||||||
target = 'gsettings-test'
|
target = 'gsettings-test'
|
||||||
|
|
||||||
## An alternate way of doing this (no need to call add_ functions):
|
## An alternate way of doing this (no need to call add_ functions):
|
||||||
|
@ -38,3 +40,9 @@ def build(bld):
|
||||||
'org.gsettings.test-2.gschema.xml'])
|
'org.gsettings.test-2.gschema.xml'])
|
||||||
|
|
||||||
app.add_marshal_file('marshal.list', 'test_marshal')
|
app.add_marshal_file('marshal.list', 'test_marshal')
|
||||||
|
|
||||||
|
bld(
|
||||||
|
features = 'gresource',
|
||||||
|
source = 'org.glib2.test.gresource.xml',
|
||||||
|
install_path = 'lib/glib2_test'
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue