diff options
-rw-r--r-- | setup/Makefile.am | 3 | ||||
-rw-r--r-- | setup/testconfig.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/setup/Makefile.am b/setup/Makefile.am index 09b5c56c..33f6d759 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -1,7 +1,8 @@ -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 chocolate_setup_LDADD = @LDFLAGS@ @SDL_LIBS@ ../textscreen/libtextscreen.a diff --git a/setup/testconfig.c b/setup/testconfig.c index 4e991d1a..19e1ca2c 100644 --- a/setup/testconfig.c +++ b/setup/testconfig.c @@ -37,7 +37,15 @@ static void TestCallback(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(data)) 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); } |