compile both versions of q3map2

This commit is contained in:
Timothee 'TTimo' Besset 2012-06-09 13:49:40 -05:00
parent 61a03e2ee7
commit 8212783597

View file

@ -150,14 +150,20 @@ class Config:
module = SConscript( os.path.join( build_dir, 'SConscript.module' ) )
Default( InstallAs( os.path.join( self.install_directory, 'modules/%s.so' % libname ), module ) )
def emit_q3map2( self ):
def emit_q3map2( self, urt = False ):
if ( urt ):
compiler_name = 'q3map2.urt'
sconscript_name = 'SConscript.q3map2.urt'
else:
compiler_name = 'q3map2'
sconscript_name = 'SConscript.q3map2'
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, 'q3map2' )
Export( 'utils', 'settings', 'config' )
build_dir = os.path.join( 'build', config_name, compiler_name )
VariantDir( build_dir, '.', duplicate = 0 )
lib_objects = []
for project in [ 'tools/quake3/common/quake3-common.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj', 'libs/picomodel/picomodel.vcproj', 'libs/md5lib/md5lib.vcproj' ]:
@ -165,33 +171,18 @@ class Config:
lib_objects += SConscript( os.path.join( build_dir, 'SConscript.lib' ) )
Export( 'lib_objects' )
# q3map2 = SConscript( os.path.join( build_dir, 'SConscript.q3map2' ) )
# Default( InstallAs( os.path.join( self.install_directory, 'q3map2' ), q3map2 ) )
q3map2_urt = SConscript( os.path.join( build_dir, 'SConscript.q3map2.urt' ) )
Default( InstallAs( os.path.join( self.install_directory, 'q3map2.urt' ), q3map2_urt ) )
q3map2 = SConscript( os.path.join( build_dir, sconscript_name ) )
Default( InstallAs( os.path.join( self.install_directory, compiler_name ), q3map2 ) )
def emit( self ):
try:
self.target_selected.index( 'radiant' )
except:
pass
else:
self.emit_radiant()
try:
self.target_selected.index( 'q3map2' )
except:
pass
else:
self.emit_q3map2()
try:
self.target_selected.index( 'setup' )
except:
pass
else:
self.Setup()
if 'radiant' in self.target_selected:
self.emit_radiant()
if 'q3map2' in self.target_selected:
self.emit_q3map2( urt = False )
self.emit_q3map2( urt = True )
if 'setup' in self.target_selected:
self.Setup()
def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useJPEG = False, useZ = False, usePNG = False ):
env['CC'] = self.cc