Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Oct 29, 2024
1 parent 952b20d commit 47785b0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
5 changes: 3 additions & 2 deletions docs/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ Build artifacts:

## MacOS

Make sure you have `qt@5/bin`, `[email protected]/bin` and `go/bin` in your PATH, i.e. add to your `.zshrc`
Make sure you have `qt@6/bin`, `qt@6/libexec`, `[email protected]/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/[email protected]/bin"
export PATH="$PATH:$HOME/go/bin"
```
Expand Down
2 changes: 2 additions & 0 deletions frontends/qt/BitBox.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions frontends/qt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ 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
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/
Expand All @@ -47,6 +46,8 @@ osx:
$(MAKE) clean
cd server && $(MAKE) macosx
$(MAKE) base
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/
Expand Down
10 changes: 6 additions & 4 deletions scripts/github-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 4 additions & 12 deletions scripts/osx-brew.sh
Original file line number Diff line number Diff line change
@@ -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 [email protected]
/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 [email protected]
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 [email protected]
brew install qt@6
brew install create-dmg

0 comments on commit 47785b0

Please sign in to comment.