[aisleriot] lib: Add libdir and pkglibdir to runtime directories
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] lib: Add libdir and pkglibdir to runtime directories
- Date: Sat, 3 Dec 2011 16:49:20 +0000 (UTC)
commit 9eaa9b26eb1546f208c5ac9c212f1f30ed6d7124
Author: Christian Persch <chpe gnome org>
Date: Tue Nov 29 17:42:32 2011 +0100
lib: Add libdir and pkglibdir to runtime directories
src/lib/Makefile.am | 2 ++
src/lib/ar-runtime.c | 12 +++++++++++-
src/lib/ar-runtime.h | 3 +++
3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 64c5b1c..79411b8 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -74,8 +74,10 @@ endif
libaisleriot_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir) \
+ -DPKGLIBDIR="\"$(pkglibdir)\"" \
-DPKGDATADIR="\"$(pkgdatadir)\"" \
-DPREFIX="\"$(prefix)\"" \
+ -DLIBDIR="\"$(libdir)\"" \
-DDATADIR="\"$(datadir)\"" \
-DCOMMON_DATADIR="\"$(datadir)/gnome-games-common\"" \
-DSCORESDIR="\"$(scoredir)\"" \
diff --git a/src/lib/ar-runtime.c b/src/lib/ar-runtime.c
index 8c32f74..6218431 100644
--- a/src/lib/ar-runtime.c
+++ b/src/lib/ar-runtime.c
@@ -224,6 +224,7 @@ static const DerivedDirectory derived_directories[] = {
/* Keep this in the same order as in the ArRuntimeDirectory enum! */
#ifdef ENABLE_BINRELOC
{ AR_RUNTIME_PREFIX, "share" }, /* AR_RUNTIME_DATA_DIRECTORY */
+ { AR_RUNTIME_LIBRARY_DIRECTORY, PACKAGE }, /* AR_RUNTIME_PKG_LIBRARY_DIRECTORY */
{ AR_RUNTIME_DATA_DIRECTORY, PACKAGE }, /* AR_RUNTIME_PKG_DATA_DIRECTORY */
#endif /* ENABLE_BINRELOC */
{ AR_RUNTIME_DATA_DIRECTORY, "locale" }, /* AR_RUNTIME_LOCALE_DIRECTORY */
@@ -233,6 +234,7 @@ static const DerivedDirectory derived_directories[] = {
{ AR_RUNTIME_PKG_DATA_DIRECTORY, "icons" }, /* AR_RUNTIME_ICON_THEME_DIRECTORY */
{ AR_RUNTIME_PKG_DATA_DIRECTORY, "sounds" }, /* AR_RUNTIME_SOUNDS_DIRECTORY */
{ AR_RUNTIME_PKG_DATA_DIRECTORY, "games" }, /* AR_RUNTIME_GAMES_DIRECTORY */
+ { AR_RUNTIME_PKG_LIBRARY_DIRECTORY, "games" }, /* AR_RUNTIME_GAMES_COMPILED_DIRECTORY */
{ AR_RUNTIME_PKG_DATA_DIRECTORY, "help" }, /* AR_RUNTIME_HELP_DIRECTORY */
};
@@ -368,7 +370,7 @@ ar_runtime_get_directory (ArRuntimeDirectory directory)
GbrInitError errv = 0;
const char *env;
- if ((env = g_getenv ("GAMES_RELOC_ROOT")) != NULL) {
+ if ((env = g_getenv ("AR_RELOC_ROOT")) != NULL) {
path = g_strdup (env);
} else {
char *exe, *bindir, *prefix;
@@ -398,6 +400,10 @@ ar_runtime_get_directory (ArRuntimeDirectory directory)
path = g_strdup (PREFIX);
break;
+ case AR_RUNTIME_LIBRARY_DIRECTORY:
+ path = g_strdup (LIBDIR);
+ break;
+
case AR_RUNTIME_DATA_DIRECTORY:
path = g_strdup (DATADIR);
break;
@@ -406,6 +412,10 @@ ar_runtime_get_directory (ArRuntimeDirectory directory)
path = g_strdup (PKGDATADIR);
break;
+ case AR_RUNTIME_PKG_LIBRARY_DIRECTORY:
+ path = g_strdup (PKGLIBDIR);
+ break;
+
#endif /* ENABLE_BINRELOC */
default: {
diff --git a/src/lib/ar-runtime.h b/src/lib/ar-runtime.h
index a79f80b..793c15d 100644
--- a/src/lib/ar-runtime.h
+++ b/src/lib/ar-runtime.h
@@ -25,8 +25,10 @@ G_BEGIN_DECLS
typedef enum {
/* Base directories */
AR_RUNTIME_PREFIX,
+ AR_RUNTIME_LIBRARY_DIRECTORY,
AR_RUNTIME_DATA_DIRECTORY,
AR_RUNTIME_PKG_DATA_DIRECTORY,
+ AR_RUNTIME_PKG_LIBRARY_DIRECTORY,
/* Derived directories */
AR_RUNTIME_LOCALE_DIRECTORY,
@@ -36,6 +38,7 @@ typedef enum {
AR_RUNTIME_ICON_THEME_DIRECTORY,
AR_RUNTIME_SOUND_DIRECTORY,
AR_RUNTIME_GAMES_DIRECTORY,
+ AR_RUNTIME_GAMES_COMPILED_DIRECTORY,
AR_RUNTIME_HELP_DIRECTORY, /* On win32 help is created as html with gnome-doc-tool, and put manually in this directory */
AR_RUNTIME_LAST_DIRECTORY,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]