ref: 1b3dff9b4a1236afdec52056a08df51505c19df7
parent: e6028047cd51a6d14d4e30b0aae733f51a810f86
author: Simon Howard <[email protected]>
date: Tue Sep 26 19:50:39 EDT 2006
When invoking chocolate doom, run it from the install dir on Unix. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 676
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -1,6 +1,7 @@
-AM_CFLAGS = @SDL_CFLAGS@ -I../textscreen -I../src
gamesdir = $(prefix)/games
+
+AM_CFLAGS = @SDL_CFLAGS@ -I../textscreen -I../src -DINSTALL_DIR="\"$(gamesdir)\""
games_PROGRAMS = chocolate-setup
--- a/setup/testconfig.c
+++ b/setup/testconfig.c
@@ -37,7 +37,15 @@
TXT_SetWidgetAlign(label, TXT_HORIZ_CENTER);
TXT_AddWidget(testwindow, label);
TXT_DrawDesktop();
+
+#ifdef _WIN32
+ // On windows, just run the command - we aren't installed anywhere
+ // special.
system("chocolate-doom -testcontrols");
+#else
+ // Use the location where we are installed
+ system(INSTALL_DIR "/chocolate-doom -testcontrols");
+#endif
TXT_CloseWindow(testwindow);
}