clone the bspc source

This commit is contained in:
Timothee Besset 2015-12-24 19:21:05 -06:00
parent f48ddaa0de
commit 3272dc1416

178
config.py
View file

@ -281,90 +281,102 @@ class Config:
self.FetchGamePaks( self.install_directory ) self.FetchGamePaks( self.install_directory )
# NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them # NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them
if ( self.platform == 'Windows' ): if ( self.platform == 'Windows' ):
backup_cwd = os.getcwd() # backup_cwd = os.getcwd()
for lib_archive in [ # for lib_archive in [
'gtk-bundle-2.24.10-GtkRadiant.zip', # 'gtk-bundle-2.24.10-GtkRadiant.zip',
'gtk-bundle-2.22.1-win64-GtkRadiant.zip', # 'gtk-bundle-2.22.1-win64-GtkRadiant.zip',
'jpeg-9-MSVC2014-GtkRadiant.zip', # 'jpeg-9-MSVC2014-GtkRadiant.zip',
'libxml2-2.9.2-GtkRadiant.zip', # 'libxml2-2.9.2-GtkRadiant.zip',
'gtkglext-1.2.0-3-win32.zip', # 'gtkglext-1.2.0-3-win32.zip',
]: # ]:
if ( not os.path.exists( lib_archive ) ): # if ( not os.path.exists( lib_archive ) ):
print( 'downloading %s' % lib_archive ) # print( 'downloading %s' % lib_archive )
archive_web_request = urllib2.urlopen( 'http://gtkradiant.s3-website-us-east-1.amazonaws.com/%s' % lib_archive ) # archive_web_request = urllib2.urlopen( 'http://gtkradiant.s3-website-us-east-1.amazonaws.com/%s' % lib_archive )
archive_File = open( lib_archive, 'wb' ) # archive_File = open( lib_archive, 'wb' )
while True: # while True:
data = archive_web_request.read( 1048576 ) # read 1mb at a time # data = archive_web_request.read( 1048576 ) # read 1mb at a time
if not data: # if not data:
break # break
archive_File.write( data ) # archive_File.write( data )
#
# archive_web_request.close()
# archive_File.close()
#
# print( 'unpacking %s' % lib_archive )
# lib_archive_path = os.path.abspath( lib_archive )
# os.chdir( os.path.dirname( backup_cwd ) )
#
# archive_Zip = zipfile.ZipFile( lib_archive_path, 'r' )
# archive_Zip.extractall()
# archive_Zip.close()
#
# os.chdir( backup_cwd )
#
# # copy all the dependent runtime data to the install directory
# srcdir = os.path.dirname( backup_cwd )
# for dll in [
# '%s/bin/freetype6.dll' % GTK_PREFIX,
# '%s/bin/intl.dll' % GTK_PREFIX,
# '%s/bin/libasprintf-0.dll' % GTK_PREFIX,
# '%s/bin/libatk-1.0-0.dll' % GTK_PREFIX,
# '%s/bin/libcairo-2.dll' % GTK_PREFIX,
# '%s/bin/libexpat-1.dll' % GTK_PREFIX,
# '%s/bin/libfontconfig-1.dll' % GTK_PREFIX,
# '%s/bin/libgailutil-18.dll' % GTK_PREFIX,
# '%s/bin/libgcc_s_dw2-1.dll' % GTK_PREFIX,
# '%s/bin/libgdk-win32-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libgdk_pixbuf-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libgio-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libglib-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libgmodule-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libgobject-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libgthread-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libgtk-win32-2.0-0.dll' % GTK_PREFIX,
# '%s/bin/libpango-1.0-0.dll' % GTK_PREFIX,
# '%s/bin/libpangocairo-1.0-0.dll' % GTK_PREFIX,
# '%s/bin/libpangoft2-1.0-0.dll' % GTK_PREFIX,
# '%s/bin/libpangowin32-1.0-0.dll' % GTK_PREFIX,
# '%s/bin/libpng14-14.dll' % GTK_PREFIX,
# '%s/bin/zlib1.dll' % GTK_PREFIX,
# '%s/lib/GNU.Gettext.dll' % GTK_PREFIX,
# '%s/lib/gtk-2.0/2.10.0/engines/libpixmap.dll' % GTK_PREFIX,
# '%s/lib/gtk-2.0/2.10.0/engines/libwimp.dll' % GTK_PREFIX,
# '%s/lib/gtk-2.0/modules/libgail.dll' % GTK_PREFIX,
# 'gtkglext-1.2.0/bin/libgdkglext-win32-1.0-0.dll',
# 'gtkglext-1.2.0/bin/libgtkglext-win32-1.0-0.dll',
# ]:
# shutil.copy( os.path.join( srcdir, dll ), 'install' )
#
# for extra in [
# '%s/etc' % GTK_PREFIX,
# '%s/share' % GTK_PREFIX,
# 'gtkglext-1.2.0/share',
# ]:
# self.CopyTree( os.path.join( srcdir, extra ), 'install' )
#
# try:
# os.mkdir( 'install/x64' )
# except:
# pass # assume 'already exists'
# for x64_dll in [
# '%s/bin/libpng14-14.dll' % GTK64_PREFIX,
# '%s/bin/libglib-2.0-0.dll' % GTK64_PREFIX,
# '%s/bin/libintl-8.dll' % GTK64_PREFIX,
# '%s/bin/zlib1.dll' % GTK64_PREFIX,
# ]:
# shutil.copy( os.path.join( srcdir, x64_dll ), 'install/x64' )
#
self.CloneBSPC()
archive_web_request.close() def CloneBSPC( self ):
archive_File.close() if ( os.path.exists( 'bspc' ) ):
cmd = [ 'git', 'pull' ]
print( 'unpacking %s' % lib_archive ) print( repr( cmd ) )
lib_archive_path = os.path.abspath( lib_archive ) subprocess.check_call( cmd, cwd = 'bspc' )
os.chdir( os.path.dirname( backup_cwd ) ) else:
cmd = [ 'git', 'clone', 'https://github.com/TTimo/bspc.git' ]
archive_Zip = zipfile.ZipFile( lib_archive_path, 'r' ) print( repr( cmd ) )
archive_Zip.extractall() subprocess.check_call( cmd )
archive_Zip.close()
os.chdir( backup_cwd )
# copy all the dependent runtime data to the install directory
srcdir = os.path.dirname( backup_cwd )
for dll in [
'%s/bin/freetype6.dll' % GTK_PREFIX,
'%s/bin/intl.dll' % GTK_PREFIX,
'%s/bin/libasprintf-0.dll' % GTK_PREFIX,
'%s/bin/libatk-1.0-0.dll' % GTK_PREFIX,
'%s/bin/libcairo-2.dll' % GTK_PREFIX,
'%s/bin/libexpat-1.dll' % GTK_PREFIX,
'%s/bin/libfontconfig-1.dll' % GTK_PREFIX,
'%s/bin/libgailutil-18.dll' % GTK_PREFIX,
'%s/bin/libgcc_s_dw2-1.dll' % GTK_PREFIX,
'%s/bin/libgdk-win32-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libgdk_pixbuf-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libgio-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libglib-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libgmodule-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libgobject-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libgthread-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libgtk-win32-2.0-0.dll' % GTK_PREFIX,
'%s/bin/libpango-1.0-0.dll' % GTK_PREFIX,
'%s/bin/libpangocairo-1.0-0.dll' % GTK_PREFIX,
'%s/bin/libpangoft2-1.0-0.dll' % GTK_PREFIX,
'%s/bin/libpangowin32-1.0-0.dll' % GTK_PREFIX,
'%s/bin/libpng14-14.dll' % GTK_PREFIX,
'%s/bin/zlib1.dll' % GTK_PREFIX,
'%s/lib/GNU.Gettext.dll' % GTK_PREFIX,
'%s/lib/gtk-2.0/2.10.0/engines/libpixmap.dll' % GTK_PREFIX,
'%s/lib/gtk-2.0/2.10.0/engines/libwimp.dll' % GTK_PREFIX,
'%s/lib/gtk-2.0/modules/libgail.dll' % GTK_PREFIX,
'gtkglext-1.2.0/bin/libgdkglext-win32-1.0-0.dll',
'gtkglext-1.2.0/bin/libgtkglext-win32-1.0-0.dll',
]:
shutil.copy( os.path.join( srcdir, dll ), 'install' )
for extra in [
'%s/etc' % GTK_PREFIX,
'%s/share' % GTK_PREFIX,
'gtkglext-1.2.0/share',
]:
self.CopyTree( os.path.join( srcdir, extra ), 'install' )
try:
os.mkdir( 'install/x64' )
except:
pass # assume 'already exists'
for x64_dll in [
'%s/bin/libpng14-14.dll' % GTK64_PREFIX,
'%s/bin/libglib-2.0-0.dll' % GTK64_PREFIX,
'%s/bin/libintl-8.dll' % GTK64_PREFIX,
'%s/bin/zlib1.dll' % GTK64_PREFIX,
]:
shutil.copy( os.path.join( srcdir, x64_dll ), 'install/x64' )
def FinishBuild( self, target, source, env ): def FinishBuild( self, target, source, env ):
print( 'Lookup and bundle the PNG and JPEG libraries' ) print( 'Lookup and bundle the PNG and JPEG libraries' )