Fix 64 bit windows q3map2 visibility.

This commit is contained in:
jdolan 2013-06-27 17:48:22 -04:00
parent dac352274a
commit 625eaa9502
3 changed files with 32 additions and 25 deletions

View file

@ -169,22 +169,22 @@ class Config:
q3map2 = SConscript( os.path.join( build_dir, sconscript_name ) )
Default( InstallAs( os.path.join( self.install_directory, compiler_name ), q3map2 ) )
def emit_q3data( self ):
settings = self
for config_name in self.config_selected:
config = {}
config['name'] = config_name
config['shared'] = False
Export( 'utils', 'settings', 'config' )
build_dir = os.path.join( 'build', config_name, 'q3data' )
VariantDir( build_dir, '.', duplicate = 0 )
lib_objects = []
for project in [ 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj' ]:
Export( 'project' )
lib_objects += SConscript( os.path.join( build_dir, 'SConscript.lib' ) )
Export( 'lib_objects' )
q3data = SConscript( os.path.join( build_dir, 'SConscript.q3data' ) )
Default( InstallAs( os.path.join( self.install_directory, 'q3data' ), q3data ) )
def emit_q3data( self ):
settings = self
for config_name in self.config_selected:
config = {}
config['name'] = config_name
config['shared'] = False
Export( 'utils', 'settings', 'config' )
build_dir = os.path.join( 'build', config_name, 'q3data' )
VariantDir( build_dir, '.', duplicate = 0 )
lib_objects = []
for project in [ 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj' ]:
Export( 'project' )
lib_objects += SConscript( os.path.join( build_dir, 'SConscript.lib' ) )
Export( 'lib_objects' )
q3data = SConscript( os.path.join( build_dir, 'SConscript.q3data' ) )
Default( InstallAs( os.path.join( self.install_directory, 'q3data' ), q3data ) )
def emit( self ):
if 'radiant' in self.target_selected:

View file

@ -662,7 +662,9 @@ PrefsDlg::PrefsDlg (){
#endif
m_nLightRadiuses = 1;
m_bQ3Map2Texturing = TRUE;
m_bx64q3map2 = TRUE;
#ifdef _WIN32
m_bx64q3map2 = TRUE;
#endif
#ifdef ATIHACK_812
m_bGlATIHack = FALSE;
#endif
@ -3144,7 +3146,9 @@ void PrefsDlg::LoadPrefs(){
mLocalPrefs.GetPref( LIGHTRADIUS_KEY, &m_nLightRadiuses, TRUE );
mLocalPrefs.GetPref( Q3MAP2TEX_KEY, &m_bQ3Map2Texturing, TRUE );
mLocalPrefs.GetPref( X64Q3MAP2_KEY, &m_bx64q3map2, TRUE );
#ifdef _WIN32
mLocalPrefs.GetPref( X64Q3MAP2_KEY, &m_bx64q3map2, TRUE );
#endif
#ifdef ATIHACK_812
mLocalPrefs.GetPref( ATIHACK_KEY, &m_bGlATIHack, FALSE );

View file

@ -443,7 +443,7 @@ void ReplaceTemplates( char* w, const char* r ){
const char *__TOOLSPATH = "TEMPLATEtoolspath";
const char *__BASEDIR = "TEMPLATEbasedir";
const char *__APPPATH = "TEMPLATEapppath";
const char *__Q3MAP2 = "TEMPLATEq3map2";
const char *__Q3MAP2 = "TEMPLATEq3map2";
// iterate through string r
while ( *r != '\0' )
@ -471,13 +471,16 @@ void ReplaceTemplates( char* w, const char* r ){
p = g_strAppPath.GetBuffer();
}
else if ( strncmp( r + 1, __Q3MAP2, strlen( __Q3MAP2 ) ) == 0 ) {
r += strlen( __Q3MAP2 ) + 1;
// see https://github.com/TTimo/GtkRadiant/issues/116
if ( g_PrefsDlg.m_bx64q3map2 ) {
r += strlen( __Q3MAP2 ) + 1;
// see https://github.com/TTimo/GtkRadiant/issues/116
#ifdef _WIN32
if ( g_PrefsDlg.m_bx64q3map2 ) {
p = "x64/q3map2";
} else {
p = "q3map2";
}
} else
#endif
{
p = "q3map2";
}
}
else
{