summaryrefslogtreecommitdiff
path: root/macosx-setup.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-10-11 14:35:47 -0700
committerGuy Harris <guy@alum.mit.edu>2015-10-11 21:36:18 +0000
commita6673b3fde1cac904a405cb1125d547d064d3aa7 (patch)
tree7b7f286b38e3a68ac7423defc560663c25ff3184 /macosx-setup.sh
parentfbcd8e3648b9612a4af366a02c5da082168f35f9 (diff)
downloadwireshark-a6673b3fde1cac904a405cb1125d547d064d3aa7.tar.gz
Handle installing Qt 4.x.
Or, at least, 4.8.6. I guess they had to do an updated build or something, as the actual dmg has "4.8.6-1", so handle that extra versioning. Clean up some white space while we're at it. Change-Id: I62b99dd99e7e5cb84cca68bdc59b02e4bf65411f Reviewed-on: https://code.wireshark.org/review/10943 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-xmacosx-setup.sh34
1 files changed, 26 insertions, 8 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index 3735b58845..23263ad79d 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -103,6 +103,7 @@ if [ "$QT_VERSION" ]; then
QT_MINOR_VERSION="`expr $QT_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
QT_DOTDOT_VERSION="`expr $QT_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
QT_MAJOR_MINOR_VERSION=$QT_MAJOR_VERSION.$QT_MINOR_VERSION
+ QT_MAJOR_MINOR_DOTDOT_VERSION=$QT_MAJOR_VERSION.$QT_MINOR_VERSION.$QT_DOTDOT_VERSION
fi
# In case we want to build GTK *and* we don't have Apple's X11 SDK installed
@@ -365,7 +366,7 @@ install_cmake() {
# 3) it can't be run from the command line;
#
# so we do it ourselves.
- #
+ #
for i in ccmake cmake cmake-gui cmakexbuild cpack ctest
do
sudo ln -s /Applications/CMake.app/Contents/bin/$i /usr/local/bin/$i
@@ -608,14 +609,31 @@ install_qt() {
# What you get for this URL might just be a 302 Found reply, so use
# -L so we get redirected.
#
- [ -f qt-opensource-mac-x64-clang-$QT_VERSION.dmg ] || curl -L -O http://download.qt.io/archive/qt/$QT_MAJOR_MINOR_VERSION/$QT_VERSION/qt-opensource-mac-x64-clang-$QT_VERSION.dmg || exit 1
- sudo hdiutil attach qt-opensource-mac-x64-clang-$QT_VERSION.dmg || exit 1
+ if [ "$QT_MAJOR_VERSION" -ge 5 ]
+ then
+ QT_VOLUME=qt-opensource-mac-x64-clang-$QT_VERSION
+ else
+ QT_VOLUME=qt-opensource-mac-$QT_VERSION
+ fi
+ [ -f $QT_VOLUME.dmg ] || curl -L -O http://download.qt.io/archive/qt/$QT_MAJOR_MINOR_VERSION/$QT_MAJOR_MINOR_DOTDOT_VERSION/$QT_VOLUME.dmg || exit 1
+ sudo hdiutil attach $QT_VOLUME.dmg || exit 1
- #
- # Run the executable directly, so that we wait for it to finish.
- #
- /Volumes/qt-opensource-mac-x64-clang-$QT_VERSION/qt-opensource-mac-x64-clang-$QT_VERSION.app/Contents/MacOS/qt-opensource-mac-x64-clang-$QT_VERSION
- sudo hdiutil detach /Volumes/qt-opensource-mac-x64-clang-$QT_VERSION
+ if [ "$QT_MAJOR_VERSION" -ge 5 ]
+ then
+ #
+ # Run the installer executable directly, so that we wait for
+ # it to finish. Then unmount the volume.
+ #
+ /Volumes/$QT_VOLUME/$QT_VOLUME.app/Contents/MacOS/$QT_VOLUME
+ sudo hdiutil detach /Volumes/$QT_VOLUME
+ else
+ #
+ # Open the installer package; use -W, so that we wait for
+ # the installer to finish. Then unmount the volume.
+ #
+ open -W "/Volumes/Qt $QT_MAJOR_MINOR_DOTDOT_VERSION/Qt.mpkg"
+ sudo hdiutil detach "/Volumes/Qt $QT_MAJOR_MINOR_DOTDOT_VERSION"
+ fi
#
# Versions 5.3.x through 5.5.0, at least, have bogus .pc files.