macOS: Fix execution of helper executables with UI

The qt.conf that is written into the Resources/ folder
is used for the main Qt Creator executable, so that cannot
be used for the helper executables.

Move the executables one more level down and add a separate qt.conf
for them.

Fixes: QTCREATORBUG-23120
Change-Id: Icd8842d246a1bc0e8d44656e2bc580d6698afbda
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Eike Ziller
2019-10-28 16:06:00 +01:00
parent 5634f112bd
commit 4843216192
7 changed files with 45 additions and 32 deletions
+31 -24
View File
@@ -30,6 +30,7 @@
app_path="$1"
resource_path="$app_path/Contents/Resources"
libexec_path="$app_path/Contents/Resources/libexec"
bin_src="$2"
translation_src="$3"
plugin_src="$4"
@@ -95,16 +96,22 @@ if [ ! -f "$resource_path/qt.conf" ]; then
cp -f "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/qt.conf" "$resource_path/qt.conf" || exit 1
fi
# copy libexec tools' qt.conf
if [ ! -f "$libexec_path/qt.conf" ]; then
echo "- Copying libexec/qt.conf"
cp -f "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/libexec_qt.conf" "$libexec_path/qt.conf" || exit 1
fi
# copy ios tools' qt.conf
if [ ! -f "$resource_path/ios/qt.conf" ]; then
echo "- Copying ios/qt.conf"
cp -f "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/ios_qt.conf" "$resource_path/ios/qt.conf" || exit 1
if [ ! -f "$libexec_path/ios/qt.conf" ]; then
echo "- Copying libexec/ios/qt.conf"
cp -f "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/ios_qt.conf" "$libexec_path/ios/qt.conf" || exit 1
fi
# copy qml2puppet's qt.conf
if [ ! -f "$resource_path/qmldesigner/qt.conf" ]; then
echo "- Copying qmldesigner/qt.conf"
cp -f "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/qmldesigner_qt.conf" "$resource_path/qmldesigner/qt.conf" || exit 1
if [ ! -f "$libexec_path/qmldesigner/qt.conf" ]; then
echo "- Copying libexec/qmldesigner/qt.conf"
cp -f "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/qmldesigner_qt.conf" "$libexec_path/qmldesigner/qt.conf" || exit 1
fi
# copy Qt translations
@@ -120,33 +127,33 @@ if [ $LLVM_INSTALL_DIR ]; then
echo "- Copying libclang"
mkdir -p "$app_path/Contents/Frameworks" || exit 1
# use recursive copy to make it copy symlinks as symlinks
mkdir -p "$resource_path/clang/bin"
mkdir -p "$resource_path/clang/lib"
mkdir -p "$libexec_path/clang/bin"
mkdir -p "$libexec_path/clang/lib"
cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang.*dylib "$app_path/Contents/Frameworks/" || exit 1
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$resource_path/clang/lib/" || exit 1
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$libexec_path/clang/lib/" || exit 1
clangsource="$LLVM_INSTALL_DIR"/bin/clang
clanglinktarget="$(readlink "$clangsource")"
cp -Rf "$clangsource" "$resource_path/clang/bin/" || exit 1
cp -Rf "$clangsource" "$libexec_path/clang/bin/" || exit 1
if [ $clanglinktarget ]; then
cp -Rf "$(dirname "$clangsource")/$clanglinktarget" "$resource_path/clang/bin/$clanglinktarget" || exit 1
cp -Rf "$(dirname "$clangsource")/$clanglinktarget" "$libexec_path/clang/bin/$clanglinktarget" || exit 1
fi
clangdsource="$LLVM_INSTALL_DIR"/bin/clangd
cp -Rf "$clangdsource" "$resource_path/clang/bin/" || exit 1
cp -Rf "$clangdsource" "$libexec_path/clang/bin/" || exit 1
clangtidysource="$LLVM_INSTALL_DIR"/bin/clang-tidy
cp -Rf "$clangtidysource" "$resource_path/clang/bin/" || exit 1
cp -Rf "$clangtidysource" "$libexec_path/clang/bin/" || exit 1
clazysource="$LLVM_INSTALL_DIR"/bin/clazy-standalone
cp -Rf "$clazysource" "$resource_path/clang/bin/" || exit 1
cp -Rf "$clazysource" "$libexec_path/clang/bin/" || exit 1
fi
clangbackendArgument="-executable=$resource_path/clangbackend"
clangpchmanagerArgument="-executable=$resource_path/clangpchmanagerbackend"
clangrefactoringArgument="-executable=$resource_path/clangrefactoringbackend"
clangbackendArgument="-executable=$libexec_path/clangbackend"
clangpchmanagerArgument="-executable=$libexec_path/clangpchmanagerbackend"
clangrefactoringArgument="-executable=$libexec_path/clangrefactoringbackend"
fi
#### macdeployqt
if [ ! -d "$app_path/Contents/Frameworks/QtCore.framework" ]; then
qml2puppetapp="$resource_path/qmldesigner/qml2puppet"
qml2puppetapp="$libexec_path/qmldesigner/qml2puppet"
if [ -f "$qml2puppetapp" ]; then
qml2puppetArgument="-executable=$qml2puppetapp"
fi
@@ -157,12 +164,12 @@ if [ ! -d "$app_path/Contents/Frameworks/QtCore.framework" ]; then
"$bin_src/macdeployqt" "$app_path" \
"-executable=$app_path/Contents/MacOS/qtdiag" \
"-executable=$resource_path/qtpromaker" \
"-executable=$resource_path/sdktool" \
"-executable=$resource_path/ios/iostool" \
"-executable=$resource_path/buildoutputparser" \
"-executable=$resource_path/cpaster" \
"-executable=$resource_path/qbs_processlauncher" \
"-executable=$libexec_path/qtpromaker" \
"-executable=$libexec_path/sdktool" \
"-executable=$libexec_path/ios/iostool" \
"-executable=$libexec_path/buildoutputparser" \
"-executable=$libexec_path/cpaster" \
"-executable=$libexec_path/qbs_processlauncher" \
"-executable=$qbsapp" \
"-executable=$qbsapp-config" \
"-executable=$qbsapp-config-ui" \