diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-06-23 13:29:31 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-06-23 12:23:21 +0000 |
commit | 43e93009a3fa3126cdf5c73be32d935d30a6cdd2 (patch) | |
tree | 27c15a39950eaa4097892a66beaa3f3150898712 /scripts | |
parent | 1c119185d068018b3d383f4f00f693299ba6313e (diff) | |
download | qt-creator-43e93009a3fa3126cdf5c73be32d935d30a6cdd2.tar.gz |
Linux: Fix deployment of libclang
We need the versioned name of the library now,
so copy all libclang.so* while keeping symlinks as symlinks.
Change-Id: Ia2cc5e82be0848a3c9b0cb3055e150e6b1a151c9
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/deployqt.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/deployqt.py b/scripts/deployqt.py index da122efc34..f7bf539f2f 100755 --- a/scripts/deployqt.py +++ b/scripts/deployqt.py @@ -216,20 +216,31 @@ def copy_translations(install_dir, qt_tr_dir): print translation, '->', tr_dir shutil.copy(translation, tr_dir) +def copyPreservingLinks(source, destination): + if os.path.islink(source): + linkto = os.readlink(source) + destFilePath = destination + if os.path.isdir(destination): + destFilePath = os.path.join(destination, os.path.basename(source)) + os.symlink(linkto, destFilePath) + else: + shutil.copy(source, destination) + def copy_libclang(install_dir, llvm_install_dir): - libsource = "" + libsources = [] libtarget = "" if sys.platform.startswith("win"): - libsource = os.path.join(llvm_install_dir, 'bin', 'libclang.dll') + libsources = [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') + libsources = glob(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) + for libsource in libsources: + print libsource, '->', libtarget + copyPreservingLinks(libsource, libtarget) print resourcesource, '->', resourcetarget if (os.path.exists(resourcetarget)): shutil.rmtree(resourcetarget) |