gnome-specimen r75 - in trunk-from-bzr: . specimen
- From: wbolster svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-specimen r75 - in trunk-from-bzr: . specimen
- Date: Tue, 17 Jun 2008 18:42:31 +0000 (UTC)
Author: wbolster
Date: Tue Jun 17 18:42:31 2008
New Revision: 75
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=75&view=rev
Log:
* specimen/config.py.in:
- Allow running gnome-specimen from the source directory
(without installing into $prefix) by doing some path
mangling in the config.py file.
Modified:
trunk-from-bzr/ (props changed)
trunk-from-bzr/specimen/config.py.in
Modified: trunk-from-bzr/specimen/config.py.in
==============================================================================
--- trunk-from-bzr/specimen/config.py.in (original)
+++ trunk-from-bzr/specimen/config.py.in Tue Jun 17 18:42:31 2008
@@ -18,12 +18,27 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
-import os.path
+from os.path import join, exists, dirname, realpath
PACKAGE = "@PACKAGE_NAME@"
VERSION = "@PACKAGE_VERSION@"
+# Don't bother using translations from the source directory (too much hassle,
+# if not impossible because of the $LANG/LC_MESSAGES directories)
LOCALEDIR = "@LOCALEDIR@"
-DATADIR = "@DATADIR@"
-PKGDATADIR = "@PKGDATADIR@"
-GLADEDIR = "@GLADEDIR@"
+
+# Allow to run uninstalled by detecint gnome-specimen.in
+if exists(join(dirname(__file__), '../gnome-specimen.in')):
+ print "Running from source directory; not using installation paths!"
+
+ source_datadir = realpath(join(dirname(__file__), '../data'))
+
+ DATADIR = source_datadir
+ PKGDATADIR = source_datadir
+ GLADEDIR = source_datadir
+
+# Normal situation: use installation paths from ./configure
+else:
+ DATADIR = "@DATADIR@"
+ PKGDATADIR = "@PKGDATADIR@"
+ GLADEDIR = "@GLADEDIR@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]