From d441e6926489d71aaa089fb7551f8b6f8824340d Mon Sep 17 00:00:00 2001 From: ttimo Date: Mon, 14 Nov 2022 14:13:33 -0600 Subject: [PATCH] do not write out the build tools output to junk.txt, it hides the output from the cmd window. in ancient time the editor was loading junk.txt into the console afterwards, but that is long gone now - so that feature was entirely detrimental at this point --- radiant/main.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/radiant/main.cpp b/radiant/main.cpp index 33e1e4c5..d0221ef2 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -1187,7 +1187,6 @@ static gboolean RunBsp_CaptureOutput(void *data) { void RunBsp( char *command ){ GPtrArray *sys; char batpath[BIG_PATH_MAX]; - char temppath[BIG_PATH_MAX]; char name[BIG_PATH_MAX]; char cWork[BIG_PATH_MAX]; FILE *hFile; @@ -1195,8 +1194,6 @@ void RunBsp( char *command ){ SetInspectorMode( W_CONSOLE ); - strcpy( temppath, g_strTempPath.GetBuffer() ); - SaveWithRegion( name ); const char *rsh = ValueForKey( g_qeglobals.d_project_entity, "rshcmd" ); @@ -1228,24 +1225,13 @@ void RunBsp( char *command ){ for ( i = 0; i < sys->len; i++ ) { strSys += (char *)g_ptr_array_index( sys, i ); -#ifdef _WIN32 // write temp\junk.txt in win32... NOTE: stops output to shell prompt window - if ( i == 0 ) { - strSys += " >"; - } - else{ - strSys += " >>"; - } - strSys += "\""; - strSys += temppath; - strSys += "junk.txt\""; -#endif strSys += "\n"; }; #if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ ) // write qe3bsp.sh - sprintf( batpath, "%sqe3bsp.sh", temppath ); + sprintf( batpath, "%sqe3bsp.sh", g_strTempPath.GetBuffer() ); Sys_Printf( "Writing the compile script to '%s'\n", batpath ); hFile = fopen( batpath, "w" ); if ( !hFile ) { @@ -1258,9 +1244,8 @@ void RunBsp( char *command ){ #endif #ifdef _WIN32 - sprintf( batpath, "%sqe3bsp.bat", temppath ); + sprintf( batpath, "%sqe3bsp.bat", g_strTempPath.GetBuffer() ); Sys_Printf( "Writing the compile script to '%s'\n", batpath ); - Sys_Printf( "The build output will be saved in '%sjunk.txt'\n", temppath ); hFile = fopen( batpath, "w" ); if ( !hFile ) { Error( "Can't write to %s", batpath ); @@ -1312,7 +1297,7 @@ void RunBsp( char *command ){ } // free the strings and the array for ( i = 0; i < sys->len; i++ ) { - delete[] (char *)g_ptr_array_index( sys, i ); + delete[](char*)g_ptr_array_index( sys, i ); } g_ptr_array_free( sys, TRUE ); sys = NULL;