non monitored 'run engine after compile': set CWD to make some engines happy

closes #274
This commit is contained in:
Garux
2025-12-20 19:34:47 +05:00
parent 2bc83b14b0
commit 0cbdfc24b1
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ public:
} }
else if ( const char *ext = path_get_extension( name ); else if ( const char *ext = path_get_extension( name );
!string_equal( name, "." ) && !string_equal( name, ".." ) !string_equal( name, "." ) && !string_equal( name, ".." )
/* skip .pk3dir / .pk4dir / .dpkdir / .pakdir / .waddir the in root, they are processed as DirectoryArchive */ /* skip .pk3dir / .pk4dir / .dpkdir / .pakdir / .waddir in the root, they are processed as DirectoryArchive */
&& !( string_empty( root ) && string_length( ext ) == 6 && string_equal_nocase( ext + 3, "dir" ) ) ) { && !( string_empty( root ) && string_length( ext ) == 6 && string_equal_nocase( ext + 3, "dir" ) ) ) {
path.push_filename( name ); path.push_filename( name );
+5 -1
View File
@@ -595,8 +595,12 @@ void CWatchBSP::DoEBeginStep(){
return; return;
} // monitoring off or unmonitored command } // monitoring off or unmonitored command
else if( !g_WatchBSP_Enabled || strstr( m_commands[ m_iCurrentStep ].c_str(), RADIANT_MONITOR_ADDRESS ) == nullptr ){ else if( !g_WatchBSP_Enabled || strstr( m_commands[ m_iCurrentStep ].c_str(), RADIANT_MONITOR_ADDRESS ) == nullptr ){
if( g_WatchBSP_RunQuake ) if( g_WatchBSP_RunQuake ){
#ifdef WIN32 // vanilla quake3.exe, ioquake3.x86_64.exe are sensitive to CWD, set it
m_commands.emplace_back( StringStream( "cd /D ", Quoted( EnginePath_get() ) ) );
#endif
m_commands.emplace_back( runEngineCmd( m_sBSPName.c_str() ) ); m_commands.emplace_back( runEngineCmd( m_sBSPName.c_str() ) );
}
m_commands.erase( m_commands.cbegin(), m_commands.cbegin() + m_iCurrentStep ); m_commands.erase( m_commands.cbegin(), m_commands.cbegin() + m_iCurrentStep );
RunBatch( m_commands ); RunBatch( m_commands );
return; return;