revert old commit. keep svn working directories in install/

This commit is contained in:
Timothee Besset 2013-08-24 17:58:08 -05:00
parent 666847b0ce
commit 8752425ca7
2 changed files with 11 additions and 33 deletions

View file

@ -50,6 +50,7 @@ all: install bundle
install: -pre-install -gtk-runtime
cp -r $(INSTALL) $(RESOURCES)
rm -rf `find $(INSTDIR)/installs -type d -name .svn`
bundle:

View file

@ -22,7 +22,6 @@ class Config:
self.platform = platform.system()
self.cc = 'gcc'
self.cxx = 'g++'
self.packs_directory = 'packs'
self.install_directory = 'install'
# platforms for which to assemble a setup
@ -45,9 +44,6 @@ class Config:
def _processCXX( self, ops ):
self.cxx = ops
def _processPacksDir(self, ops ):
self.packs_directory = os.path.normpath( os.path.expanduser( ops[0] ) )
def _processInstallDir( self, ops ):
self.install_directory = os.path.normpath( os.path.expanduser( ops[0] ) )
@ -62,7 +58,6 @@ class Config:
operators['config'] = self._processConfig
operators['cc'] = self._processCC
operators['cxx'] = self._processCXX
operators['packs_directory'] = self._processPacksDir
operators['install_directory'] = self._processInstallDir
operators['setup_platforms'] = self._processSetupPlatforms
operators['setup_packs'] = self._processSetupPacks
@ -253,36 +248,18 @@ class Config:
if ( self.platform == 'Darwin' ) :
env.Append( LINKFLAGS = [ '-headerpad_max_install_names' ] )
def SvnCheckoutOrUpdate( self, svn_url, working_copy ):
if ( os.path.exists( working_copy ) ):
cmd = [ 'svn', 'update', working_copy ]
def CheckoutOrUpdate( self, svnurl, path ):
if ( os.path.exists( path ) ):
cmd = [ 'svn', 'update', path ]
else:
cmd = [ 'svn', 'checkout', svn_url, working_copy ]
cmd = [ 'svn', 'checkout', svnurl, path ]
print( repr( cmd ) )
subprocess.check_call( cmd )
def SvnExport( self, working_copy, dest ):
cmd = [ 'svn', 'export', '--force', working_copy, dest ]
print( repr( cmd ) )
subprocess.check_call( cmd )
def FetchGamePacks( self, packs_dir, install_dir ):
if ( not os.path.exists( packs_dir ) ):
os.mkdir( packs_dir )
if ( not os.path.exists( install_dir ) ):
os.mkdir( install_dir )
for pack in self.setup_packs:
svn_url = 'svn://svn.icculus.org/gtkradiant-gamepacks/%s/trunk' % pack
working_copy = os.path.join( packs_dir, pack)
self.SvnCheckoutOrUpdate( svn_url, working_copy )
dest_dir = os.path.join( install_dir, pack)
self.SvnExport( working_copy, dest_dir )
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 ):
@ -300,8 +277,8 @@ class Config:
except:
pass
else:
# Fetch remote game packs and install them
self.FetchGamePacks( self.packs_directory, os.path.join( self.install_directory, 'installs' ) )
# special case, fetch external paks under the local install directory
self.FetchGamePaks( self.install_directory )
# NOTE: unrelated to self.setup_platforms - grab support files and binaries and install them
if ( self.platform == 'Windows' ):
backup_cwd = os.getcwd()