Merge remote-tracking branch 'origin/3.5'

This commit is contained in:
Eike Ziller
2015-07-10 14:08:29 +02:00
84 changed files with 2748 additions and 4709 deletions
+24 -9
View File
@@ -191,7 +191,9 @@ def copy_qt_libs(install_dir, qt_libs_dir, qt_plugin_dir, qt_import_dir, qt_qml_
target = os.path.join(install_dir, 'bin', 'imports', qtimport)
if (os.path.exists(target)):
shutil.rmtree(target)
shutil.copytree(os.path.join(qt_import_dir, qtimport), target, ignore=copy_ignore_func, symlinks=True)
import_path = os.path.join(qt_import_dir, qtimport)
if os.path.exists(import_path):
shutil.copytree(import_path, target, ignore=copy_ignore_func, symlinks=True)
if (os.path.exists(qt_qml_dir)):
print "Copying qt quick 2 imports"
@@ -230,20 +232,33 @@ def copyPreservingLinks(source, destination):
shutil.copy(source, destination)
def copy_libclang(install_dir, llvm_install_dir):
libsources = []
libtarget = ""
# contains pairs of (source, target directory)
deployinfo = []
if sys.platform.startswith("win"):
libsources = [os.path.join(llvm_install_dir, 'bin', 'libclang.dll')]
libtarget = os.path.join(install_dir, 'bin')
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'libclang.dll'),
os.path.join(install_dir, 'bin')))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clang-cl.exe'),
os.path.join(install_dir, 'bin')))
else:
libsources = glob(os.path.join(llvm_install_dir, 'lib', 'libclang.so*'))
libtarget = os.path.join(install_dir, 'lib', 'qtcreator')
for libsource in libsources:
deployinfo.append((libsource, os.path.join(install_dir, 'lib', 'qtcreator')))
clangbinary = os.path.join(llvm_install_dir, 'bin', 'clang')
clangbinary_targetdir = os.path.join(install_dir, 'bin')
deployinfo.append((clangbinary, clangbinary_targetdir))
# copy link target if clang is actually a symlink
if os.path.islink(clangbinary):
linktarget = os.readlink(clangbinary)
deployinfo.append((os.path.join(os.path.dirname(clangbinary), linktarget),
os.path.join(clangbinary_targetdir, linktarget)))
resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
resourcetarget = os.path.join(install_dir, 'share', 'qtcreator', 'cplusplus', 'clang')
print "copying libclang..."
for libsource in libsources:
print libsource, '->', libtarget
copyPreservingLinks(libsource, libtarget)
for source, target in deployinfo:
print source, '->', target
copyPreservingLinks(source, target)
print resourcesource, '->', resourcetarget
if (os.path.exists(resourcetarget)):
shutil.rmtree(resourcetarget)
+6
View File
@@ -61,6 +61,12 @@ if [ $LLVM_INSTALL_DIR ]; then
# use recursive copy to make it copy symlinks as symlinks
cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang.*dylib "$1/Contents/Frameworks/" || exit 1
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$1/Contents/Resources/cplusplus/" || exit 1
clangsource="$LLVM_INSTALL_DIR"/bin/clang
clanglinktarget="$(readlink "$clangsource")"
cp -Rf "$clangsource" "$1/Contents/Resources/" || exit 1
if [ $clanglinktarget ]; then
cp -Rf "$(dirname "$clangsource")/$clanglinktarget" "$1/Contents/Resources/$clanglinktarget" || exit 1
fi
fi
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/libClangCodeModel_debug.dylib"
if [ ! -f "$_CLANG_CODEMODEL_LIB" ]; then
-100
View File
@@ -1,100 +0,0 @@
#!/bin/bash
################################################################################
# Copyright (C) 2015 The Qt Company Ltd
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of The Qt Company Ltd, nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
################################################################################
if [ $# -lt 1 ]; then
echo "Usage: $(basename $1) <creator_install_dir> [qmake_path]"
exit 1
fi
INSTALL_DIR="$1"
QMAKE_BIN="${2:-$(which qmake)}"
if [ ! -e "$QMAKE_BIN" ]; then
echo "Could not detetermine location of 'qmake'!"
exit 1;
fi
CHRPATH=$(which chrpath)
if [ ! -e "$CHRPATH" ]; then
echo "Cannot find required binary 'chrpath'."
exit 1
fi
QT_INSTALL_LIBS="$($QMAKE_BIN -query QT_INSTALL_LIBS)"
QT_INSTALL_PLUGINS="$($QMAKE_BIN -query QT_INSTALL_PLUGINS)"
QT_INSTALL_IMPORTS="$($QMAKE_BIN -query QT_INSTALL_IMPORTS)"
QT_INSTALL_TRANSLATIONS="$($QMAKE_BIN -query QT_INSTALL_TRANSLATIONS)"
plugins="accessible designer iconengines imageformats sqldrivers"
imports="Qt QtWebKit"
tr_catalogs="assistant designer qt qt_help"
tr_languages="$(cd $INSTALL_DIR/share/qtcreator/translations; echo qtcreator_* | sed -e 's,[^_]*_\([^.]*\)\.,\1 ,g')"
function fix_rpaths()
{
pushd $INSTALL_DIR/lib
find qtcreator/ -maxdepth 1 -name "*.so*" -type f -exec $CHRPATH -r \$ORIGIN {} \;
cd $INSTALL_DIR/lib/qtcreator
find plugins/ -maxdepth 2 -name "*.so" -type f -exec $CHRPATH -r \$ORIGIN/../.. {} \;
cd $INSTALL_DIR/bin
# all executable files in bin
find -maxdepth 1 -type f -executable -exec $CHRPATH -r \$ORIGIN/../lib/qtcreator {} \;
# all lib of imports and plugins one level underneath bin
find -mindepth 2 -maxdepth 2 -type f -name "*.so" -exec $CHRPATH -r \$ORIGIN/../../lib/qtcreator {} \;
find -mindepth 3 -maxdepth 3 -type f -name "*.so" -exec $CHRPATH -r \$ORIGIN/../../../lib/qtcreator {} \;
find -mindepth 4 -maxdepth 4 -type f -name "*.so" -exec $CHRPATH -r \$ORIGIN/../../../../lib/qtcreator {} \;
}
function copy_binaries()
{
cp -a $QT_INSTALL_LIBS/*.so* $INSTALL_DIR/lib/qtcreator
for plugin in $plugins; do
cp -a $QT_INSTALL_PLUGINS/$plugin $INSTALL_DIR/bin
done
for import in $imports; do
cp -a $QT_INSTALL_IMPORTS/$import $INSTALL_DIR/bin
done
}
function copy_translations()
{
for language in $tr_languages; do
for catalog in $tr_catalogs; do
cp -a $QT_INSTALL_TRANSLATIONS/${catalog}_${language}.qm $INSTALL_DIR/share/qtcreator/translations
done
done
}
copy_binaries
copy_translations
fix_rpaths