------------------------------------------------------------------------
r4223 | acceptthis | 2013-02-21 14:43:49 +0000 (Thu, 21 Feb 2013) | 1 line use multithreading in linux too, because we can. Fix extra-quotes issue. ------------------------------------------------------------------------ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4220 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5ac7034b1a
commit
584dba6ae6
2 changed files with 7 additions and 15 deletions
|
@ -931,7 +931,7 @@ ifneq ($(shell echo $(FTE_TARGET)|grep linux),)
|
||||||
GL_EXE_NAME=../fteqw.gl$(BITS)
|
GL_EXE_NAME=../fteqw.gl$(BITS)
|
||||||
GLCL_EXE_NAME=../fteqwcl.gl$(BITS)
|
GLCL_EXE_NAME=../fteqwcl.gl$(BITS)
|
||||||
GL_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) $(OGGVORBISLDFLAGS) -lz
|
GL_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) $(OGGVORBISLDFLAGS) -lz
|
||||||
GL_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include $(SPEEXCFLAGS) -DLIBVORBISFILE_STATIC
|
GL_CFLAGS=$(GLCFLAGS) -I/usr/X11R6/include $(SPEEXCFLAGS) -DMULTITHREAD -DLIBVORBISFILE_STATIC
|
||||||
GLB_DIR=gl_linux$(BITS)
|
GLB_DIR=gl_linux$(BITS)
|
||||||
GLCL_DIR=glcl_linux$(BITS)
|
GLCL_DIR=glcl_linux$(BITS)
|
||||||
|
|
||||||
|
|
|
@ -880,15 +880,7 @@ char *cleanarg(char *arg)
|
||||||
*c = '?';
|
*c = '?';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*arg)
|
return strdup(arg);
|
||||||
{
|
|
||||||
char *out = malloc(strlen(arg)+3);
|
|
||||||
strcpy(out+1, arg);
|
|
||||||
out[0] = '\"';
|
|
||||||
strcat(out, "\"");
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
return strdup("\"\"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qboolean Plug_GetBinaryName(char *exe, int exelen, char *basedir, int basedirlen)
|
qboolean Plug_GetBinaryName(char *exe, int exelen, char *basedir, int basedirlen)
|
||||||
|
@ -901,9 +893,8 @@ qboolean Plug_GetBinaryName(char *exe, int exelen, char *basedir, int basedirlen
|
||||||
*exe = 0;
|
*exe = 0;
|
||||||
*basedir = 0;
|
*basedir = 0;
|
||||||
|
|
||||||
//#ifdef _DEBUG
|
|
||||||
// Q_strncpyz(exe, "C:/Games/Quake/fte_trunk/fteglqw_dbg.exe", exelen);
|
// Q_strncpyz(exe, "C:/Games/Quake/fte_trunk/fteglqw_dbg.exe", exelen);
|
||||||
//#endif
|
// Q_strncpyz(exe, "/home/david/quake/fte_trunk/engine/debug/fteqw.gl", exelen);
|
||||||
/*
|
/*
|
||||||
Q_snprintfz(buffer, sizeof(buffer), "%s%s", binarypath, "npfte.txt");
|
Q_snprintfz(buffer, sizeof(buffer), "%s%s", binarypath, "npfte.txt");
|
||||||
|
|
||||||
|
@ -950,8 +941,9 @@ int Plug_GenCommandline(struct context *ctx, char **argv, int maxargs)
|
||||||
return 0; //error
|
return 0; //error
|
||||||
}
|
}
|
||||||
|
|
||||||
argv[0] = strdup(exe);
|
argc = 0;
|
||||||
argc = 1;
|
|
||||||
|
ADDRARG(exe);
|
||||||
|
|
||||||
if (autoupdate)
|
if (autoupdate)
|
||||||
{
|
{
|
||||||
|
@ -1045,7 +1037,7 @@ qboolean Plug_GenCommandlineString(struct context *ctx, char *cmdline, int cmdli
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
//add quotes for any arguments with spaces
|
//add quotes for any arguments with spaces
|
||||||
if (strchr(argv[i], ' '))
|
if (strchr(argv[i], ' ') || strchr(arg[i], '\t'))
|
||||||
{
|
{
|
||||||
Q_strncatz(cmdline, "\"", cmdlinelen);
|
Q_strncatz(cmdline, "\"", cmdlinelen);
|
||||||
Q_strncatz(cmdline, argv[i], cmdlinelen);
|
Q_strncatz(cmdline, argv[i], cmdlinelen);
|
||||||
|
|
Loading…
Reference in a new issue