[gnome-music/wip/merge: 212/343] Load data from source dir if we are running from there



commit c397fb5f7c0924ce905cd81269f27d2ca7960d68
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Wed Jul 17 19:22:49 2013 +0800

    Load data from source dir if we are running from there

 gnome-music.in |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gnome-music.in b/gnome-music.in
index 9ff1cd0..c172c1c 100644
--- a/gnome-music.in
+++ b/gnome-music.in
@@ -9,9 +9,11 @@ import gnomemusic
 srcdir = os.path.abspath(os.path.join(os.path.dirname(gnomemusic.__file__), '..'))
 if os.path.exists(os.path.join(srcdir, 'gnome-music.doap')):
     print('Running from source tree, using local files')
+    pkgdatadir = os.path.join(srcdir, 'data')
     libgd_libdir = os.path.join(srcdir, 'libgd', '.libs')
     libgd_typelibdir = os.path.join(srcdir, 'libgd')
 else:
+    pkgdatadir = '@pkgdatadir@'
     libgd_libdir = '@pkglibdir@'
     libgd_typelibdir = '@pkglibdir@/girepository-1.0'
 
@@ -36,7 +38,7 @@ def install_excepthook():
 if __name__ == "__main__":
     install_excepthook()
 
-    resource = Gio.resource_load("data/gnome-music.gresource")
+    resource = Gio.resource_load(os.path.join(pkgdatadir, 'gnome-music.gresource'))
     Gio.Resource._register(resource)
 
     app = Application()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]