diff options
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | gui/ThemeNew.cpp | 4 |
2 files changed, 12 insertions, 0 deletions
@@ -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")); |