-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacos-build.zsh
executable file
·56 lines (44 loc) · 1.41 KB
/
macos-build.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env zsh
###### Configure LLVM ######
if [[ $CPUTYPE == arm64 ]]; then
alias clang=/opt/homebrew/opt/llvm/bin/clang
alias clang++=/opt/homebrew/opt/llvm/bin/clang++
else
alias clang=/usr/local/opt/llvm/bin/clang
alias clang++=/usr/local/opt/llvm/bin/clang++
fi
###### Build ######
cd $HOME
mkdir qt-static
cd qt-static
rm -rf build install qt6.6.0-static-arm64-apple-darwin qt6.6.0-static-x86_64-apple-darwin qt6.6.0-static-arm64-apple-darwin.tar.gz qt6.6.0-static-x86_64-apple-darwin.tar.gz
git clone https://github.com/qt/qtbase.git --recursive
cd qtbase
git checkout v6.6.0
cd ..
git clone https://github.com/qt/qttools.git --recursive
cd qttools
git checkout v6.6.0
cd ..
mkdir build install
cd build
# Configure, build and install qtbase
../qtbase/configure --prefix=../install -static -release -nomake tests -skip qtdoc
cmake --build . --parallel
cmake --install .
rm -rf ./*
# Configure, build and install qttools
../install/bin/qt-configure-module ../qttools
cmake --build . --parallel
cmake --install .
rm -rf ./*
###### Package ######
cd ..
if [[ $CPUTYPE == arm64 ]]; then
mv install qt6.6.0-static-arm64-apple-darwin
tar -czvf qt6.6.0-static-arm64-apple-darwin.tar.gz qt6.6.0-static-arm64-apple-darwin
else
mv install qt6.6.0-static-x86_64-apple-darwin
tar -czvf qt6.6.0-static-x86_64-apple-darwin.tar.gz qt6.6.0-static-x86_64-apple-darwin
fi
echo "Done! Find the package in $HOME/qt-static"