update gameheaders and dependencies
This commit is contained in:
parent
377cd580b3
commit
edc22514ab
2 changed files with 30 additions and 35 deletions
6
debian/control
vendored
6
debian/control
vendored
|
@ -4,8 +4,8 @@ Priority: optional
|
|||
Maintainer: cybermind <iddqd_mail@mail.ru>
|
||||
Build-Depends: debhelper (>= 7), cmake (>= 2.6), doxygen,
|
||||
imagemagick, sharutils, liblua5.1-dev | liblua5.1-0-dev, libtolua++5.1-dev,
|
||||
zlib1g-dev, libbz2-dev, libpng12-dev (>= 1.2.5), libmng-dev,
|
||||
libmikmod2-dev, libogg-dev, libvorbis-dev, libtheora-dev,
|
||||
zlib1g-dev, libbz2-dev, libpng12-dev (>= 1.2.5) | libpng-dev (>= 1.2.5),
|
||||
libmng-dev, libmikmod2-dev, libogg-dev, libvorbis-dev, libtheora-dev,
|
||||
libsdl1.2-dev (>> 1.2.2), libx11-dev, libsqlite3-dev,
|
||||
libgles1-sgx-img-dev | libglu1-mesa-dev | libglu-dev | libgles1-mesa-dev,
|
||||
libsdl-gles1.2-dev | libglu1-mesa-dev | libglu-dev, libfluidsynth-dev
|
||||
|
@ -16,7 +16,7 @@ Vcs-Git: https://github.com/Wargus/stratagus.git
|
|||
|
||||
Package: stratagus
|
||||
Architecture: any
|
||||
Suggests: wargus, war1gus, stargus, stratagus-data
|
||||
Recommends: wargus, war1gus, stargus, stratagus-data
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||
Description: Strategy Gaming Engine
|
||||
Stratagus is a free cross-platform real-time strategy gaming engine.
|
||||
|
|
|
@ -211,7 +211,6 @@ stratagus-game-launcher.h - Stratagus Game Launcher
|
|||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
|
@ -227,10 +226,6 @@ stratagus-game-launcher.h - Stratagus Game Launcher
|
|||
|
||||
#define BUFF_SIZE 4096
|
||||
|
||||
#ifndef WIN32
|
||||
int ConsoleMode = 0;
|
||||
#endif
|
||||
|
||||
#include "stratagus-tinyfiledialogs.h"
|
||||
|
||||
static void SetUserDataPath(char* data_path) {
|
||||
|
@ -457,8 +452,9 @@ static void ExtractData(char* extractor_tool, char* destination, char* scripts_p
|
|||
#elseif WIN32
|
||||
strcat(cmdbuf, "/C \"");
|
||||
#else
|
||||
if (!ConsoleMode) {
|
||||
strcat(cmdbuf, "xterm -e \"");
|
||||
if (!isatty(1)) {
|
||||
strcat(cmdbuf, terminalName());
|
||||
strcat(cmdbuf, " \"");
|
||||
}
|
||||
#endif
|
||||
strcat(cmdbuf, extractor_tool);
|
||||
|
@ -472,7 +468,7 @@ static void ExtractData(char* extractor_tool, char* destination, char* scripts_p
|
|||
#elseif WIN32
|
||||
strcat(cmdbuf, "\"");
|
||||
#else
|
||||
if (!ConsoleMode) {
|
||||
if (!isatty(1)) {
|
||||
strcat(cmdbuf, "\"");
|
||||
}
|
||||
#endif
|
||||
|
@ -499,6 +495,14 @@ static void ExtractData(char* extractor_tool, char* destination, char* scripts_p
|
|||
int exitcode = 0;
|
||||
printf("Running %s\n", cmdbuf);
|
||||
exitcode = system(cmdbuf);
|
||||
#ifdef USE_MAC
|
||||
#else
|
||||
if (!isatty(1)) {
|
||||
tinyfd_messageBox("Extraction in progress",
|
||||
"Data extraction is in progress in a new terminal window. "
|
||||
"Press ok after it finished.", "ok", "info", 1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
if (exitcode != 0) {
|
||||
tinyfd_messageBox("Missing data", "Data extraction failed", "ok", "error", 1);
|
||||
|
@ -507,15 +511,6 @@ static void ExtractData(char* extractor_tool, char* destination, char* scripts_p
|
|||
}
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
|
||||
#if !defined(WIN32) && !defined(USE_MAC)
|
||||
if ( ! XOpenDisplay(NULL) ) {
|
||||
ConsoleMode = 1;
|
||||
}
|
||||
if (!ConsoleMode) {
|
||||
}
|
||||
#endif
|
||||
|
||||
struct stat st;
|
||||
char data_path[BUFF_SIZE];
|
||||
char scripts_path[BUFF_SIZE];
|
||||
|
@ -524,21 +519,21 @@ 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);
|
||||
// Once we have the path, we quote it by moving the memory one byte to the
|
||||
// right, and surrounding it with the quote character and finishing null
|
||||
// bytes. Then we add the arguments.
|
||||
extractor_path[strlen(extractor_path) + 1] = '\0';
|
||||
memmove(extractor_path + 1, extractor_path, strlen(extractor_path));
|
||||
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);
|
||||
}
|
||||
if (strchr(argv[0], SLASH[0])) {
|
||||
strcpy(extractor_path, argv[0]);
|
||||
dirname(extractor_path);
|
||||
strcat(extractor_path, SLASH EXTRACTOR_TOOL);
|
||||
// Once we have the path, we quote it by moving the memory one byte to the
|
||||
// right, and surrounding it with the quote character and finishing null
|
||||
// bytes. Then we add the arguments.
|
||||
extractor_path[strlen(extractor_path) + 1] = '\0';
|
||||
memmove(extractor_path + 1, extractor_path, strlen(extractor_path));
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue