2019-11-02 00:18:49 +01:00
[](https://scan.coverity.com/projects/zanoproject)
2020-02-11 18:02:10 +01:00
[](https://discord.gg/wE3rmYY)
2019-11-02 00:18:49 +01:00
2021-06-03 16:02:15 +03:00
## Cloning
2018-12-27 18:50:45 +03:00
2021-06-03 16:02:15 +03:00
Be sure to clone the repository properly:\
`$ git clone --recursive https://github.com/hyle-team/zano.git`
2019-05-01 22:45:02 +00:00
2021-06-03 16:02:15 +03:00
# Building
--------
2019-05-01 22:45:02 +00:00
2018-12-27 18:50:45 +03:00
### Dependencies
| component / version | minimum < br > (not recommended but may work) | recommended | most recent of what we have ever tested |
|--|--|--|--|
2021-06-03 16:02:15 +03:00
| gcc (Linux) | 5.4.0 | 7.4.0 | 8.3.0 |
2019-05-01 19:28:12 +00:00
| llvm/clang (Linux) | UNKNOWN | 7.0.1 | 8.0.0 |
2021-06-03 16:02:15 +03:00
| [MSVC ](https://visualstudio.microsoft.com/downloads/ ) (Windows) | 2015 (14.0 update 1) | 2017 (15.9.0) | 2019 |
| [XCode ](https://developer.apple.com/downloads/ ) (macOS) | 9.2 | 12.3 | 12.3 |
2021-06-17 13:38:16 +03:00
| [CMake ](https://cmake.org/download/ ) | 2.8.6 | 3.15.5 | 3.20 |
2022-04-14 20:19:58 +02:00
| [Boost ](https://www.boost.org/users/download/ ) | 1.70 | 1.70 | 1.76 |
| [OpenSSL ](https://www.openssl.org/source/ ) | - | 1.1.1n | 1.1.1n |
2021-06-17 13:38:16 +03:00
| [Qt ](https://download.qt.io/archive/qt/ ) (*only for GUI*) | 5.8.0 | 5.11.2 | 5.15.2 |
2018-12-27 18:50:45 +03:00
2021-06-03 16:21:00 +03:00
Note:\
[*server version*] denotes steps required for building command-line tools (daemon, simplewallet, etc.).\
[*GUI version*] denotes steps required for building Zano executable with GUI.
< br / >
2018-12-27 18:50:45 +03:00
### Linux
2019-03-05 03:20:28 +00:00
2020-02-19 17:31:12 +03:00
Recommended OS version: Ubuntu 18.04 LTS.
1. Prerequisites
2021-06-03 16:02:15 +03:00
[*server version*]
sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen
2020-02-19 17:55:00 +03:00
2021-06-03 16:02:15 +03:00
[*GUI version*]
2020-02-19 17:31:12 +03:00
2021-07-18 20:13:46 +03:00
sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen mesa-common-dev libglu1-mesa-dev
2020-02-19 17:31:12 +03:00
2020-02-19 17:55:00 +03:00
2. Download and build Boost
2020-02-19 17:31:12 +03:00
2022-04-14 20:19:58 +02:00
curl -OL https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2
tar -xjf boost_1_70_0.tar.bz2
cd boost_1_70_0
./bootstrap.sh --with-libraries=system,filesystem,thread,date_time,chrono,regex,serialization,atomic,program_options,locale,timer,log
2020-02-19 17:55:00 +03:00
./b2
2020-02-19 17:31:12 +03:00
2021-06-03 16:02:15 +03:00
3. Install Qt\
(*GUI version only, skip this step if you're building server version*)
[*GUI version*]
2020-02-19 17:55:00 +03:00
2022-04-14 20:19:58 +02:00
curl -OL https://download.qt.io/new_archive/qt/5.11/5.11.2/qt-opensource-linux-x64-5.11.2.run
2020-02-19 17:55:00 +03:00
chmod +x qt-opensource-linux-x64-5.11.2.run
./qt-opensource-linux-x64-5.11.2.run
2021-06-03 16:02:15 +03:00
Then follow the instructions in Wizard. Don't forget to tick the WebEngine module checkbox!
2022-04-14 20:19:58 +02:00
4. Install OpenSSL
We recommend installing OpenSSL v1.1.1 locally unless you would like to use the same version system-wide.
sudo apt install build-essential checkinstall zlib1g-dev -y
curl -OL https://www.openssl.org/source/openssl-1.1.1n.tar.gz
tar xaf openssl-1.1.1n.tar.gz
cd openssl-1.1.1n/
./config --prefix=/home/user/openssl --openssldir=/home/user/openssl shared zlib
make
make test
make install
5. Set environment variables properly\
2021-06-03 16:02:15 +03:00
For instance, by adding the following lines to `~/.bashrc`
[*server version*]
export BOOST_ROOT=/home/user/boost_1_68_0
2022-04-14 20:19:58 +02:00
export OPENSSL_ROOT_DIR=/home/user/openssl
2021-06-03 16:02:15 +03:00
[*GUI version*]
2020-02-19 17:31:12 +03:00
2022-04-14 20:19:58 +02:00
export BOOST_ROOT=/home/user/boost_1_68_0
export OPENSSL_ROOT_DIR=/home/user/openssl
2020-02-19 17:31:12 +03:00
export QT_PREFIX_PATH=/home/user/Qt5.11.2/5.11.2/gcc_64
2021-06-03 16:02:15 +03:00
2022-04-14 20:19:58 +02:00
6. Building binaries
2020-02-19 17:55:00 +03:00
1. Building daemon and simplewallet:
cd zano/ & & make -j1
or
2020-02-19 17:31:12 +03:00
2020-02-19 17:55:00 +03:00
cd zano & & mkdir build & & cd build
cmake ..
make -j1 daemon simplewallet
2021-06-03 16:02:15 +03:00
**NOTICE** : If you are building on a machine with a relatively high amount of RAM or with the proper setting of virtual memory, then you can use `-j2` or `-j` option to speed up the building process. Use with caution.
2021-07-29 03:28:41 +03:00
**NOTICE 2** : If you'd like to build binaries for the testnet, use `cmake -D TESTNET=TRUE ..` instead of `cmake ..` .
2020-02-19 17:55:00 +03:00
1. Building GUI:
cd zano
utils/build_sript_linux.sh
2020-02-19 17:31:12 +03:00
7. Look for the binaries in `build` folder
2018-12-27 18:50:45 +03:00
2021-06-03 16:21:00 +03:00
< br / >
2021-06-03 16:06:49 +03:00
2018-12-27 18:50:45 +03:00
### Windows
Recommended OS version: Windows 7 x64.
2022-04-14 20:19:58 +02:00
1. Install required prerequisites (Boost, Qt, CMake, OpenSSL).
2018-12-27 18:50:45 +03:00
2. Edit paths in `utils/configure_local_paths.cmd` .
2022-04-14 20:19:58 +02:00
3. Run one of `utils/configure_win64_msvsNNNN_gui.cmd` according to your MSVC version.
2018-12-27 18:50:45 +03:00
4. Go to the build folder and open generated Zano.sln in MSVC.
5. Build.
2021-06-03 16:02:15 +03:00
In order to correctly deploy Qt GUI application, you also need to do the following:
2021-06-03 16:21:00 +03:00
2018-12-27 18:50:45 +03:00
6. Copy Zano.exe to a folder (e.g. `depoy` ).
2021-06-03 16:21:00 +03:00
7. Run `PATH_TO_QT\bin\windeployqt.exe deploy\Zano.exe` .
2018-12-27 18:50:45 +03:00
8. Copy folder `\src\gui\qt-daemon\html` to `deploy\html` .
2021-06-03 16:21:00 +03:00
9. Now you can run `Zano.exe`
2018-12-27 18:50:45 +03:00
2021-06-03 16:21:00 +03:00
< br / >
2021-06-03 16:06:49 +03:00
2018-12-27 18:50:45 +03:00
### macOS
2022-04-14 20:19:58 +02:00
Recommended OS version: macOS Big Sur 11.4 x64.
2018-12-27 18:50:45 +03:00
1. Install required prerequisites.
2. Set environment variables as stated in `utils/macosx_build_config.command` .
3. `mkdir build` < br > `cd build` < br > `cmake ..` < br > `make`
To build GUI application:
2019-11-09 21:17:19 +01:00
1. Create self-signing certificate via Keychain Access:\
a. Run Keychain Access.\
b. Choose Keychain Access > Certificate Assistant > Create a Certificate.\
c. Use “Zano” (without quotes) as certificate name.\
d. Choose “Code Signing” in “Certificate Type” field.\
e. Press “Create”, then “Done”.\
f. Make sure the certificate was added to keychain "System". If not—move it to "System".\
g. Double click the certificate you've just added, enter the trust section and under "When using this certificate" select "Always trust".\
2021-06-03 16:02:15 +03:00
h. Unfold the certificate in Keychain Access window and double click the underlying private key "Zano". Select "Access Control" tab, then select "Allow all applications to access this item". Click "Save Changes".
2018-12-27 18:50:45 +03:00
2. Revise building script, comment out unwanted steps and run it: `utils/build_script_mac_osx.sh`
3. The application should be here: `/buid_mac_osx_64/release/src`
2020-02-19 17:31:12 +03:00