Skip to content

Commit 4de8db1

Browse files
Merge branch 'master' into ui_improvements
2 parents 24e2761 + 6da96d8 commit 4de8db1

19 files changed

+300
-83
lines changed

.github/workflows/ci-master.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,14 @@ jobs:
174174
- name: Use Xcode instead of Command Line Tools
175175
run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
176176
- name: Install Required Packages
177-
run: brew install automake coreutils pkg-config python-setuptools
177+
run: |
178+
if ! command -v pkg-config &> /dev/null; then
179+
echo "pkg-config not found, installing..."
180+
brew install pkg-config
181+
else
182+
echo "pkg-config is already installed"
183+
fi
184+
brew install automake coreutils python-setuptools
178185
# Workaround for macOS: https://github.com/actions/runner/issues/2958
179186
- name: Install setuptools
180187
run: sudo -H pip install setuptools

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Bootstrappable builds can [be achieved with Guix.](contrib/guix/README.md)
107107

108108
```sh
109109
sudo apt-get update
110-
sudo apt-get install git curl python build-essential libtool automake pkg-config cmake
110+
sudo apt-get install python; sudo apt-get install git curl build-essential libtool automake pkg-config cmake
111111
# Also needed for GUI wallet only:
112112
sudo apt-get install qttools5-dev qttools5-dev-tools libxcb-xkb-dev bison
113113
```

doc/build-macos.md

+87-49
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,92 @@ macOS Build Instructions and Notes
33
The commands in this guide should be executed in a Terminal application.
44
The built-in one is located in `/Applications/Utilities/Terminal.app`.
55

6-
Preparation
7-
-----------
8-
Install the macOS command line tools:
9-
10-
`xcode-select --install`
11-
12-
When the popup appears, click `Install`.
13-
14-
Then install [Homebrew](http://brew.sh).
15-
16-
Dependencies
17-
----------------------
18-
19-
brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent qrencode
20-
21-
In case you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
22-
23-
brew install librsvg
24-
25-
Berkley DB
26-
------------------------
6+
## Preparation
7+
1. Install macOS Command Line Tools (if not already installed):
8+
```bash
9+
xcode-select --install
10+
```
11+
When the popup appears, click `Install`.
12+
13+
14+
2. Install Homebrew (if not already installed):
15+
```bash
16+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
17+
```
18+
19+
20+
## Dependencies
21+
Install the required dependencies using Homebrew:
22+
```bash
23+
brew install automake berkeley-db4 libtool boost miniupnpc openssl protobuf python qt libevent qrencode python-setuptools m4
24+
```
25+
26+
In case you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG:
27+
```bash
28+
brew install librsvg
29+
```
30+
31+
### Ensure `m4` is Found
32+
After installing `m4`, it is important to note that `m4` is a `keg-only` formula in Homebrew. This means it is not symlinked into `/usr/local` by default. To make sure `m4` is available in your PATH, you'll need to link it manually with the `--force` flag:
33+
```bash
34+
brew link m4 --force
35+
```
36+
37+
You can verify that `m4` is properly linked and available by running:
38+
```bash
39+
which m4
40+
```
41+
This should output the path to the `m4` binary, typically `/opt/homebrew/bin/m4` on Apple Silicon Macs. If you do not use the `--force` flag, `which m4` will likely output `/usr/bin/m4`, which is the system version and not the one installed via Homebrew.
42+
43+
### Troubleshooting `m4` Issues
44+
If `m4` is not found even after installation and linking with `--force`, you may need to install Xcode to ensure that `m4` is recognized:
45+
46+
1. Install Xcode from the Mac App Store.
47+
2. Once installed, open Xcode at least once to complete the setup.
48+
49+
#### Berkeley DB
2750
It is recommended to use Berkeley DB 4.8. If you have to build it yourself, you can use [the installation script included in contrib/](https://github.com/bitcoin/bitcoin/blob/master/contrib/install_db4.sh) like so:
28-
./contrib/install_db4.sh .
29-
51+
```bash
52+
./contrib/install_db4.sh
53+
```
3054
from the root of the repository.
3155

32-
Note: You only need Berkeley DB if the wallet is enabled (see Disable-wallet mode).
33-
34-
35-
Build Firo Core
36-
------------------------
37-
1. Build Firo-core:
38-
39-
Configure and build the headless Firo binaries as well as the GUI (if Qt is found).
40-
41-
In case you want to build the disk image with `make deploy` (.dmg / optional), by passing `--with-gui` to configure.
42-
43-
You can disable the GUI build by passing `--without-gui` to configure.
44-
45-
./autogen.sh
46-
./configure
47-
make
48-
49-
2. It is recommended to build and run the unit tests:
50-
51-
` make check`
56+
*Note*: You only need Berkeley DB if the wallet is enabled (see Disable-wallet mode).
57+
58+
## Build Instructions
59+
60+
#### Download the Source
61+
Before building, download the Firo source code:
62+
```bash
63+
git clone https://github.com/firoorg/firo
64+
cd firo
65+
```
66+
67+
#### Build Firo Core
68+
1. **Prepare the build environment**:
69+
```bash
70+
cd depends
71+
make
72+
cd ..
73+
```
74+
75+
2. **Configure and build Firo-core**:
76+
```bash
77+
./autogen.sh
78+
./configure --prefix=`pwd`/depends/`depends/config.guess`
79+
make
80+
```
81+
82+
3. (optional) **It is recommended to build and run the unit tests**:
83+
```bash
84+
./configure --prefix=`pwd`/depends/`depends/config.guess` --enable-tests
85+
make check
86+
```
5287
53-
3. You can also create a .dmg that contains the .app bundle (optional):
54-
55-
` make deploy`
88+
4. (optional) **You can also create a .dmg that contains the .app bundle**:
89+
```bash
90+
make deploy
91+
```
5692

5793

5894
Running
@@ -86,7 +122,10 @@ Download and install the community edition of [Qt Creator](https://www.qt.io/dow
86122
Uncheck everything except Qt Creator during the installation process.
87123
88124
1. Make sure you installed everything through Homebrew mentioned above
89-
2. Do a proper `./configure --enable-debug`
125+
2. Properly configure the build environment:
126+
```bash
127+
./configure --prefix=`pwd`/depends/`depends/config.guess` --enable-debug
128+
```
90129
3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
91130
4. Enter "bitcoin-qt" as project name, enter `src/qt` as location
92131
5. Leave the file selection as it is
@@ -99,7 +138,6 @@ Uncheck everything except Qt Creator during the installation process.
99138
Notes
100139
-----
101140
102-
* Tested on macOS 10.11 through 10.14 on 64-bit Intel processors only.
141+
* Tested on macOS 10.11 through 10.14 on 64-bit Intel processors, and on macOS 14.5 on an M2 chip.
103142
104143
* Building with downloaded Qt binaries is not officially supported. See the notes in [#7714](https://github.com/bitcoin/bitcoin/issues/7714)
105-

doc/build-osx.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Then install [Homebrew](https://brew.sh).
1616
Dependencies
1717
----------------------
1818

19-
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf qt libevent
19+
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl protobuf qt libevent
2020

2121
If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
2222

src/qt/bitcoinaddressvalidator.h

+4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
#define BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
77

88
#include <QValidator>
9+
10+
#ifdef ENABLE_WALLET
911
#include "../spark/sparkwallet.h"
12+
#endif
13+
1014
#include "../spark/state.h"
1115

1216
/** Base58 entry widget validator, checks for valid characters and

src/qt/bitcoingui.cpp

+14-13
Original file line numberDiff line numberDiff line change
@@ -1439,19 +1439,20 @@ void BitcoinGUI::resizeEvent(QResizeEvent* event) {
14391439

14401440
// Retrieve new dimensions from the resize event
14411441
int newWidth = event->size().width();
1442-
int newHeight = event->size().height();
14431442
int actionWidth = newWidth / 6;
14441443

1445-
// Set widths for each action dynamically
1446-
QWidget* overviewWidget = toolbar->widgetForAction(overviewAction);
1447-
QWidget* receiveWidget = toolbar->widgetForAction(receiveCoinsAction);
1448-
QWidget* historyWidget = toolbar->widgetForAction(historyAction);
1449-
QWidget* sendCoinsWidget = toolbar->widgetForAction(sendCoinsAction);
1450-
QWidget* masternodeWidget = toolbar->widgetForAction(masternodeAction);
1451-
1452-
overviewWidget->setMinimumWidth(actionWidth);
1453-
receiveWidget->setMinimumWidth(actionWidth);
1454-
historyWidget->setMinimumWidth(actionWidth);
1455-
sendCoinsWidget->setMinimumWidth(actionWidth);
1456-
masternodeWidget->setMinimumWidth(actionWidth);
1444+
if (toolbar) {
1445+
// Set widths for each action dynamically
1446+
QWidget* overviewWidget = overviewAction ? toolbar->widgetForAction(overviewAction) : nullptr;
1447+
QWidget* receiveWidget = receiveCoinsAction ? toolbar->widgetForAction(receiveCoinsAction) : nullptr;
1448+
QWidget* historyWidget = historyAction ? toolbar->widgetForAction(historyAction) : nullptr;
1449+
QWidget* sendCoinsWidget = sendCoinsAction ? toolbar->widgetForAction(sendCoinsAction) : nullptr;
1450+
QWidget* masternodeWidget = masternodeAction ? toolbar->widgetForAction(masternodeAction) : nullptr;
1451+
1452+
if (overviewWidget) overviewWidget->setMinimumWidth(actionWidth);
1453+
if (receiveWidget) receiveWidget->setMinimumWidth(actionWidth);
1454+
if (historyWidget) historyWidget->setMinimumWidth(actionWidth);
1455+
if (sendCoinsWidget) sendCoinsWidget->setMinimumWidth(actionWidth);
1456+
if (masternodeWidget) masternodeWidget->setMinimumWidth(actionWidth);
1457+
}
14571458
}

src/qt/forms/sendcoinsentry.ui

+46-7
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
</item>
222222
</layout>
223223
</item>
224-
<item row="4" column="0">
224+
<item row="6" column="0">
225225
<widget class="QLabel" name="messageLabel">
226226
<property name="text">
227227
<string>Message:</string>
@@ -231,15 +231,54 @@
231231
</property>
232232
</widget>
233233
</item>
234-
<item row="4" column="1">
235-
<widget class="QLabel" name="messageTextLabel">
234+
<item row="6" column="1">
235+
<widget class="QLineEdit" name="messageTextLabel">
236236
<property name="toolTip">
237-
<string>A message that was attached to the firo: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Firo network.</string>
237+
<string>Optional message for this transaction</string>
238238
</property>
239-
<property name="textFormat">
240-
<enum>Qt::PlainText</enum>
239+
</widget>
240+
</item>
241+
<item row="7" column="1">
242+
<layout class="QHBoxLayout" name="horizontalLayoutWarning" stretch="0,1">
243+
<property name="spacing">
244+
<number>0</number>
241245
</property>
242-
</widget>
246+
<item>
247+
<widget class="QLabel" name="iconMessageWarning">
248+
<property name="toolTip">
249+
<string></string>
250+
</property>
251+
<property name="text">
252+
<string></string>
253+
</property>
254+
<property name="minimumWidth">
255+
5
256+
</property>
257+
<property name="minimumHeight">
258+
5
259+
</property>
260+
<property name="fixedWidth">
261+
10
262+
</property>
263+
<property name="fixedHeight">
264+
10
265+
</property>
266+
<property name="styleSheet">
267+
<string>margin-left:-30px;margin-right:-10px;margin-top:2px;</string>
268+
</property>
269+
</widget>
270+
</item>
271+
<item>
272+
<widget class="QLabel" name="messageWarning">
273+
<property name="text">
274+
<string></string>
275+
</property>
276+
<property name="styleSheet">
277+
<string>color: #FFA800; margin-left:-10px;</string>
278+
</property>
279+
</widget>
280+
</item>
281+
</layout>
243282
</item>
244283
<item row="5" column="0" colspan="2">
245284
<widget class="Line" name="line">

src/qt/sendcoinsdialog.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,18 @@ void SendCoinsDialog::on_sendButton_clicked()
511511
QString questionString = tr("Are you sure you want to send?");
512512
questionString.append(warningMessage);
513513
questionString.append("<br /><br />%1");
514+
bool firstMessage = true;
515+
for (const auto& rec : recipients) {
516+
if (!rec.message.isEmpty()) {
517+
if (firstMessage) {
518+
questionString.append("<hr><b>" + tr("Messages") + ":</b><br>");
519+
firstMessage = false;
520+
}
521+
QString sanitizedMsg = GUIUtil::HtmlEscape(rec.message, true);
522+
questionString.append("" + sanitizedMsg + "<br>");
523+
}
524+
}
525+
514526
double txSize;
515527
if ((fAnonymousMode == false) && (recipients.size() == sparkAddressCount) && spark::IsSparkAllowed())
516528
{

0 commit comments

Comments
 (0)