Commit 71f1919d authored by Eike Ziller's avatar Eike Ziller

Mac: Deploy and patch qml imports and qml2puppet

The patching of imports and plugins is done automatically by macdeployqt,
we need to pass it the qml2puppet executable though.
Also add Qml2Imports to the qml(2)puppet's qt.conf.

Task-number: QTCREATORBUG-9136
Change-Id: I9cb21d104f4c0c42531facfc6bc92fa9663e95a9
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 86c2342e
[Paths]
Imports = ../..
Imports = ../../../Imports/qtquick1
Qml2Imports = ../../../Imports/qtquick2
Plugins = ../../../PlugIns
......@@ -52,7 +52,7 @@ macx {
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
BINDIST_INSTALLER_SOURCE = $$BINDIST_SOURCE
deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\" \"$$[QT_INSTALL_TRANSLATIONS]\" \"$$[QT_INSTALL_PLUGINS]\"
deployqt.commands = $$PWD/scripts/deployqtHelper_mac.sh \"$${APPBUNDLE}\" \"$$[QT_INSTALL_TRANSLATIONS]\" \"$$[QT_INSTALL_PLUGINS]\" \"$$[QT_INSTALL_IMPORTS]\" \"$$[QT_INSTALL_QML]\"
codesign.commands = codesign -s \"$(SIGNING_IDENTITY)\" $(SIGNING_FLAGS) \"$${APPBUNDLE}\"
dmg.commands = $$PWD/scripts/makedmg.sh $$OUT_PWD/bin qt-creator-$${PATTERN}.dmg
dmg.depends = deployqt
......
#!/bin/bash
[ $# -lt 3 ] && echo "Usage: $(basename $0) <app folder> <qt translations folder> <qt plugin folder>" && exit 2
[ $# -lt 5 ] && echo "Usage: $(basename $0) <app folder> <qt translations folder> <qt plugin folder> <qt quick imports folder> <qt quick 2 imports folder>" && exit 2
[ $(uname -s) != "Darwin" ] && echo "Run this script on Mac OS X" && exit 2;
# collect designer plugins
......@@ -7,14 +7,34 @@ designerDestDir="$1/Contents/PlugIns/designer"
test -d "$designerDestDir" || mkdir -p "$designerDestDir"
for plugin in "$3"/designer/*.dylib; do
cp "$plugin" "$designerDestDir"/ || exit 1
pluginbase=`basename "$plugin"`
designerPluginArguments+="\"-executable=$designerDestDir/$pluginbase\" "
done
# copy Qt Quick 1 imports
importsDir="$1/Contents/Imports/qtquick1"
if [ -d "$4" ]; then
test -d "$importsDir" || mkdir -p "$importsDir"
cp -R "$4"/ "$importsDir"/
fi
# copy Qt Quick 2 imports
imports2Dir="$1/Contents/Imports/qtquick2"
if [ -d "$5" ]; then
test -d "$imports2Dir" || mkdir -p "$imports2Dir"
cp -R "$5"/ "$imports2Dir"/
fi
qml2puppetapp="$1/Contents/MacOS/qml2puppet.app"
if [ -d "$qml2puppetapp" ]; then
qml2puppetArgument="-executable=$qml2puppetapp/Contents/MacOS/qml2puppet"
qml2puppetResources="$1/Contents/MacOS/qml2puppet.app/Contents/Resources"
test -d "$qml2puppetResources" || mkdir -p "$qml2puppetResources"
cp "$(dirname "${BASH_SOURCE[0]}")/../dist/installer/mac/qmlpuppet_qt.conf" "$qml2puppetResources/qt.conf" || exit 1
fi
macdeployqt "$1" \
"-executable=$1/Contents/MacOS/qmlpuppet.app/Contents/MacOS/qmlpuppet" \
"-executable=$1/Contents/Resources/qtpromaker" \
"-executable=$1/Contents/Resources/sdktool" $designerPluginArguments || exit 1
"-executable=$1/Contents/Resources/sdktool" "$qml2puppetArgument" || exit 1
qmlpuppetResources="$1/Contents/MacOS/qmlpuppet.app/Contents/Resources"
test -d "$qmlpuppetResources" || mkdir -p "$qmlpuppetResources"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment