[pygccxml-commit] SF.net SVN: pygccxml: [816] graphical_installer
Brought to you by:
mbaas,
roman_yakovenko
|
From: <rom...@us...> - 2006-12-27 14:39:59
|
Revision: 816
http://svn.sourceforge.net/pygccxml/?rev=816&view=rev
Author: roman_yakovenko
Date: 2006-12-27 06:39:59 -0800 (Wed, 27 Dec 2006)
Log Message:
-----------
Modified Paths:
--------------
graphical_installer/environment.py
graphical_installer/setup.py
Modified: graphical_installer/environment.py
===================================================================
--- graphical_installer/environment.py 2006-12-27 11:37:52 UTC (rev 815)
+++ graphical_installer/environment.py 2006-12-27 14:39:59 UTC (rev 816)
@@ -23,11 +23,10 @@
compiler="msvc71"
generator = 'NMake Makefiles'
native_build = '"%s" /A all' % cc.find_exe( 'nmake.exe' )
+ else:
+ raise NotImplementedError("The support for your environment was not implemented. Consider to contribute!" )
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:37:52 UTC (rev 815)
+++ graphical_installer/setup.py 2006-12-27 14:39:59 UTC (rev 816)
@@ -1,6 +1,8 @@
#step 1 - extract cmake
import os
+import re
import sys
+import shutil
import tarfile
from environment import config
@@ -35,6 +37,9 @@
if not os.path.exists( build_dir ):
os.makedirs( build_dir )
+ if os.path.exists( config.gccxml_install_dir ):
+ shutil.rmtree( config.gccxml_install_dir )
+
os.chdir( build_dir )
cmake = os.path.join(
config.destination_dir
@@ -52,12 +57,26 @@
execute( config.cmake.native_build )
if 'win32' == sys.platform:
- pass
+ #On windows GCC_XML does not support installation, so this setup will
+ #do it.
+ gccxml_config_file = os.path.join( build_dir, 'bin', 'gccxml_config' )
+ gccxml_config = file( gccxml_config_file ).read()
+ gccxml_config = gccxml_config.replace( 'GCCXML_COMPILER="cl"'
+ , 'GCCXML_COMPILER="%s"' % config.cmake.compiler )
+
+ gccxml_root_re = re.compile( r'GCCXML_ROOT=\".*?\"' )
+ found = gccxml_root_re.search( gccxml_config )
+ gccxml_new_root = 'GCCXML_ROOT="%s"' % config.gccxml_install_dir
+ gccxml_new_root = gccxml_new_root.replace( '\\', '/' )
+ gccxml_config = gccxml_config[:found.start()] + gccxml_new_root + gccxml_config[found.end():]
+ tmp = file( gccxml_config_file, 'w+' )
+ tmp.write( gccxml_config )
+ tmp.close()
+
+ shutil.copytree( os.path.join( build_dir, 'bin' ), config.gccxml_install_dir )
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.
|