forked from qt-creator/qt-creator
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:
@@ -31,7 +31,7 @@ if (APPLE)
|
||||
set(_IDE_PLUGIN_PATH "${_IDE_OUTPUT_PATH}/PlugIns")
|
||||
set(_IDE_LIBRARY_BASE_PATH "Frameworks")
|
||||
set(_IDE_LIBRARY_PATH "${_IDE_OUTPUT_PATH}/Frameworks")
|
||||
set(_IDE_LIBEXEC_PATH "${_IDE_OUTPUT_PATH}/Resources")
|
||||
set(_IDE_LIBEXEC_PATH "${_IDE_OUTPUT_PATH}/Resources/libexec")
|
||||
set(_IDE_DATA_PATH "${_IDE_OUTPUT_PATH}/Resources")
|
||||
set(_IDE_DOC_PATH "${_IDE_OUTPUT_PATH}/Resources/doc")
|
||||
set(_IDE_BIN_PATH "${_IDE_OUTPUT_PATH}/MacOS")
|
||||
|
2
dist/installer/mac/ios_qt.conf
vendored
2
dist/installer/mac/ios_qt.conf
vendored
@@ -1,2 +1,2 @@
|
||||
[Paths]
|
||||
Plugins = ../../PlugIns
|
||||
Plugins = ../../../PlugIns
|
||||
|
5
dist/installer/mac/libexec_qt.conf
vendored
Normal file
5
dist/installer/mac/libexec_qt.conf
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
[Paths]
|
||||
Prefix = ../..
|
||||
Imports = Imports/qtquick1
|
||||
Qml2Imports = Imports/qtquick2
|
||||
Plugins = PlugIns
|
7
dist/installer/mac/qmldesigner_qt.conf
vendored
7
dist/installer/mac/qmldesigner_qt.conf
vendored
@@ -1,4 +1,5 @@
|
||||
[Paths]
|
||||
Imports = ../../Imports/qtquick1
|
||||
Qml2Imports = ../../Imports/qtquick2
|
||||
Plugins = ../../PlugIns
|
||||
Prefix = ../../..
|
||||
Imports = Imports/qtquick1
|
||||
Qml2Imports = Imports/qtquick2
|
||||
Plugins = PlugIns
|
||||
|
@@ -48,7 +48,7 @@ Module {
|
||||
? ide_app_target + ".app/Contents/Resources"
|
||||
: "share/qtcreator"
|
||||
property string ide_libexec_path: qbs.targetOS.contains("macos")
|
||||
? ide_data_path : qbs.targetOS.contains("windows")
|
||||
? ide_data_path + "/libexec" : qbs.targetOS.contains("windows")
|
||||
? ide_app_path
|
||||
: "libexec/qtcreator"
|
||||
property string ide_bin_path: qbs.targetOS.contains("macos")
|
||||
|
@@ -107,7 +107,7 @@ osx {
|
||||
|
||||
IDE_LIBRARY_PATH = $$IDE_OUTPUT_PATH/Frameworks
|
||||
IDE_PLUGIN_PATH = $$IDE_OUTPUT_PATH/PlugIns
|
||||
IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/Resources
|
||||
IDE_LIBEXEC_PATH = $$IDE_OUTPUT_PATH/Resources/libexec
|
||||
IDE_DATA_PATH = $$IDE_OUTPUT_PATH/Resources
|
||||
IDE_DOC_PATH = $$IDE_DATA_PATH/doc
|
||||
IDE_BIN_PATH = $$IDE_OUTPUT_PATH/MacOS
|
||||
@@ -118,7 +118,7 @@ osx {
|
||||
|
||||
INSTALL_LIBRARY_PATH = $$QTC_PREFIX/$${IDE_APP_TARGET}.app/Contents/Frameworks
|
||||
INSTALL_PLUGIN_PATH = $$QTC_PREFIX/$${IDE_APP_TARGET}.app/Contents/PlugIns
|
||||
INSTALL_LIBEXEC_PATH = $$QTC_PREFIX/$${IDE_APP_TARGET}.app/Contents/Resources
|
||||
INSTALL_LIBEXEC_PATH = $$QTC_PREFIX/$${IDE_APP_TARGET}.app/Contents/Resources/libexec
|
||||
INSTALL_DATA_PATH = $$QTC_PREFIX/$${IDE_APP_TARGET}.app/Contents/Resources
|
||||
INSTALL_DOC_PATH = $$INSTALL_DATA_PATH/doc
|
||||
INSTALL_BIN_PATH = $$QTC_PREFIX/$${IDE_APP_TARGET}.app/Contents/MacOS
|
||||
|
@@ -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" \
|
||||
|
Reference in New Issue
Block a user