From cb53978880500070dd40f6de110eb572a18a0de8 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Wed, 17 Jan 2024 08:43:22 +0100 Subject: [PATCH] qt6 --- scripts/darwin/install.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/darwin/install.sh b/scripts/darwin/install.sh index 0f28926f..a13ce295 100755 --- a/scripts/darwin/install.sh +++ b/scripts/darwin/install.sh @@ -5,12 +5,23 @@ id env pwd -brew install qt@5 -brew link qt@5 --force +brew install qt@6 +brew link qt@6 --force # https://github.com/Homebrew/homebrew-core/issues/8392 # https://github.com/Homebrew/legacy-homebrew/issues/29938 -QT_VERSION=$(brew list --versions qt@5 | sed -n '/qt@5/s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*.*\).*$/\1/p') -sudo ln -s "/usr/local/Cellar/qt@5/${QT_VERSION}/mkspecs" /usr/local/mkspecs -sudo ln -s "/usr/local/Cellar/qt@5/${QT_VERSION}/plugins" /usr/local/plugins +QT_VERSION=$(brew list --versions qt@6 | awk '{print $2}') +echo "QT_VERSION=$QT_VERSION" +if [[ -z "$QT_VERSION" ]]; then + echo "QT_VERSION is empty" + exit 1 +fi + +if [[ $(uname -m) == 'arm64' ]]; then + sudo ln -s -F "/opt/homebrew/Cellar/qt/${QT_VERSION}/mkspecs" /usr/local/mkspecs + sudo ln -s -F "/opt/homebrew/Cellar/qt/${QT_VERSION}/plugins" /usr/local/plugins +else + sudo ln -s "/usr/local/Cellar/qt@6/${QT_VERSION}/mkspecs" /usr/local/mkspecs + sudo ln -s "/usr/local/Cellar/qt@6/${QT_VERSION}/plugins" /usr/local/plugins +fi brew install ninja tree