|
5 | 5 | pwd
|
6 | 6 |
|
7 | 7 | brew update
|
8 |
| -brew install qt@5 |
| 8 | +brew install qt@6 |
9 | 9 | brew unlink qt@5 && brew link --force qt@5
|
10 |
| -#brew link --overwrite qt@5 --force --overwrite |
| 10 | +#brew link --overwrite qt@6 --force --overwrite |
11 | 11 | # https://github.com/Homebrew/homebrew-core/issues/8392
|
12 | 12 | # https://github.com/Homebrew/legacy-homebrew/issues/29938
|
13 |
| -QT_VERSION=$(brew list --versions qt@5 | awk '{print $2}') |
| 13 | +QT_VERSION=$(brew list --versions qt@6 | awk '{print $2}') |
14 | 14 | echo "QT_VERSION=$QT_VERSION"
|
15 | 15 | if [[ -z "$QT_VERSION" ]]; then
|
16 | 16 | echo "QT_VERSION is empty"
|
17 | 17 | exit 1
|
18 | 18 | fi
|
19 | 19 |
|
20 | 20 | # follow brew install suggestions
|
21 |
| -echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.bash_profile |
22 |
| -export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib" |
23 |
| -export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include" |
24 |
| -export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig" |
| 21 | +echo 'export PATH="/opt/homebrew/opt/qt@6/bin:$PATH"' >> ~/.bash_profile |
| 22 | +export LDFLAGS="-L/opt/homebrew/opt/qt@6/lib" |
| 23 | +export CPPFLAGS="-I/opt/homebrew/opt/qt@6/include" |
| 24 | +export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@6/lib/pkgconfig" |
25 | 25 | source ~/.bash_profile
|
26 | 26 |
|
27 | 27 | uname -a
|
28 | 28 | if [[ $(uname -m) == 'arm64' ]]; then
|
29 | 29 | echo "Run on MacOS arm64"
|
30 |
| - sudo ln -s -F "/opt/homebrew/Cellar/qt@5/${QT_VERSION}/mkspecs" /usr/local/mkspecs |
31 |
| - sudo ln -s -F "/opt/homebrew/Cellar/qt@5/${QT_VERSION}/plugins" /usr/local/plugins |
| 30 | + sudo ln -s -F "/opt/homebrew/Cellar/qt@6/${QT_VERSION}/mkspecs" /usr/local/mkspecs |
| 31 | + sudo ln -s -F "/opt/homebrew/Cellar/qt@6/${QT_VERSION}/plugins" /usr/local/plugins |
32 | 32 | else
|
33 | 33 | echo "Run on MacOS x86"
|
34 |
| - sudo ln -s "/usr/local/Cellar/qt@5/${QT_VERSION}/mkspecs" /usr/local/mkspecs |
35 |
| - sudo ln -s "/usr/local/Cellar/qt@5/${QT_VERSION}/plugins" /usr/local/plugins |
| 34 | + sudo ln -s "/usr/local/Cellar/qt@6/${QT_VERSION}/mkspecs" /usr/local/mkspecs |
| 35 | + sudo ln -s "/usr/local/Cellar/qt@6/${QT_VERSION}/plugins" /usr/local/plugins |
36 | 36 | fi
|
37 | 37 |
|
38 | 38 | brew install ninja tree
|
0 commit comments