From da4d5c225390d1864b4c103bf76dcf6ba7238659 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 24 Oct 2006 22:26:20 +0000 Subject: Don't rely on INSTALL_DIR for the Win32 build. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 735 --- setup/execute.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'setup') diff --git a/setup/execute.c b/setup/execute.c index b2933c9a..5e8a24ea 100644 --- a/setup/execute.c +++ b/setup/execute.c @@ -31,6 +31,12 @@ #include "execute.h" #include "m_argv.h" +#ifdef _WIN32 +#define DOOM_BINARY "chocolate-doom.exe" +#else +#define DOOM_BINARY INSTALL_DIR "/chocolate-doom" +#endif + struct execute_context_s { char *response_file; @@ -97,14 +103,10 @@ void ExecuteDoom(execute_context_t *context) // Build the command line - cmdline = malloc(strlen(INSTALL_DIR) + cmdline = malloc(strlen(DOOM_BINARY) + strlen(context->response_file) + 20); -#ifdef _WIN32 - sprintf(cmdline, "chocolate-doom @%s", context->response_file); -#else - sprintf(cmdline, INSTALL_DIR "/chocolate-doom @%s", context->response_file); -#endif + sprintf(cmdline, "%s @%s", DOOM_BINARY, context->response_file); // Run the command system(cmdline); -- cgit v1.2.3