[pygccxml-commit] SF.net SVN: pygccxml: [815] graphical_installer
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2006-12-27 11:37:52
|
Revision: 815 http://svn.sourceforge.net/pygccxml/?rev=815&view=rev Author: roman_yakovenko Date: 2006-12-27 03:37:52 -0800 (Wed, 27 Dec 2006) Log Message: ----------- Modified Paths: -------------- graphical_installer/setup.py Added Paths: ----------- graphical_installer/environment.py Added: graphical_installer/environment.py =================================================================== --- graphical_installer/environment.py (rev 0) +++ graphical_installer/environment.py 2006-12-27 11:37:52 UTC (rev 815) @@ -0,0 +1,33 @@ +import os +import sys + +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' + + class cmake: + compiler = None + generator = None + native_build = None + + if 'win32' == sys.platform: + from distutils import msvccompiler + if 7.1 == msvccompiler.get_build_version(): + cc = msvccompiler.MSVCCompiler() + cc.initialize() + compiler="msvc71" + generator = 'NMake Makefiles' + native_build = '"%s" /A all' % cc.find_exe( 'nmake.exe' ) + else: #linux + compiler="msvc71" + generator = 'Unix Makefiles' + native_build = 'make' + + +#%comspec% /k + Modified: graphical_installer/setup.py =================================================================== --- graphical_installer/setup.py 2006-12-27 11:36:14 UTC (rev 814) +++ graphical_installer/setup.py 2006-12-27 11:37:52 UTC (rev 815) @@ -1,16 +1,10 @@ #step 1 - extract cmake import os +import sys import tarfile -class config: - class archives: - cmake = 'cmake-2.4.5-win32-x86.tar' - gccxml = 'gccxml-cvs-25-dec-2006.tar' - all = [ gccxml, cmake ] +from environment import config - 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(): @@ -29,6 +23,9 @@ exit_status = output.close() if None is exit_status: return 0 + else: + print + print 'exit status: ', exit_status return exit_status def build_gccxml(): @@ -44,8 +41,23 @@ , os.path.splitext( config.archives.cmake )[0] , 'bin' , 'cmake' ) - execute( cmake, '-DCMAKE_INSTALL_PREFIX:PATH=' + config.gccxml_install_dir, gccxml_src_dir ) + execute( cmake + , '-DCMAKE_INSTALL_PREFIX:PATH=' + config.gccxml_install_dir + , '-DCMAKE_BUILD_TYPE=release' + , '-G "%s"' % config.cmake.generator + , gccxml_src_dir ) + + os.chdir( os.path.join( build_dir, 'GCC_XML' ) ) + + execute( config.cmake.native_build ) + if 'win32' == sys.platform: + pass + else: + execute( config.cmake.native_build, '-DCMAKE_BUILD_TYPE=release', 'install' ) + + + if __name__ == "__main__": #decompressing all archives for arch in config.archives.all: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |