-
-
Save jdk/47eb15052411abe3932996a47ea2dd1b to your computer and use it in GitHub Desktop.
Build Universal QT Debug and Release Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Download | |
wget https://download.qt.io/official_releases/qt/6.4/6.4.1/single/qt-everywhere-src-6.4.1.tar.xz | |
# For some reason, -debug-and-release is not working | |
# So we will compile both versions and copy all the | |
# debug files into our release directory | |
# Unzip our file | |
tar -xvzf qt-everywhere-src-6.4.1.tar.xz | |
# Create a debug Build, put it in final location | |
cd qt-everywhere-src-6.4.1 | |
./configure -debug -static -prefix /usr/local/qt-6.4.1 -- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" | |
cmake --build . --parallel | |
cmake --install . | |
# Temporarily move it | |
mv /usr/local/qt-6.4.1 /usr/local/qt-6.4.1.debug | |
# Clean Up | |
cd .. | |
rm -fR qt-everywhere-src-6.4.1 | |
# Start Again, build a release and deploy | |
tar -xvzf qt-everywhere-src-6.4.1.tar.xz | |
cd qt-everywhere-src-6.4.1 | |
./configure -release -static -prefix /usr/local/qt-6.4.1 -- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" | |
cmake --build . --parallel | |
cmake --install . | |
# Clean Up | |
cd .. | |
rm -fR qt-everywhere-src-6.4.1 | |
# Go into our debug build | |
cd /usr/local/qt-6.4.1.debug | |
# Zip up everything that has the name debug | |
find . -iname *debug* -exec tar -rvf qt.tar {} \; | |
# Move it to our final release directory and copy to correct location | |
mv qt.tar /usr/local/qt-6.4.1 | |
cd /usr/local/qt-6.4.1 | |
tar -xvzf qt.tar | |
# Clean Up | |
rm qt.tar | |
rm -fR /usr/local/qt-6.4.1.debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment