forked from qt-creator/qt-creator
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: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
[Paths]
|
||||
Imports = ../..
|
||||
Imports = ../../../Imports/qtquick1
|
||||
Qml2Imports = ../../../Imports/qtquick2
|
||||
Plugins = ../../../PlugIns
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/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"
|
||||
|
||||
Reference in New Issue
Block a user