1
0
Fork 0
forked from lthn/blockchain
Secure. Scalable. Easy to Use
Find a file
Snider 4a5c5ae742 Refactor build presets and Makefile targets
Updated CMakePresets.json to add 'testnet' and 'mainnet' workflows, removed unused Windows preset, and improved environment and cache variable handling. Makefile targets for testnet and mainnet workflows were added, and Conan-related targets were renamed for consistency. Added a function to reset ConanPresets.json in CleanBuild.cmake and fixed the path for GetConan.cmake in conan_provider.cmake. Deleted obsolete .idea/cmake.xml.
2025-10-09 03:10:46 +01:00
.github Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
.idea Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
cmake Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
contrib Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
docs@12e20efce7 Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
resources Replace image with rounded shape 2023-01-18 15:13:49 +01:00
snap snap: fixed run on strict confinement (#213) 2020-09-05 22:23:02 +02:00
src Lower min build version for hardforks 05 and 06 2025-10-05 21:10:34 +01:00
tests Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
utils Build Simplification (#24) 2025-10-06 22:38:29 +01:00
.clang-format disabled aliases registration fee checks for testnet 2022-12-16 15:38:49 +01:00
.dockerignore Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
.gitattributes Moved sources to public repo 2018-12-27 18:50:45 +03:00
.gitignore Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
.gitmodules Dev 12 documentation overhaul (#13) 2025-09-25 16:04:33 +01:00
CMakeLists.txt Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
CMakePresets.json Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
conanfile.py Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
ConanPresets.json Add CMake and Conan presets, update build config (#26) 2025-10-09 00:25:29 +01:00
docker-compose.yml Testnet updates (#22) 2025-10-05 14:00:36 +01:00
LICENSE.txt Testnet 1 (#15) 2025-09-30 16:48:13 +01:00
Makefile Refactor build presets and Makefile targets 2025-10-09 03:10:46 +01:00
README.md GitHub Build Workflows (#7) 2025-08-30 17:46:00 +01:00

Coverity Scan Discord

Cloning

Be sure to clone the repository properly:
$ git clone --recursive https://github.com/hyle-team/zano.git

Building


Dependencies

component / version minimum
(not recommended but may work)
recommended most recent of what we have ever tested
gcc (Linux) 8.4.0 9.4.0 12.3.0
llvm/clang (Linux) UNKNOWN 7.0.1 8.0.0
MSVC (Windows) 2017 (15.9.30) 2022 (17.11.5) 2022 (17.12.3)
XCode (macOS) 12.3 14.3 15.2
CMake 3.26.3 3.26.3 3.31.6
Boost 1.75 1.84 1.84
OpenSSL (win) 1.1.1n 1.1.1w 3.4
Qt (only for GUI) 6.8.3 6.8.3 6.8.3

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.


Linux

Recommended OS versions: Ubuntu 20.04, 22.04 LTS.

  1. Prerequisites

    [server version]

    sudo apt-get install -y build-essential g++ curl autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev libssl-dev bzip2
    

    [GUI version]

    sudo apt-get install -y build-essential g++ python-dev autotools-dev libicu-dev libbz2-dev cmake git screen checkinstall zlib1g-dev libssl-dev bzip2 mesa-common-dev libglu1-mesa-dev
    

    Make sure you have correct versions installed (see 'Dependencies' section above):

    cmake --version && gcc --version
    
  2. Clone Zano into a local folder
    (If for some reason you need to use alternative Zano branch, change 'master' to the required branch name.)

    git clone --recursive https://github.com/hyle-team/zano.git -b master
    

    In the following steps we assume that you cloned Zano into '~/zano' folder in your home directory.

    1. Download and build Boost
      (Assuming you have cloned Zano into the 'zano' folder. If you used a different location for Zano, edit line 4 accordingly.)

      curl -OL https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.bz2
      echo "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454  boost_1_84_0.tar.bz2" | shasum -c && tar -xjf boost_1_84_0.tar.bz2
      rm boost_1_84_0.tar.bz2 && cd boost_1_84_0
      ./bootstrap.sh --with-libraries=system,filesystem,thread,date_time,chrono,regex,serialization,atomic,program_options,locale,timer,log
      ./b2 && cd ..
      

      Make sure that you see "The Boost C++ Libraries were successfully built!" message at the end.

      1. Install Qt
        (GUI version only, skip this step if you're building server version)

        [GUI version]

        curl -L -O https://download.qt.io/official_releases/online_installers/qt-online-installer-linux-x64-online.run && 
        chmod u+x qt-online-installer-linux-x64-online.run
        ./qt-online-installer-linux-x64-online.run \
        --accept-licenses \
        --default-answer \
        --confirm-command install \
        qt.qt6.683.linux_gcc_64 \
        qt.qt6.683.addons.qt5compat.linux_gcc_64 \
        qt.qt6.683.addons.qtpositioning.linux_gcc_64 \
        qt.qt6.683.addons.qtwebchannel.linux_gcc_64 \
        qt.qt6.683.addons.qtwebsockets.linux_gcc_64 \
        qt.qt6.683.addons.qtwebengine.linux_gcc_64 \
        qt.qt6.683.addons.qtwebview.linux_gcc_64
        

        This will download the online installer and perform an unattended installation with the Chromium-based WebEngine

  3. Install OpenSSL

    We recommend installing OpenSSL v1.1.1w locally unless you would like to use the same version system-wide.
    (Assuming that $HOME environment variable is set to your home directory. Otherwise, edit line 4 accordingly.)

    curl -OL https://www.openssl.org/source/openssl-1.1.1w.tar.gz
    echo "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8  openssl-1.1.1w.tar.gz" | shasum -c && tar xaf openssl-1.1.1w.tar.gz 
    cd openssl-1.1.1w/
    ./config --prefix=$HOME/openssl --openssldir=$HOME/openssl shared zlib
    make && make test && make install && cd ..
    
  4. [OPTIONAL] Set global environment variables for convenient use
    For instance, by adding the following lines to ~/.bashrc

    [server version]

    export BOOST_ROOT=/home/user/boost_1_84_0  
    export OPENSSL_ROOT_DIR=/home/user/openssl
    

    [GUI version]

    export BOOST_ROOT=/home/user/boost_1_84_0
    export OPENSSL_ROOT_DIR=/home/user/openssl  
    export QT_PREFIX_PATH=/home/user/Qt5.11.2/5.11.2/gcc_64
    

    NOTICE: Please edit the lines above according to your actual paths.

    NOTICE 2: Make sure you've restarted your terminal session (by reopening the terminal window or reconnecting the server) to apply these changes.

  5. Build the binaries

    1. If you skipped step 6 and did not set the environment variables:

      cd zano && mkdir build && cd build
      BOOST_ROOT=$HOME/boost_1_84_0 OPENSSL_ROOT_DIR=$HOME/openssl cmake ..
      make -j1 daemon simplewallet
      
    2. If you set the variables in step 6:

      cd zano && mkdir build && cd build
      cmake ..
      make -j1 daemon simplewallet
      

      or simply:

      cd zano && make -j1
      

      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.

      NOTICE 2: If you'd like to build binaries for the testnet, use cmake -D TESTNET=TRUE .. instead of cmake .. .

    3. Build GUI:

      cd zano
      utils/build_script_linux.sh
      

    Look for the binaries in build folder


Windows

Recommended OS version: Windows 7 x64, Windows 11 x64.

  1. Install required prerequisites (Boost, Qt, CMake, OpenSSL).
  2. Edit paths in utils/configure_local_paths.cmd.
  3. Run one of utils/configure_win64_msvsNNNN_gui.cmd according to your MSVC version.
  4. Go to the build folder and open generated Zano.sln in MSVC.
  5. Build.

In order to correctly deploy Qt GUI application, you also need to do the following:

  1. Run PATH_TO_QT\bin\windeployqt.exe PATH_TO_PROJECT_ROOT\build\src\Debug\Zano.exe (choose the Debug or Release folder depending on the configuration you built).
  2. You can now run the application using one of the following options:
    • Start the program from Visual Studio
    • Run Zano.exe --html-path=PATH_TO_HTML, where PATH_TO_HTML is by default located at PATH_TO_PROJECT_ROOT\src\gui\qt-daemon\layout\html
    • Copy the contents of PATH_TO_PROJECT_ROOT\src\gui\qt-daemon\layout\html to a folder named "html" located in the same directory as the Zano.exe binary.

macOS

Recommended OS version: macOS Big Sur 11.4 x64.

  1. Install required prerequisites.
  2. Set environment variables as stated in utils/macosx_build_config.command.
  3. mkdir build
    cd build
    cmake ..
    make

To build GUI application:

  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".
    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".
  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


Supporting project/donations

ZANO @dev
BTC bc1qpa8w8eaehlplfepmnzpd7v9j046899nktxnkxp
BCH qqgq078vww5exd9kt3frx6krdyznmp80hcygzlgqzd
ETH 0x206c52b78141498e74FF074301ea90888C40c178
XMR 45gp9WTobeB5Km3kLQgVmPJkvm9rSmg4gdyHheXqXijXYMjUY48kLgL7QEz5Ar8z9vQioQ68WYDKsQsjAEonSeFX4UeLSiX