3 # GDBus - GLib D-Bus Library
5 # Copyright (C) 2008-2011 Red Hat, Inc.
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General
18 # Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 # Author: David Zeuthen <davidz@redhat.com>
26 srcdir = os.getenv('UNINSTALLED_GLIB_SRCDIR', None)
28 if srcdir is not None:
29 path = os.path.join(srcdir, 'gio', 'gdbus-2.0')
31 # Makes gdbus-codegen 'relocatable' at runtime on Windows.
32 path = os.path.join(os.path.dirname(__file__), '..', 'share', 'glib-2.0')
34 path = os.path.join('@datadir@', 'glib-2.0')
36 sys.path.insert(0, os.path.abspath(path))
37 from codegen import codegen_main
39 sys.exit(codegen_main.codegen_main())