Skip to content

Build Instructions

Sztergbaum Roman edited this page Apr 7, 2021 · 40 revisions

How do I build atomicdex-desktop?

Prerequisites

Install Requirements

Install Qt Windows

# Could also be pip3 depending of your python installation
pip install aqtinstall
python -m aqt install -O C:\/Qt 5.15.2 windows desktop win64_msvc2019_64 -b https://qt-mirror.dannhauer.de/ -m qtcharts qtwidgets debug_info qtwebview qtwebengine

Install Qt Linux

# Could also be pip3 depending of your python installation
pip install aqtinstall
python3 -m aqt install -O $HOME/Qt 5.15.2 linux desktop -b https://qt-mirror.dannhauer.de/ -m qtcharts qtwidgets debug_info qtwebengine qtwebview

Install Qt MacOS

# Could also be pip3 depending of your python installation
pip install aqtinstall
python3 -m aqt install -O $HOME/Qt 5.15.2 mac desktop -b https://qt-mirror.dannhauer.de/ -m qtcharts qtwidgets debug_info qtwebview qtwebengine

Install Windows requirements

In your powershell (as admin) execute:

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop install llvm --global
scoop install ninja --global
scoop install cmake@3.18.4 --global
scoop install git --global
scoop install 7zip  --global
  • Next, add a QT_INSTALL_CMAKE_PATH environment variable pointing to the msvc_2019x64 location

e.g.: $Env:QT_INSTALL_CMAKE_PATH = "C:\Qt\5.15.0\msvc2019_64"

  • Then, also add a QT_ROOT environment variable pointing to the Qt root folder location

e.g.: $Env:QT_ROOT = "C:\Qt"

We advice to set it permanently through the environment variable manager on windows.

Install macOS requirements

Ensure you have brew and the macOS command line tools installed.

brew installautoconf \
            automake \
            libtool \
            pkgconfig \
            wget \
            ninja \
            gnu-sed \
            coreutils \
            gnu-getopt

Installing OSX SDK's (optional if you want to build for older systems):

git clone https://github.com/phracker/MacOSX-SDKs.git ~/MacOSX-SDKs

Installing wally:

git clone https://github.com/KomodoPlatform/libwally-core.git
cd libwally-core
./tools/autogen.sh
./configure --disable-shared
sudo make -j2 install

Add the following environment variables to your ~/.bashrc or ~/.zshrc profile:

  • QT_INSTALL_CMAKE_PATH equal to the CMake QT path
  • QT_ROOT equal to the QT root installation folder

e.g.:

export QT_INSTALL_CMAKE_PATH=/Users/SatoshiNakamoto/Qt/5.15.2/clang_64/lib/cmake
export QT_ROOT=/Users/SatoshiNakamoto/Qt/5.15.2

Install Linux dependencies

In your terminal (shell,...) execute:

sudo apt-get install build-essential \
                    libgl1-mesa-dev \
                    ninja-build \
                    curl \
                    wget \
                    zstd \
                    software-properties-common \
                    lsb-release \
                    libpulse-dev \
                    libtool \
                    autoconf \
                    unzip \
                    libssl-dev \
                    libxkbcommon-x11-0 \
                    libxcb-icccm4 \
                    libxcb-image0 \
                    libxcb1-dev \
                    libxcb-keysyms1-dev \
                    libxcb-render-util0-dev \
                    libxcb-xinerama0 \
                    libgstreamer-plugins-base1.0-dev \
                    git -y

# get llvm
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 12

# set clang version
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 777
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 777
sudo apt-get update
sudo apt-get install libc++abi-12-dev libc++-12-dev -y

# Add the following environment variables to your `~/.bashrc` or `~/.zshrc` profiles:

export CXXFLAGS=-stdlib=libc++
export LDFLAGS=-stdlib=libc++
export CXX=clang++-12
export CC=clang-12

git clone https://github.com/KomodoPlatform/libwally-core.git
cd libwally-core
./tools/autogen.sh
./configure --disable-shared
sudo make -j2 install

Add the following environment variables to your ~/.bashrc or ~/.zshrc profiles:

  • QT_INSTALL_CMAKE_PATH equal to the CMake QT path
  • QT_ROOT equal to the QT root installation folder

e.g.:

export QT_INSTALL_CMAKE_PATH=~/Qt/5.15.0/gcc/lib/cmake
export QT_ROOT=~/Qt/5.15.0

Build AtomicDEX Desktop

Please clone with submodules initialization: git clone --recurse-submodules https://github.com/KomodoPlatform/atomicDEX-Desktop.git

Install vcpkg from within the ci_tools_atomic_dex folder:

cd vcpkg-repo
# Windows
.\bootstrap-vcpkg.bat
# Linux / OSX
./bootstrap-vcpkg.sh

Instructions

In your Powershell command prompt, from within the ci_tools_atomic_dex folder, type:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ../ # add -GNinja if you are on windows
cmake --build . --config Release --target atomicdex-desktop

Bundle AtomicDEX desktop

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -GNinja ../
ninja install