mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-14 00:41:08 +00:00
db2c35a57c
Add parentheses to print statements Use subprocess.check_output instead of commands.getstatusoutput to run external processes Use pickle instead of cPickle library This allows building on Linux distributions that have switched to python 3 by default but also retains backwards compatibility with python 2.7
32 lines
826 B
Python
32 lines
826 B
Python
# -*- mode: python -*-
|
|
# GtkRadiant build scripts
|
|
# TTimo <ttimo@ttimo.net>
|
|
# http://scons.org/
|
|
|
|
import os
|
|
|
|
Import( [ 'utils', 'config', 'settings', 'project' ] )
|
|
|
|
( libpath, libname ) = os.path.split( project )
|
|
libname = os.path.splitext( libname )[0]
|
|
env = Environment( ENV = os.environ )
|
|
settings.SetupEnvironment( env, config['name'] )
|
|
proj = utils.vcxproj( os.path.join( GetLaunchDir(), project ) )
|
|
|
|
# some filtering. may need to improve that
|
|
add_sources = []
|
|
( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
|
|
if ( len( drop ) != 0 ):
|
|
add_sources.append( 'l_net_berkeley.c' )
|
|
|
|
emit_func = env.StaticObject
|
|
try:
|
|
if ( config['shared'] ):
|
|
emit_func = env.SharedObject
|
|
except:
|
|
pass
|
|
|
|
objects = []
|
|
for i in files + add_sources:
|
|
objects.append( emit_func( source=os.path.join( libpath, i ) ) )
|
|
Return( 'objects' )
|