diff --git a/engine/qclib/qccguistuff.c b/engine/qclib/qccguistuff.c index 89abbe111..69cf71b71 100644 --- a/engine/qclib/qccguistuff.c +++ b/engine/qclib/qccguistuff.c @@ -729,6 +729,10 @@ int GUI_ParseCommandLine(const char *args, pbool keepsrcanddir) { fl_log = true; } + else if (!strnicmp(parameters+paramlen, "-nolog", 4) || !strnicmp(parameters+paramlen, "/nolog", 4)) + { + fl_log = false; + } else if (!strnicmp(parameters+paramlen, "-engine", 7) || !strnicmp(parameters+paramlen, "/engine", 7)) { while (*next == ' ') diff --git a/engine/qclib/qccmain.c b/engine/qclib/qccmain.c index 77b8a2ee3..2c35bbed3 100644 --- a/engine/qclib/qccmain.c +++ b/engine/qclib/qccmain.c @@ -2490,7 +2490,7 @@ strofs = (strofs+3)&~3; externs->Printf("Compile finished: %s (hexen2 format)\n", destfile); break; case QCF_DARKPLACES: - externs->Printf("Compile finished: %s (dp format)\n", destfile); + externs->Printf("Compile finished: %s (patched-dp format)\n", destfile); break; case QCF_FTE: externs->Printf("Compile finished: %s (fte format)\n", destfile); @@ -4386,6 +4386,9 @@ static void QCC_PR_CommandLinePrecompilerOptions (void) else if ( !strcmp(myargv[i], "-stdout") ) { } + else if ( !strcmp(myargv[i], "-log") || !strcmp(myargv[i], "-nolog") ) + { + } else if ( !strcmp(myargv[i], "--version") ) { externs->Printf("%s\n", QCC_VersionString()); diff --git a/engine/qclib/qcctui.c b/engine/qclib/qcctui.c index 4acf6e06b..a2772ca31 100644 --- a/engine/qclib/qcctui.c +++ b/engine/qclib/qcctui.c @@ -119,6 +119,11 @@ int main (int argc, const char **argv) { unsigned int i; pbool sucess; +#ifdef _WIN32 + pbool writelog = true; //spew log files on windows. windows often closes the window as soon as the program ends making its output otherwise unreadable. +#else + pbool writelog = false; //other systems are sane. +#endif progexterns_t ext; progfuncs_t funcs; progfuncs = &funcs; @@ -145,15 +150,24 @@ int main (int argc, const char **argv) } #endif + for (i = 0; i < argc; i++) + { + if (!argv[i]) + continue; + if (strcmp(argv[i], "-log")) + writelog = true; + else if (strcmp(argv[i], "-nolog")) + writelog = false; + } + logfile = writelog?fopen("fteqcc.log", "wt"):false; -#ifdef _WIN32 - logfile = fopen("fteqcc.log", "wt"); -#endif if (logfile) { fputs("Args:", logfile); for (i = 0; i < argc; i++) { + if (!argv[i]) + continue; if (strchr(argv[i], ' ')) fprintf(logfile, " \"%s\"", argv[i]); else