From d253442c42405f67bf61db60d9f5d490e12ff025 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 18 Aug 2006 21:55:11 +0000 Subject: slightly changed patch #1521412: Hardcoded path for theme files svn-id: r23723 --- configure | 8 ++++++++ gui/ThemeNew.cpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/configure b/configure index 73ce76108a..7bba99bec1 100755 --- a/configure +++ b/configure @@ -309,6 +309,7 @@ Installation directories: --prefix=DIR use this prefix for installing ScummVM [/usr/local] --bindir=DIR directory to install the scummvm binary in [PREFIX/bin] --mandir=DIR directory to install the manpage in [PREFIX/man] + --datadir=DIR directory to install the data files in [PREFIX/share] Special configuration feature: --host=HOST cross-compile to target HOST (arm-linux, ...) @@ -500,6 +501,9 @@ for ac_option in $@; do --mandir=*) _mandir=`echo $ac_option | cut -d '=' -f 2` ;; + --datadir=*) + _datadir=`echo $ac_option | cut -d '=' -f 2` + ;; *) echo "error: unrecognised option: $ac_option Try \`$0 --help' for more information." >&2 @@ -1187,6 +1191,10 @@ fi # test -z "$_bindir" && _bindir="$_prefix/bin" test -z "$_mandir" && _mandir="$_prefix/man" +test -z "$_datadir" && _datadir="$_prefix/share" + +DEFINES="$DEFINES -DDATA_PATH=\\\"$_datadir/scummvm\\\"" + # # Check which engines ("frontends") are to be built diff --git a/gui/ThemeNew.cpp b/gui/ThemeNew.cpp index b1dd95da72..3033f54e3b 100644 --- a/gui/ThemeNew.cpp +++ b/gui/ThemeNew.cpp @@ -76,6 +76,10 @@ _lastUsedBitMask(0), _forceRedraw(false), _fonts(), _imageHandles(0), _images(0) if (ConfMan.hasKey("themepath")) Common::File::addDefaultDirectory(ConfMan.get("themepath")); +#ifdef DATA_PATH + Common::File::addDefaultDirectoryRecursive(DATA_PATH); +#endif + if (ConfMan.hasKey("extrapath")) Common::File::addDefaultDirectoryRecursive(ConfMan.get("extrapath")); -- cgit v1.2.3