Skip to content

Commit

Permalink
Merge #163: cmake, doc: Update build-osx.md
Browse files Browse the repository at this point in the history
2dc664c cmake, doc: Update `build-osx.md` (Hennadii Stepanov)
1e7a579 fixup! ci: Test CMake edge cases (Hennadii Stepanov)
721251a fixup! cmake: Add `Maintenance` module (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  Sjors:
    tACK 2dc664c

Tree-SHA512: 48aa67d94a1cb61f9c5643b8dac52ffb3cf905647d97313f04637da4befff4d355e876338ec6d5f3b671c12151136029c985a3966e3030c8dc3635a3461d43fb
  • Loading branch information
hebasto committed Apr 23, 2024
2 parents c9a125b + 2dc664c commit f9b43f7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -606,3 +606,8 @@ jobs:
cmake --install build --prefix install
tree install
./install/bin/bitcoind -version
- name: Deploy
run: |
cmake --build build --target deploy
ls -l build/*.zip
2 changes: 1 addition & 1 deletion cmake/module/Maintenance.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function(add_macos_deploy_target)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/${osx_volname}.zip
COMMAND ${PYTHON_COMMAND} ${CMAKE_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
DEPENDS ${macos_app}/Contents/MacOS/Bitcoin-Qt
DEPENDS ${CMAKE_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
VERBATIM
)
add_custom_target(deploydir
Expand Down
29 changes: 16 additions & 13 deletions doc/build-osx.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# macOS Build Guide

**Updated for MacOS [11.2](https://www.apple.com/macos/big-sur/)**
**Updated for MacOS [14.4](https://www.apple.com/macos/sonoma/)**

This guide describes how to build bitcoind, command-line utilities, and GUI on macOS

Expand Down Expand Up @@ -48,7 +48,7 @@ See [dependencies.md](dependencies.md) for a complete overview.
To install, run the following from your terminal:

``` bash
brew install automake libtool boost pkg-config libevent
brew install cmake boost pkg-config libevent
```

### 4. Clone Bitcoin repository
Expand Down Expand Up @@ -163,7 +163,7 @@ brew install python

#### Deploy Dependencies

You can deploy a `.zip` containing the Bitcoin Core application using `make deploy`.
You can [deploy](#3-deploy-optional) a `.zip` containing the Bitcoin Core application.
It is required that you have `python` installed.

## Building Bitcoin Core
Expand All @@ -179,8 +179,9 @@ If `sqlite` is installed, then descriptor wallet support will also be built.
Additionally, this explicitly disables the GUI.

``` bash
./autogen.sh
./configure --with-gui=no
mkdir build
cd build
cmake -S .. -DWITH_GUI=OFF
```

##### Wallet (only SQlite) and GUI Support:
Expand All @@ -191,15 +192,17 @@ If `sqlite` is installed then descriptor wallet functionality will be built.
If `sqlite` is not installed, then wallet functionality will be disabled.

``` bash
./autogen.sh
./configure --without-bdb --with-gui=yes
mkdir build
cd build
cmake -S .. -DWITH_BDB=OFF -DWITH_GUI=Qt5
```

##### No Wallet or GUI

``` bash
./autogen.sh
./configure --without-wallet --with-gui=no
mkdir build
cd build
cmake -S .. -DENABLE_WALLET=OFF -DWITH_GUI=OFF
```

##### Further Configuration
Expand All @@ -208,7 +211,7 @@ You may want to dig deeper into the configuration options to achieve your desire
Examine the output of the following command for a full list of configuration options:

``` bash
./configure -help
cmake -S .. -LH
```

### 2. Compile
Expand All @@ -217,16 +220,16 @@ After configuration, you are ready to compile.
Run the following in your terminal to compile Bitcoin Core:

``` bash
make # use "-j N" here for N parallel jobs
make check # Run tests if Python 3 is available
cmake --build . # Use "-j N" here for N parallel jobs.
ctest # Run tests if Python 3 is available. Use "-j N" here for N parallel jobs.
```

### 3. Deploy (optional)

You can also create a `.zip` containing the `.app` bundle by running the following command:

``` bash
make deploy
cmake --build . --target deploy
```

## Running Bitcoin Core
Expand Down

0 comments on commit f9b43f7

Please sign in to comment.