[pygccxml-commit] SF.net SVN: pygccxml: [813] graphical_installer
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-12-25 15:47:15
|
Revision: 813 http://svn.sourceforge.net/pygccxml/?rev=813&view=rev Author: roman_yakovenko Date: 2006-12-25 07:47:10 -0800 (Mon, 25 Dec 2006) Log Message: ----------- initial commit Added Paths: ----------- graphical_installer/ graphical_installer/setup.py Property changes on: graphical_installer ___________________________________________________________________ Name: svn:ignore + *.tar Added: graphical_installer/setup.py =================================================================== --- graphical_installer/setup.py (rev 0) +++ graphical_installer/setup.py 2006-12-25 15:47:10 UTC (rev 813) @@ -0,0 +1,53 @@ +#step 1 - extract cmake +import os +import tarfile + +class config: + class archives: + cmake = 'cmake-2.4.5-win32-x86.tar' + gccxml = 'gccxml-cvs-25-dec-2006.tar' + all = [ gccxml, cmake ] + + destination_dir = r'd:\dev\setup' + gccxml_install_dir = r'd:\dev\gccxml' + +def execute( command, *args, **keywd): + cmd_line = [ command ] + for key, value in keywd.items(): + cmd_line.append( '--%s=%s' % ( key, value ) ) + cmd_line.extend( args ) + cmd = ' '.join( cmd_line ) + print os.linesep, 'cmd: ', cmd + input, output = os.popen4( cmd ) + input.close() + reports = [] + while True: + data = output.readline() + print data, + if not data: + break + exit_status = output.close() + if None is exit_status: + return 0 + return exit_status + +def build_gccxml(): + gccxml_src_dir = os.path.join( config.destination_dir + , os.path.splitext( config.archives.gccxml )[0] ) + build_dir = gccxml_src_dir + '-build' + + if not os.path.exists( build_dir ): + os.makedirs( build_dir ) + os.chdir( build_dir ) + cmake = os.path.join( + config.destination_dir + , os.path.splitext( config.archives.cmake )[0] + , 'bin' + , 'cmake' ) + execute( cmake, '-DCMAKE_INSTALL_PREFIX:PATH=' + config.gccxml_install_dir, gccxml_src_dir ) + +if __name__ == "__main__": + #decompressing all archives + for arch in config.archives.all: + tarfile.TarFile( arch, "r" ).extractall( config.destination_dir ) + build_gccxml() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |