doc: consistently use ```sh tags for correct shell highlighting

This commit is contained in:
AJ ONeal 2024-07-16 15:32:03 -06:00
parent 3c198e01b8
commit 185e0fa1e8
No known key found for this signature in database
GPG Key ID: F1D692A76F70CF98

View File

@ -9,15 +9,17 @@ Note
Always use absolute paths to configure and compile Dash Core and the dependencies.
For example, when specifying the path of the dependency:
```sh
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
```
Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures
Here `BDB_PREFIX` must be an absolute path - it is defined using $(pwd) which ensures
the usage of the absolute path.
To Build
---------------------
```bash
```sh
./autogen.sh
./configure
make
@ -59,7 +61,9 @@ memory available when compiling Dash Core. On systems with less, gcc can be
tuned to conserve memory with additional CXXFLAGS:
```sh
./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768"
```
## Linux Distribution Specific Instructions
@ -70,11 +74,15 @@ tuned to conserve memory with additional CXXFLAGS:
Build requirements:
```sh
sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils bison python3
```
Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
```sh
sudo apt-get install libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev
```
Berkeley DB is required for the wallet.
@ -87,21 +95,29 @@ Otherwise, you can build Berkeley DB [yourself](#berkeley-db).
SQLite is required for the wallet:
```sh
sudo apt-get install libsqlite3-dev
```
To build Dash Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode)
Optional port mapping libraries (see: `--with-miniupnpc` and `--with-natpmp`):
```sh
sudo apt-get install libminiupnpc-dev libnatpmp-dev
```
ZMQ dependencies (provides ZMQ API):
```sh
sudo apt-get install libzmq3-dev
```
GMP dependencies (provides platform-optimized routines):
```sh
sudo apt-get install libgmp-dev
```
GUI dependencies:
@ -111,15 +127,21 @@ To build without GUI pass `--without-gui`.
To build with Qt 5 you need the following:
```sh
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools
```
Additionally, to support Wayland protocol for modern desktop environments:
```sh
sudo apt-get install qtwayland5
```
libqrencode (optional) can be installed with:
```sh
sudo apt-get install libqrencode-dev
```
Once these are installed, they will be found by configure and a dash-qt executable will be
built by default.
@ -131,15 +153,21 @@ built by default.
Build requirements:
```sh
sudo dnf install gcc-c++ libtool make autoconf automake python3
```
Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
```sh
sudo dnf install libevent-devel boost-devel
```
Berkeley DB is required for the wallet:
```sh
sudo dnf install libdb4-devel libdb4-cxx-devel
```
Newer Fedora releases, since Fedora 33, have only `libdb-devel` and `libdb-cxx-devel` packages, but these will install
Berkeley DB 5.3 or later. This will break binary wallet compatibility with the distributed executables, which
@ -150,21 +178,29 @@ Otherwise, you can build Berkeley DB [yourself](#berkeley-db).
SQLite is required for the wallet:
```sh
sudo dnf install sqlite-devel
```
To build Dash Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode)
Optional port mapping libraries (see: `--with-miniupnpc` and `--with-natpmp`):
```sh
sudo dnf install miniupnpc-devel libnatpmp-devel
```
ZMQ dependencies (provides ZMQ API):
```sh
sudo dnf install zeromq-devel
```
GMP dependencies (provides platform-optimized routines):
```sh
sudo dnf install gmp-devel
```
GUI dependencies:
@ -174,15 +210,21 @@ To build without GUI pass `--without-gui`.
To build with Qt 5 you need the following:
```sh
sudo dnf install qt5-qttools-devel qt5-qtbase-devel
```
Additionally, to support Wayland protocol for modern desktop environments:
```sh
sudo dnf install qt5-qtwayland
```
libqrencode (optional) can be installed with:
```sh
sudo dnf install qrencode-devel
```
Once these are installed, they will be found by configure and a dash-qt executable will be
built by default.
@ -213,7 +255,7 @@ 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/](contrib/install_db4.sh)
like so:
```shell
```sh
./contrib/install_db4.sh `pwd`
```
@ -293,19 +335,23 @@ Additional Configure Flags
--------------------------
A list of additional configure flags can be displayed with:
```sh
./configure --help
```
Setup and Build Example: Arch Linux
-----------------------------------
This example lists the steps necessary to setup and build a command line only, non-wallet distribution of the latest changes on Arch Linux:
```sh
pacman -S git base-devel boost libevent python
git clone https://github.com/dashpay/dash.git
cd dash/
./autogen.sh
./configure --disable-wallet --without-gui --without-miniupnpc
make check
```
Note:
Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`,