forked from BitBoxSwiss/bitbox-wallet-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
brew's qt@6 would work excpt that it is missing all of the qt@6/libexec folder, which contains the rcc tool we need to bundle the frontend assets. Instead we use `aqtinstall` which installs Qt binaries from official mirrors and includes all we need. We get rid of osx-brew.sh which is only referenced in the BUILD.md and instead inline the instructions, as it is strange to install brew and other unprompted. Devs can follow along the BUILD.md instructions. This commit also introduces universal builds for macOS. They are fat binaries/libraries that include code for both the amd64 and arm64 architectures, so the app can run natively. As a result, the resulting app size is roughly double to before. Alternative considered but dismissed: - Make and distribute two separate BitBox.app outputs per architecture. This reduces the app size, but is a bit more error prone for users and incurs more effort to distribute correctly. Also the AppStore requires universal builds, if we ever want to distbute the app through the AppStore.
- Loading branch information
Showing
10 changed files
with
51 additions
and
47 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,13 +30,6 @@ gomobileinit: | |
# TODO: replace with go install golang.org/x/mobile/cmd/gomobile@latest once https://github.com/golang/mobile/pull/105 is merged. | ||
git clone https://github.com/BitBoxSwiss/mobile.git /tmp/mobile && cd /tmp/mobile/cmd/gomobile && go install . | ||
gomobile init | ||
# Initializiation on MacOS | ||
# - run make from $GOPATH/src/github.com/BitBoxSwiss/bitbox-wallet-app | ||
# - additional dependencies: Qt 5.15 & Xcode command line tools | ||
# - add to $PATH: /usr/local/opt/[email protected]/bin | ||
osx-init: | ||
./scripts/osx-brew.sh | ||
$(MAKE) envinit | ||
servewallet: | ||
go run -mod=vendor ./cmd/servewallet | ||
servewallet-mainnet: | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,17 +30,27 @@ 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` | ||
Install Go, Qt and create-dmg: | ||
|
||
``` | ||
# Install Go. Can also use the official installer | ||
brew install [email protected] | ||
brew install create-dmg | ||
# InstalL Qt. Can also use the official installer. | ||
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 | ||
``` | ||
|
||
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:~/Qt/6.2.4/macos/bin" | ||
export PATH="$PATH:~/Qt/6.2.4/macos/libexec" | ||
export PATH="$PATH:/usr/local/opt/[email protected]/bin" | ||
export PATH="$PATH:$HOME/go/bin" | ||
``` | ||
|
||
Prepare the MacOS system to have the build environment: | ||
`make osx-init` | ||
|
||
Build the QT frontend for MacOS: | ||
`make qt-osx` | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
/build/ | ||
/config/ | ||
/server/libserver.h | ||
/server/libserver_arm64.h | ||
/server/libserver_amd64.h | ||
/server/libserver.so | ||
/server/libserver_arm64.so | ||
/server/libserver_amd64.so | ||
.qmake.stash |
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
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
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
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
This file was deleted.
Oops, something went wrong.