mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
revert old commit. keep svn working directories in install/
This commit is contained in:
parent
666847b0ce
commit
8752425ca7
2 changed files with 11 additions and 33 deletions
|
@ -50,6 +50,7 @@ all: install bundle
|
||||||
|
|
||||||
install: -pre-install -gtk-runtime
|
install: -pre-install -gtk-runtime
|
||||||
cp -r $(INSTALL) $(RESOURCES)
|
cp -r $(INSTALL) $(RESOURCES)
|
||||||
|
rm -rf `find $(INSTDIR)/installs -type d -name .svn`
|
||||||
|
|
||||||
bundle:
|
bundle:
|
||||||
|
|
||||||
|
|
43
config.py
43
config.py
|
@ -22,7 +22,6 @@ class Config:
|
||||||
self.platform = platform.system()
|
self.platform = platform.system()
|
||||||
self.cc = 'gcc'
|
self.cc = 'gcc'
|
||||||
self.cxx = 'g++'
|
self.cxx = 'g++'
|
||||||
self.packs_directory = 'packs'
|
|
||||||
self.install_directory = 'install'
|
self.install_directory = 'install'
|
||||||
|
|
||||||
# platforms for which to assemble a setup
|
# platforms for which to assemble a setup
|
||||||
|
@ -45,9 +44,6 @@ class Config:
|
||||||
def _processCXX( self, ops ):
|
def _processCXX( self, ops ):
|
||||||
self.cxx = ops
|
self.cxx = ops
|
||||||
|
|
||||||
def _processPacksDir(self, ops ):
|
|
||||||
self.packs_directory = os.path.normpath( os.path.expanduser( ops[0] ) )
|
|
||||||
|
|
||||||
def _processInstallDir( self, ops ):
|
def _processInstallDir( self, ops ):
|
||||||
self.install_directory = os.path.normpath( os.path.expanduser( ops[0] ) )
|
self.install_directory = os.path.normpath( os.path.expanduser( ops[0] ) )
|
||||||
|
|
||||||
|
@ -62,7 +58,6 @@ class Config:
|
||||||
operators['config'] = self._processConfig
|
operators['config'] = self._processConfig
|
||||||
operators['cc'] = self._processCC
|
operators['cc'] = self._processCC
|
||||||
operators['cxx'] = self._processCXX
|
operators['cxx'] = self._processCXX
|
||||||
operators['packs_directory'] = self._processPacksDir
|
|
||||||
operators['install_directory'] = self._processInstallDir
|
operators['install_directory'] = self._processInstallDir
|
||||||
operators['setup_platforms'] = self._processSetupPlatforms
|
operators['setup_platforms'] = self._processSetupPlatforms
|
||||||
operators['setup_packs'] = self._processSetupPacks
|
operators['setup_packs'] = self._processSetupPacks
|
||||||
|
@ -253,36 +248,18 @@ class Config:
|
||||||
if ( self.platform == 'Darwin' ) :
|
if ( self.platform == 'Darwin' ) :
|
||||||
env.Append( LINKFLAGS = [ '-headerpad_max_install_names' ] )
|
env.Append( LINKFLAGS = [ '-headerpad_max_install_names' ] )
|
||||||
|
|
||||||
def SvnCheckoutOrUpdate( self, svn_url, working_copy ):
|
def CheckoutOrUpdate( self, svnurl, path ):
|
||||||
if ( os.path.exists( working_copy ) ):
|
if ( os.path.exists( path ) ):
|
||||||
cmd = [ 'svn', 'update', working_copy ]
|
cmd = [ 'svn', 'update', path ]
|
||||||
else:
|
else:
|
||||||
cmd = [ 'svn', 'checkout', svn_url, working_copy ]
|
cmd = [ 'svn', 'checkout', svnurl, path ]
|
||||||
print( repr( cmd ) )
|
print( repr( cmd ) )
|
||||||
subprocess.check_call( cmd )
|
subprocess.check_call( cmd )
|
||||||
|
|
||||||
def SvnExport( self, working_copy, dest ):
|
def FetchGamePaks( self, path ):
|
||||||
cmd = [ 'svn', 'export', '--force', working_copy, dest ]
|
for pak in self.setup_packs:
|
||||||
print( repr( cmd ) )
|
svnurl = 'svn://svn.icculus.org/gtkradiant-gamepacks/%s/trunk' % pak
|
||||||
|
self.CheckoutOrUpdate( svnurl, os.path.join( path, 'installs', pak ) )
|
||||||
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 CopyTree( self, src, dst):
|
def CopyTree( self, src, dst):
|
||||||
for root, dirs, files in os.walk( src ):
|
for root, dirs, files in os.walk( src ):
|
||||||
|
@ -300,8 +277,8 @@ class Config:
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# Fetch remote game packs and install them
|
# special case, fetch external paks under the local install directory
|
||||||
self.FetchGamePacks( self.packs_directory, os.path.join( self.install_directory, 'installs' ) )
|
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()
|
||||||
|
|
Loading…
Reference in a new issue