mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Improvements when not using BSP monitoring: check return code and show a clear error message, add a pause at the end of the compile
This commit is contained in:
parent
fe696cf3ae
commit
6ac09d6f73
2 changed files with 18 additions and 3 deletions
|
@ -115,6 +115,7 @@ bool Q_Exec( const char *cmd, char *cmdline, const char *execdir, bool bCreateCo
|
||||||
&startupinfo,
|
&startupinfo,
|
||||||
&ProcessInformation
|
&ProcessInformation
|
||||||
) ) {
|
) ) {
|
||||||
|
// NOTE: the docs suggest we should be closing the handles in PROCESS_INFORMATION here
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1221,12 +1221,26 @@ void RunBsp( char *command ){
|
||||||
g_pParentWnd->GetWatchBSP()->DoMonitoringLoop( sys, bspname );
|
g_pParentWnd->GetWatchBSP()->DoMonitoringLoop( sys, bspname );
|
||||||
} else {
|
} else {
|
||||||
// write all the steps in a single BAT / .sh file and run it, don't bother monitoring it
|
// write all the steps in a single BAT / .sh file and run it, don't bother monitoring it
|
||||||
CString strSys;
|
CString strSys = "echo off\n";
|
||||||
for ( i = 0; i < sys->len; i++ )
|
for ( i = 0; i < sys->len; i++ )
|
||||||
{
|
{
|
||||||
strSys += (char *)g_ptr_array_index( sys, i );
|
strSys += (char *)g_ptr_array_index( sys, i );
|
||||||
strSys += "\n";
|
strSys += "\nIF %ERRORLEVEL% NEQ 0 goto error\n";
|
||||||
};
|
}
|
||||||
|
strSys += "\
|
||||||
|
goto end\n\
|
||||||
|
\n\
|
||||||
|
:error\n\
|
||||||
|
ECHO.\n\
|
||||||
|
ECHO.\n\
|
||||||
|
ECHO =======================================\n\
|
||||||
|
ECHO =========== BSP STEP FAILED ===========\n\
|
||||||
|
ECHO =======================================\n\
|
||||||
|
ECHO.\n\
|
||||||
|
\n\
|
||||||
|
:end\n\
|
||||||
|
pause\n\
|
||||||
|
";
|
||||||
|
|
||||||
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
#if defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __APPLE__ )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue