Skip to content

How to build Beam desktop UI

Anatol Sevastsyan edited this page Sep 16, 2023 · 24 revisions

Before build

  1. Ensure that you have git installed
  2. beam-ui and beam project use CMake to generate build environment. The minimal supported version of CMake is 3.13
  3. Download and install boost library. The minimal supported version is 1.66
  4. Download and install OpenSSL library
  5. Download and install Qt library. Recommended version is 5.15.2

Common part

  1. Clone Beam UI sources before building and cd to the checked out folder

    sudo apt-get install git
    git clone https://github.com/BeamMW/beam-ui.git
    cd beam-ui
    
  2. If you wish to build desktop UI for the specific version/release you should check out it first.

    git checkout <branch-name>
    

    <branch-name> could be any branch, tag or commit after release double_doppler_4.2. For example, if you switch to the testnet branch on beam repository you build testnet version of the wallet's UI.

  3. This project has Beam as a submodule, so, update it too.

    git submodule update --init --recursive
    

Note about version

The version of beam-ui consists from two parts:

  1. Version of beam library it was built with
  2. Sequential number of the commit in beam-ui repository. For example, you checked out beam-ui repository master branch and this branch has 2794 commits, also you pulled beam submodule and it has version 5.0.8732, in this case beam-ui has version 5.0.8732.2794.

Windows

  1. Install Visual Studio >= 2017 with CMake support.
  2. Download and install Boost prebuilt binaries https://sourceforge.net/projects/boost/files/boost-binaries/1.68.0/boost_1_68_0-msvc-14.1-64.exe, also add BOOST_ROOT to the Environment Variables.
  3. Download and install OpenSSL prebuilt binaries https://slproweb.com/products/Win32OpenSSL.html (Win64 OpenSSL v1.1.0h for example) and add OPENSSL_ROOT_DIR to the Environment Variables.
  4. Download Qt Online installer https://download.qt.io/official_releases/online_installers/qt-unified-windows-x64-online.exe and install Qt 5.15.2 with WebEngine component. Then add QT5_ROOT_DIR to the Environment Variables (usually it looks like .../5.15.2/msvc2019_64), also add QML_IMPORT_PATH (it should look like %QT5_ROOT_DIR%\qml). BTW disabling system antivirus on Windows makes QT installing process much faster.
  5. Add .../qt515/5.15.2/msvc2019_64/bin and .../boost_1_68_0/lib64-msvc-14.2 to the System Path.
  6. Open project folder in Visual Studio, select your target (Release-x64 for example, if you downloaded 64bit Boost and OpenSSL) and select CMake -> Build All.
  7. Go to CMake -> Cache -> Open Cache Folder -> beam (you'll find binaries in ui/...).

Linux

  1. After finishing your build you'll find tBeamWallet (GUI wallet) in the beam-ui/ui folder.
  2. Server instructions result only in a valid build and enable you running all the CLI tools. They are not intended to ensure that you would be able to run the UI. Desktop build instructions include additional steps to ensure that the UI can be launched.

Ubuntu 18.04

Instructions below are valid for a clean default Ubuntu 18.04.03 Desktop & Server LTS installation. If your're building on an aged system please check that steps 1, 2 & 4 do not overwrite/conflict with more recent versions of cmake, boost & qt that might have been installed before. You can omit cmake/boost/qt installation if you already have more recent versions.

  1. Install dependencies

    sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo add-apt-repository ppa:mhier/libboost-latest
    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get install g++-9 libssl-dev curl wget git make 
    sudo apt-get install libgl1-mesa-dev zlib1g-dev libboost1.67-dev
    sudo apt-get install qt515base qt515declarative qt515svg qt515tools qt515webengine
    
  2. Install cmake

    wget https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh
    sudo sh ./cmake-3.13.0-Linux-x86_64.sh --skip-license --prefix=/usr
    
  3. Go to the Beam UI project folder and start the release build

    export PATH=/opt/qt515/bin:$PATH && export CC=gcc-9 && export CXX=g++-9
    cmake -DCMAKE_BUILD_TYPE=Release -DBEAM_USE_STATIC_QT=FALSE -DBEAM_HW_WALLET=Off && make -j4
    
  4. To be able to run the UI (BeamWallet) install additional dependencies

    sudo apt-get install qt515quick* qt515graphicaleffects
    

Ubuntu 19.10

Instructions below are valid for a minimal Ubuntu 19.10 Desktop & Server installation.

  1. Install dependencies

    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get install g++ git make cmake libboost-all-dev zlib1g-dev
    sudo apt-get install libssl-dev qtbase5-dev qtdeclarative5-dev 
    sudo apt-get install libqt5svg5-dev qttools5-dev qt5-default
    
  2. Go to the Beam project folder and start the release build

    cmake -DCMAKE_BUILD_TYPE=Release . && make -j4
    
  3. To be able not only to build but also to run the UI (BeamWallet) you need to install additional dependencies

    sudo apt-get install qml-module-qt*
    

CentOS 8

Instructions below are valid for a clean CentOS 8.0-1905 minimal install. If your're building on an aged install please check that step 2 does not overwrite more recent version of cmake that might have been installed before.

  1. Install dependencies

    sudo dnf update
    sudo dnf config-manager --set-enabled PowerTools
    sudo dnf install git make cmake gcc-c++ libstdc++-static boost-devel 
    sudo dnf install openssl-devel tar wget qt5-qtbase-devel qt5-linguist
    sudo dnf install qt5-qtsvg-devel qt5-qtdeclarative-devel 
    
  2. Install cmake

    wget https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh
    sudo sh ./cmake-3.13.0-Linux-x86_64.sh --skip-license --prefix=/usr
    
  3. Go to the beam sources folder and start the release build

    export PATH=${PATH}:/usr/lib64/qt5/bin
    cmake -DCMAKE_BUILD_TYPE=Release . && make -j4
    

Fedora 34 & 35

Instructions below are valid for a default Fedora 31-1.9 Workstation & Server installations.

  1. Install dependencies

    sudo dnf update && shutdown -r now
    sudo dnf install git make cmake gcc-c++ libstdc++-static boost-devel 
    sudo dnf install zlib-devel openssl-devel tar qt5-qtbase-devel qt5-linguist
    sudo dnf install qt5-qtsvg-devel qt5-qtdeclarative-devel
    sudo dnf install qt5-qtwebengine-devel 
    
  2. Go to the Beam project folder and start the release build

    cmake -DCMAKE_BUILD_TYPE=Release . && make -j4
    
  3. To be able to run the UI (BeamWallet) install additional dependencies

    sudo dnf install qt5-qtquickcontrols qt5-qtquickcontrols2
    

Mac

  1. Install Brew Package Manager.
  2. Install necessary packages using:
    brew install openssl cmake
    
  3. Remove any existing brew installations of qt and boost:
    brew uninstall --ignore-dependencies qt boost
    
  4. Download and install a compatible version of boost:
    curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/5da5895add2f6b9320d654dd844d4827f6876c8b/Formula/boost.rb
    brew install ./boost.rb
    
  5. Download and install QT5.15 from the official website https://www.qt.io/
  6. Set your Environment Variables by using the following:
    - export OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1"
    - export PATH=/Users/<username>/Qt5.15.2/5.15.2/clang_64/bin:$PATH
    - export QT5_ROOT_DIR=/Users/<username>/Qt5.15.2/5.15.2/
    - export QML_IMPORT_PATH="/Users/<username>/Qt5.15.2/5.15.2/qml"
    
  7. Go to Beam project folder and call
    cmake -DCMAKE_BUILD_TYPE=Release . && make -j4
    
  8. Use cpack to get .dmg file
  9. You'll find binaries in beam-ui/uisubfolder.