diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8cad161b0..0095da7eab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,6 +104,15 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20.x' + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install aqtinstall + run: > + pip install aqtinstall + aqt list-qt mac desktop --arch 6.2.4 + aqt install-qt mac desktop 6.2.4 --modules qtpositioning qtserialport qtwebchannel qtwebengine --outputdir ~/Qt - name: Build macOS app run: > ./scripts/github-ci.sh qt-osx; diff --git a/docs/BUILD.md b/docs/BUILD.md index 455227a2ad..0c5b7d211f 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -30,10 +30,11 @@ Build artifacts: ## MacOS -Make sure you have `qt@5/bin`, `go@1.23/bin` and `go/bin` in your PATH, i.e. add to your `.zshrc` +Make sure you have `qt@6/bin`, `qt@6/libexec`, `go@1.23/bin` and `go/bin` in your PATH, i.e. add to your `.zshrc` ```bash -export PATH="$PATH:/usr/local/opt/qt@5/bin" +export PATH="$PATH:/usr/local/opt/qt@6/bin" +export PATH="$PATH:/usr/local/opt/qt@6/libexec" export PATH="$PATH:/usr/local/opt/go@1.23/bin" export PATH="$PATH:$HOME/go/bin" ``` diff --git a/frontends/qt/BitBox.pro b/frontends/qt/BitBox.pro index 9ca064a2bf..41da1e9c32 100644 --- a/frontends/qt/BitBox.pro +++ b/frontends/qt/BitBox.pro @@ -64,6 +64,8 @@ SOURCES += \ HEADERS += libserver.h webclass.h filedialog.h unix:macx { + CONFIG += sdk_no_version_check + QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64 # Those frameworks are needed for Go's http/net packages. # Waiting for https://github.com/golang/go/issues/11258 to be able to automatically capture link flags. LIBS += -framework CoreFoundation -framework Security diff --git a/frontends/qt/Makefile b/frontends/qt/Makefile index 2164c93c9f..a485087e24 100644 --- a/frontends/qt/Makefile +++ b/frontends/qt/Makefile @@ -17,9 +17,6 @@ include ../../env.mk.inc base: mkdir build ./genassets.sh - qmake -set MACOS_MIN_VERSION $(MACOS_MIN_VERSION) - qmake -o build/Makefile - cd build && $(MAKE) clean: -rm -rf build cd server && $(MAKE) clean @@ -27,6 +24,8 @@ linux: $(MAKE) clean cd server && $(MAKE) linux $(MAKE) base + qmake -o build/Makefile + cd build && $(MAKE) mkdir build/linux-tmp build/linux mv build/BitBox build/linux-tmp cp build/assets.rcc build/linux-tmp/ @@ -47,6 +46,9 @@ osx: $(MAKE) clean cd server && $(MAKE) macosx $(MAKE) base + # See https://stackoverflow.com/questions/77136519/qmake-failing-with-sdk-14-ventura-13-5-2 + qmake -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path) -o build/Makefile + cd build && $(MAKE) mkdir build/osx mv build/BitBox.app build/osx/ cp resources/MacOS/Info.plist build/osx/BitBox.app/Contents/ diff --git a/scripts/github-ci.sh b/scripts/github-ci.sh index f52d33ad64..521ff81692 100755 --- a/scripts/github-ci.sh +++ b/scripts/github-ci.sh @@ -32,12 +32,14 @@ if [ "$OS_NAME" == "osx" ]; then # GitHub CI installs Go directly in the macos action, before executing # this script. go version - brew install qt@5 - export PATH="/usr/local/opt/qt@5/bin:$PATH" - export LDFLAGS="-L/usr/local/opt/qt@5/lib" - export CPPFLAGS="-I/usr/local/opt/qt@5/include" + brew install qt@6 + export PATH="/usr/local/opt/qt@6/bin:/usr/local/opt/qt@6/libexec:$PATH" + export LDFLAGS="-L/usr/local/opt/qt@6/lib" + export CPPFLAGS="-I/usr/local/opt/qt@6/include" export GOPATH=~/go export PATH=$PATH:~/go/bin + ls -laR /usr/local/opt/qt@6/libexec + echo "qmake -version" && qmake -version mkdir -p $GOPATH/$(dirname $GO_SRC_DIR) # GitHub checkout action (git clone) seem to require current work dir # to be the root of the repo during its clean up phase. So, we push it diff --git a/scripts/osx-brew.sh b/scripts/osx-brew.sh index f09c24446c..cbeb0198a5 100755 --- a/scripts/osx-brew.sh +++ b/scripts/osx-brew.sh @@ -1,14 +1,6 @@ #!/bin/bash -if [ $(arch) = "arm64" ]; then - # recent M-based apple machines have an arm64 arch, but we need to install x86_64 deps - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" - /usr/local/Homebrew/bin/brew install go@1.23 - /usr/local/Homebrew/bin/brew install qt@5 - /usr/local/Homebrew/bin/brew install create-dmg -else - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" - brew install go@1.23 - brew install qt@5 - brew install create-dmg -fi +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +brew install go@1.23 +brew install qt@6 +brew install create-dmg