diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-10-28 16:06:00 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-11-05 12:31:40 +0000 |
commit | 48432161926332a15efa3479c6cad73d825aaddb (patch) | |
tree | c1e89d8849f9f195d551bcc789ff5543dbc9a213 | |
parent | 5634f112bd31cd2f9ccc521072097a22fb6f09c7 (diff) |
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>
-rw-r--r-- | cmake/QtCreatorAPI.cmake | 2 | ||||
-rw-r--r-- | dist/installer/mac/ios_qt.conf | 2 | ||||
-rw-r--r-- | dist/installer/mac/libexec_qt.conf | 5 | ||||
-rw-r--r-- | dist/installer/mac/qmldesigner_qt.conf | 7 | ||||
-rw-r--r-- | qbs/modules/qtc/qtc.qbs | 2 | ||||
-rw-r--r-- | qtcreator.pri | 4 | ||||
-rwxr-xr-x | scripts/deployqtHelper_mac.sh | 55 |
7 files changed, 45 insertions, 32 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index 300b7cd50a..f32a8b24d5 100644 --- a/cmake/QtCreatorAPI.cmake +++ b/cmake/QtCreatorAPI.cmake @@ -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") diff --git a/dist/installer/mac/ios_qt.conf b/dist/installer/mac/ios_qt.conf index 9e239d6193..249df1d74c 100644 --- a/dist/installer/mac/ios_qt.conf +++ b/dist/installer/mac/ios_qt.conf @@ -1,2 +1,2 @@ [Paths] -Plugins = ../../PlugIns +Plugins = ../../../PlugIns diff --git a/dist/installer/mac/libexec_qt.conf b/dist/installer/mac/libexec_qt.conf new file mode 100644 index 0000000000..7004d4bec3 --- /dev/null +++ b/dist/installer/mac/libexec_qt.conf @@ -0,0 +1,5 @@ +[Paths] +Prefix = ../.. +Imports = Imports/qtquick1 +Qml2Imports = Imports/qtquick2 +Plugins = PlugIns diff --git a/dist/installer/mac/qmldesigner_qt.conf b/dist/installer/mac/qmldesigner_qt.conf index c10c195bdd..8d80be2292 100644 --- a/dist/installer/mac/qmldesigner_qt.conf +++ b/dist/installer/mac/qmldesigner_qt.conf @@ -1,4 +1,5 @@ [Paths] -Imports = ../../Imports/qtquick1 -Qml2Imports = ../../Imports/qtquick2 -Plugins = ../../PlugIns +Prefix = ../../.. +Imports = Imports/qtquick1 +Qml2Imports = Imports/qtquick2 +Plugins = PlugIns diff --git a/qbs/modules/qtc/qtc.qbs b/qbs/modules/qtc/qtc.qbs index d41a98f562..3c6c30f8c7 100644 --- a/qbs/modules/qtc/qtc.qbs +++ b/qbs/modules/qtc/qtc.qbs @@ -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") diff --git a/qtcreator.pri b/qtcreator.pri index 9a61746ddb..cc0a0b658c 100644 --- a/qtcreator.pri +++ b/qtcreator.pri @@ -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 diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh index 47c7613002..689bd407d7 100755 --- a/scripts/deployqtHelper_mac.sh +++ b/scripts/deployqtHelper_mac.sh @@ -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" \ |