Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -u ../Gtkradiant.orig/config.py ./config.py
- --- ../Gtkradiant.orig/config.py 2013-03-30 15:24:40.000000000 +0100
- +++ ./config.py 2013-04-01 16:22:41.952115000 +0200
- @@ -3,12 +3,19 @@
- if __name__ != '__main__':
- from SCons.Script import *
- -import utils, urllib2, zipfile, shutil, pprint, subprocess, re, os.path
- +import utils, urllib2, zipfile, shutil, pprint, subprocess, re
- # config = debug release
- +# aliases are going to be very needed here
- +# we have dependency situations too
- # target =
- class Config:
- + # not used atm, but useful to keep a list in mind
- + # may use them eventually for the 'all' and other aliases expansions?
- + target_choices = utils.Enum( 'radiant', 'q3map2', 'q3data', 'setup' )
- + config_choices = utils.Enum( 'debug', 'release' )
- +
- # aliases
- # 'all' -> for each choices
- # 'gamecode' for the targets, 'game' 'cgame' 'ui'
- @@ -25,8 +32,8 @@
- # platforms for which to assemble a setup
- self.setup_platforms = [ 'local', 'x86', 'x64', 'win32' ]
- - # paks to assemble in the setup
- - self.setup_packs = [ 'Q3Pack', 'UrTPack', 'ETPack', 'QLPack' ]
- + # paks to assemble in the setup
- + self.setup_packs = [ 'Q3Pack', 'UrTPack', 'ETPack', 'QLPack' ]
- def __repr__( self ):
- return 'config: target=%s config=%s' % ( self.target_selected, self.config_selected )
- @@ -97,7 +104,7 @@
- 'plugins/entity/entity.vcproj',
- 'plugins/image/image.vcproj',
- 'plugins/model/model.vcproj',
- - 'plugins/imagepng/imagepng.vcproj',
- +# 'plugins/imagepng/imagepng.vcproj',
- 'plugins/imagewal/imagewal.vcproj',
- 'plugins/imagehl/imagehl.vcproj',
- 'plugins/imagem8/imagem8.vcproj',
- @@ -201,7 +208,7 @@
- Depends( finish_command, DEFAULT_TARGETS )
- Default( finish_command )
- - def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useJPEG = False, useZ = False, usePNG = False ):
- + def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useZ = False ):
- env['CC'] = self.cc
- env['CXX'] = self.cxx
- ( ret, xml2 ) = commands.getstatusoutput( 'xml2-config --cflags' )
- @@ -212,24 +219,42 @@
- env.Append( LINKFLAGS = xml2libs.split( ' ' ) )
- baseflags = [ '-pipe', '-Wall', '-fmessage-length=0', '-fvisibility=hidden', xml2.split( ' ' ) ]
- + if ( self.platform == 'Darwin' ):
- + env.Append( CPPPATH = [ '/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include' ] )
- +
- if ( useGtk ):
- - env.ParseConfig( 'pkg-config gtk+-2.0 --cflags --libs' )
- - env.ParseConfig( 'pkg-config x11 --cflags --libs' )
- + ( ret, gtk2 ) = commands.getstatusoutput( 'pkg-config gtk+-2.0 --cflags' )
- + if ( ret != 0 ):
- + print 'pkg-config gtk+-2.0 failed'
- + assert( False )
- + baseflags += gtk2.split( ' ' )
- + gtk2libs = commands.getoutput( 'pkg-config gtk+-2.0 --libs' )
- + env.Append( LINKFLAGS = gtk2libs.split( ' ' ) )
- else:
- # always setup at least glib
- - env.ParseConfig( 'pkg-config glib-2.0 --cflags --libs' )
- + ( ret, glib ) = commands.getstatusoutput( 'pkg-config glib-2.0 --cflags' )
- + if ( ret != 0 ):
- + print 'pkg-config glib-2.0 failed'
- + assert( False )
- + baseflags += glib.split( ' ' )
- + gliblibs = commands.getoutput( 'pkg-config glib-2.0 --libs' )
- + env.Append( LINKFLAGS = gliblibs.split( ' ' ) )
- if ( useGtkGL ):
- - env.ParseConfig( 'pkg-config glu --cflags --libs' )
- - env.ParseConfig( 'pkg-config gtkglext-1.0 --cflags --libs' )
- - if ( useJPEG ):
- - env.Append( LIBS = 'jpeg' )
- - if ( usePNG ):
- - pnglibs = 'png'
- - env.Append( LIBS = pnglibs.split( ' ' ) )
- - env.ParseConfig( 'pkg-config zlib --cflags --libs' )
- - if ( useZ ):
- - env.ParseConfig( 'pkg-config zlib --cflags --libs' )
- + ( ret, gtkgl ) = commands.getstatusoutput( 'pkg-config gtkglext-1.0 --cflags' )
- + if ( ret != 0 ):
- + print 'pkg-config gtkglext-1.0 failed'
- + assert( False )
- + baseflags += gtkgl.split( ' ' )
- + gtkgllibs = commands.getoutput( 'pkg-config gtkglext-1.0 --libs' )
- + env.Append( LINKFLAGS = gtkgllibs.split( ' ' ) )
- +# if ( useJPEG ):
- +# env.Append( LIBS = 'jpeg' )
- +# if ( usePNG ):
- +# pnglibs = 'png z'
- +# env.Append( LIBS = pnglibs.split( ' ' ) )
- + if ( useZ ):
- + env.Append( LIBS = 'z' )
- env.Append( CCFLAGS = baseflags )
- env.Append( CXXFLAGS = baseflags + [ '-fpermissive', '-fvisibility-inlines-hidden' ] )
- @@ -246,19 +271,19 @@
- # this lets us catch libjpg and libpng libraries that we put in the same directory as radiant.bin
- env.Append( LINKFLAGS = '-Wl,-rpath,.' )
- - def CheckoutOrUpdate( self, svnurl, path ):
- - if ( os.path.exists( path ) ):
- - cmd = [ 'svn', 'update', path ]
- - else:
- - cmd = [ 'svn', 'checkout', svnurl, path ]
- - print( repr( cmd ) )
- - subprocess.check_call( cmd )
- -
- -
- - def FetchGamePaks( self, path ):
- - for pak in self.setup_packs:
- - svnurl = 'svn://svn.icculus.org/gtkradiant-gamepacks/%s/trunk' % pak
- - self.CheckoutOrUpdate( svnurl, os.path.join( path, 'installs', pak ) )
- +# def CheckoutOrUpdate( self, svnurl, path ):
- +# if ( os.path.exists( path ) ):
- +# cmd = [ 'svn', 'update', path ]
- +# else:
- +# cmd = [ 'svn', 'checkout', svnurl, path ]
- +# print( repr( cmd ) )
- +# subprocess.check_call( cmd )
- +#
- +#
- +# def FetchGamePaks( self, path ):
- +# for pak in self.setup_packs:
- +# svnurl = 'svn://svn.icculus.org/gtkradiant-gamepacks/%s/trunk' % pak
- +# self.CheckoutOrUpdate( svnurl, os.path.join( path, 'installs', pak ) )
- def CopyTree( self, src, dst):
- for root, dirs, files in os.walk( src ):
- @@ -277,7 +302,9 @@
- pass
- else:
- # special case, fetch external paks under the local install directory
- - self.FetchGamePaks( self.install_directory )
- +# self.FetchGamePaks( self.install_directory )
- +#fedora "patch" to avoid download the whole archive every rpmbuild
- + pass
- # NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them
- if ( self.platform == 'Windows' ):
- backup_cwd = os.getcwd()
- @@ -285,7 +312,7 @@
- 'gtk+-bundle-2.16.6-20100912-3-win32.zip',
- 'gtkglext-1.2.0-3-win32.zip',
- 'libxml2-2.7.3-2-win32.zip',
- - 'jpeg-8c-4-win32.zip',
- +# 'jpeg-8c-4-win32.zip',
- 'STLport-5.2.1-4.zip'
- ]:
- if ( not os.path.exists( lib_archive ) ):
- @@ -335,7 +362,7 @@
- 'gtk-2.16.6/bin/libpangocairo-1.0-0.dll',
- 'gtk-2.16.6/bin/libpangoft2-1.0-0.dll',
- 'gtk-2.16.6/bin/libpangowin32-1.0-0.dll',
- - 'gtk-2.16.6/bin/libpng14-14.dll',
- +# 'gtk-2.16.6/bin/libpng14-14.dll',
- 'gtk-2.16.6/bin/zlib1.dll',
- 'gtk-2.16.6/lib/GNU.Gettext.dll',
- 'gtk-2.16.6/lib/gtk-2.0/2.10.0/engines/libpixmap.dll',
- @@ -368,13 +395,13 @@
- match = filter( lambda l : l.find( libname ) != -1, output.split( '\n' ) )[0]
- return re.split( '.*=> (.*) .*', match )[1]
- - jpeg_path = find_library( module_ldd, 'libjpeg' )
- - print( 'JPEG library: %s' % repr( jpeg_path ) )
- - png_path = find_library( module_ldd, 'libpng' )
- - print( 'PNG library: %s' % repr( png_path ) )
- +# jpeg_path = find_library( module_ldd, 'libjpeg' )
- +# print( 'JPEG library: %s' % repr( jpeg_path ) )
- +# png_path = find_library( module_ldd, 'libpng' )
- +# print( 'PNG library: %s' % repr( png_path ) )
- - shutil.copy( jpeg_path, 'install' )
- - shutil.copy( png_path, 'install' )
- +# shutil.copy( jpeg_path, 'install' )
- +# shutil.copy( png_path, 'install' )
- # parse the config statement line to produce/update an existing config list
- # the configs expose a list of keywords and accepted values, which the engine parses out
- Sottodirectory in comune: ../Gtkradiant.orig/contrib e ./contrib
- Sottodirectory in comune: ../Gtkradiant.orig/docs e ./docs
- Sottodirectory in comune: ../Gtkradiant.orig/include e ./include
- Sottodirectory in comune: ../Gtkradiant.orig/install e ./install
- Sottodirectory in comune: ../Gtkradiant.orig/libs e ./libs
- Sottodirectory in comune: ../Gtkradiant.orig/plugins e ./plugins
- Sottodirectory in comune: ../Gtkradiant.orig/po e ./po
- Sottodirectory in comune: ../Gtkradiant.orig/radiant e ./radiant
- Sottodirectory in comune: ../Gtkradiant.orig/regression_tests e ./regression_tests
- diff -u ../Gtkradiant.orig/SConscript.module ./SConscript.module
- --- ../Gtkradiant.orig/SConscript.module 2013-03-30 15:24:40.000000000 +0100
- +++ ./SConscript.module 2013-04-01 17:00:03.520036341 +0200
- @@ -10,14 +10,15 @@
- ( libpath, libname ) = os.path.split( project )
- libname = os.path.splitext( libname )[0]
- -env = Environment( ENV = os.environ )
- +env = Environment()
- -useJPEG = True
- +#useJPEG = True
- useGtk = True
- useZ = True
- -usePNG = True
- +#usePNG = True
- -settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ, usePNG = usePNG )
- +#settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG, useZ = useZ, usePNG = usePNG )
- +settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useZ = useZ )
- proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
- # some filtering. may need to improve that
- Sottodirectory in comune: ../Gtkradiant.orig/tools e ./tools
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement