From 377cd580b352333b4e831b79940b4d8439b11bbf Mon Sep 17 00:00:00 2001
From: Tim Felgentreff <timfelgentreff@gmail.com>
Date: Sun, 20 Nov 2016 00:07:29 +0100
Subject: [PATCH] Update stratagus-game-launcher.h

---
 gameheaders/stratagus-game-launcher.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gameheaders/stratagus-game-launcher.h b/gameheaders/stratagus-game-launcher.h
index e99ece27f..8aada3d5d 100644
--- a/gameheaders/stratagus-game-launcher.h
+++ b/gameheaders/stratagus-game-launcher.h
@@ -458,7 +458,7 @@ static void ExtractData(char* extractor_tool, char* destination, char* scripts_p
 	strcat(cmdbuf, "/C \"");
 #else
 	if (!ConsoleMode) {
-		strcat(cmdbuf, "x-terminal-emulator -e \"");
+		strcat(cmdbuf, "xterm -e \"");
 	}
 #endif
 	strcat(cmdbuf, extractor_tool);
@@ -524,6 +524,7 @@ int main(int argc, char * argv[]) {
 	char extractor_path[BUFF_SIZE];
 
 	// The extractor is in the same dir as we are
+        if (strchr(argv[0], SLASH[0]))  {
 	strcpy(extractor_path, argv[0]);
 	dirname(extractor_path);
 	strcat(extractor_path, SLASH EXTRACTOR_TOOL);
@@ -535,6 +536,9 @@ int main(int argc, char * argv[]) {
 	extractor_path[0] = QUOTE[0];
 	extractor_path[strlen(extractor_path) + 1] = '\0';
 	extractor_path[strlen(extractor_path)] = QUOTE[0];
+       } else {
+           strcat(extractor_path, EXTRACTOR_TOOL);
+       } 
 	strcat(extractor_path, " " EXTRACTOR_ARGS);
 
 #ifdef WIN32