aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-02-11 13:39:13 +0100
committerEike Ziller <eike.ziller@digia.com>2014-02-11 13:50:14 +0100
commit256bb4830013378f269e59171a4b1c89a6b28de6 (patch)
tree01aa6319ac9c5115cf7a987a0791081366b96b95 /scripts
parent428b95f62efbc01c86a1f144ebf08d1f85027fa6 (diff)
Lin/Win: Deploy libclang and resources if needed
Change-Id: I4393a3e955e3810eea79221233c82c80a9de119e Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deployqt.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/deployqt.py b/scripts/deployqt.py
index 4e83dfb2eb..dabc4aec52 100755
--- a/scripts/deployqt.py
+++ b/scripts/deployqt.py
@@ -215,6 +215,25 @@ def copy_translations(install_dir, qt_tr_dir):
print translation, '->', tr_dir
shutil.copy(translation, tr_dir)
+def copy_libclang(install_dir, llvm_install_dir):
+ libsource = ""
+ libtarget = ""
+ if sys.platform.startswith("win"):
+ libsource = os.path.join(llvm_install_dir, 'bin', 'libclang.dll')
+ libtarget = os.path.join(install_dir, 'bin')
+ else:
+ libsource = os.path.join(llvm_install_dir, 'lib', 'libclang.so')
+ libtarget = os.path.join(install_dir, 'lib', 'qtcreator')
+ resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
+ resourcetarget = os.path.join(install_dir, 'share', 'qtcreator', 'cplusplus', 'clang')
+ print "copying libclang..."
+ print libsource, '->', libtarget
+ shutil.copy(libsource, libtarget)
+ print resourcesource, '->', resourcetarget
+ if (os.path.exists(resourcetarget)):
+ shutil.rmtree(resourcetarget)
+ shutil.copytree(resourcesource, resourcetarget, symlinks=True)
+
def readQmakeVar(qmake_bin, var):
pipe = os.popen(' '.join([qmake_bin, '-query', var]))
return pipe.read().rstrip('\n')
@@ -274,6 +293,8 @@ def main():
else:
copy_qt_libs(install_dir, QT_INSTALL_LIBS, QT_INSTALL_PLUGINS, QT_INSTALL_IMPORTS, QT_INSTALL_QML, plugins, imports)
copy_translations(install_dir, QT_INSTALL_TRANSLATIONS)
+ if os.environ["LLVM_INSTALL_DIR"]:
+ copy_libclang(install_dir, os.environ["LLVM_INSTALL_DIR"])
if not sys.platform.startswith('win'):
fix_rpaths(chrpath_bin, install_dir)