summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-09-07 11:52:50 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-09-16 19:53:57 (GMT)
commit240821c26396b067346d915e1da760ded5557b28 (patch)
tree8b8a6c333aeb9d8f5b6c8ae886c9fbb6e8200be1
parentfbd725fecfc34aa86862d11163b37172edc60e6b (diff)
downloadswift-240821c26396b067346d915e1da760ded5557b28.zip
swift-240821c26396b067346d915e1da760ded5557b28.tar.bz2
Remove Qt bearer plugins from Swift bundle in installation package
This is a workaround for QTBUG-34641. The Qt bearer API for detecting network changes will poll for available wireless networks every 30 seconds or so, resulting in needless CPU load. This patch removes the plugins for this API from the installation package, which will disable the constant polling for available wireless networks. Test-Information: Verified that the plugins are removed from the application bundle in the final installation DMG. Change-Id: If46d03ca5623885879ecc10e06a29cec96e7caa4
-rwxr-xr-xSwift/Packaging/MacOSX/package.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/Packaging/MacOSX/package.sh b/Swift/Packaging/MacOSX/package.sh
index d7a31d2..4c7157f 100755
--- a/Swift/Packaging/MacOSX/package.sh
+++ b/Swift/Packaging/MacOSX/package.sh
@@ -19,9 +19,13 @@ gunzip -c $TEMPLATE > $WC_DMG
19rm -rf $WC_DIR 19rm -rf $WC_DIR
20mkdir -p $WC_DIR 20mkdir -p $WC_DIR
21hdiutil attach "$WC_DMG" -noautoopen -quiet -mountpoint "$WC_DIR" 21hdiutil attach "$WC_DMG" -noautoopen -quiet -mountpoint "$WC_DIR"
22ditto -rsrc "$APP" "$WC_DIR"/`basename $APP` 22ditto -rsrc "$APP" "$WC_DIR"/`basename $APP`
23$QTDIR/bin/macdeployqt "$WC_DIR"/`basename $APP` -no-strip 23$QTDIR/bin/macdeployqt "$WC_DIR"/`basename $APP` -no-strip
24# The bearer plugins of Qt5 cannot be disabled by an application.
25# They will constantly ask the OS to scan for available wireless networks, unrelated to actual API calls.
26# This results in unnessecary resource load, so we remove the plugins from our packages.
27rm "$WC_DIR"/`basename $APP`/Contents/PlugIns/bearer/*.dylib
24hdiutil detach "$WC_DIR" -quiet -force 28hdiutil detach "$WC_DIR" -quiet -force
25rm -f $TARGET 29rm -f $TARGET
26hdiutil convert "$WC_DMG" -quiet -format UDZO -imagekey zlib-level=9 -o "$TARGET" 30hdiutil convert "$WC_DMG" -quiet -format UDZO -imagekey zlib-level=9 -o "$TARGET"
27rm -rf $WC_DMG $WC_DIR 31rm -rf $WC_DMG $WC_DIR