-
Notifications
You must be signed in to change notification settings - Fork 175
Building
The latest stable version of Armory is available in precompiled, GPG-signed binaries for Windows, Ubuntu/Debian, and Mac. You can download them from the releases page. Non-Debian-based Linux users will have to compile from source.
Compiling in Linux has proven to be quite easy. There are only a couple of dependencies, and they're all versionless, so there are no games you have to play with system library versions in order to get it to work.
- Install dependencies:
$ sudo apt-get install git build-essential automake autotools-dev autoconf pkg-config python-psutil libtool protobuf-compiler libprotobuf-dev swig python3-dev python3-pip libtool-bin $ pip install psutil, protobuf, cffi
- Clone the following libraries and build them:
- libbtc
- libwebsockets (disable SSL or use system library)
- Update and start submodules (
git submodule update --init --recursive
) - In the root folder, start the build process. Replace
/path/to/libwebsockets
and/path/to/libbtc
with the path to the folders you built each library in:$ ./autogen.sh $ ./configure --with-own-lws=/path/to/libwebsockets --with-own-libbtc=/path/to/libbtc $ mkdir build & cd build $ make -j4
- Build required python module:
$ cd c20p1305_cffi $ python3 c20p1305_cffi.py --libbtc_path=path/to/libbtc
- MSVC (Visual Studio Community): https://visualstudio.microsoft.com/downloads/
- MSYS2: ONLY DOWNLOAD the installer of MSYS2 from https://www.msys2.org/ and FOLLOW the setup instructions in the current document
- Python 3.12
- Git for Windows: https://gitforwindows.org/
As you will be exclusively using MSYS2 MINGW64, make sure you have opened that and not the UCRT/MSYS/CLANG terminal.
pacman -Syu
pacman -S autoconf automake libtoolize mingw-w64-x86_64-gcc mingw-w64-x86_64-libevent mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja git
Next, create a symlink for the cmake binary in order to use the cmake
command in MinGW64:
- Open command prompt and navigate to
<your MSYS2 installation path>\mingw64\bin
- Run
mklink make mingw32-make.exe
python -m venv .venv
.venv\Scripts\activate.bat
pip install pyside6 qtpy cffi pycapnp setuptools
Pick a single folder in which you will download all dependencies as well as BitcoinArmory's source. From there, clone and build the dependencies using MinGW64.
Note
Be sure to use a separate build
directory while building dependencies for LWS, Cap'n Proto, BitcoinArmory and c20p1305_cffi. That way you can always remove it for a clean reset if needed:
rm -r build
mkdir build
cd build
-
libbtc:
git clone https://github.com/libbtc/libbtc.git cd libbtc sh autogen.sh ./configure --disable-wallet --disable-tools --disable-net make
-
libwebsockets:
git clone https://github.com/warmcat/libwebsockets.git cd libwebsockets git checkout v4.3.3 mkdir build & cd build cmake -G Ninja -DLWS_WITH_SSL=OFF .. ninja
-
LMDB:
git clone https://github.com/LMDB/lmdb.git cd libraries/liblmdb make
-
Cap'n Proto:
git clone https://github.com/capnproto/capnproto.git cd capnproto git checkout v1.0.2 mkdir build & cd build cmake -G Ninja .. ninja
git clone https://github.com/goatpig/BitcoinArmory
cd BitcoinArmory
mkdir build & cd build
cmake -G Ninja ..
ninja
Warning
If you have cloned and built the dependencies to a folder that is NOT shared with BitcoinArmory, this will fail! In order to make it work, build BitcoinArmory using cmake -G Ninja .. -DTHIRD_PARTY_PATH=path/to/dependencies
.
- Clone the c20p1305_cffi repository and build the shim library:
If
git clone https://github.com/goatpig/c20p1305_cffi.git cd c20p1305_cffi mkdir build cd build cmake -G Ninja .. ninja
cmake
cannot find BitcoinArmory, you can specify it using-DARMORY_PATH=path/to/BitcoinArmory
. - Using the Windows Terminal, navigate to
c20p1305_cffi/build/src
and build the definition library:This will generatecd src lib.exe" /MACHINE:x64 /def:libc20p1305deps.def
libc20p1305deps.dll
. - Still inside the Windows Terminal, build the CFFI package from within
c20p1305_cc/cffi
:This will generatecd ../../cffi python c20p1305_cffi.py --armory_path=path/to/BitcoinArmory --libbtc_path=path/to/libbtc
c20p1305.cp<your-python-version>-win_amd64.pyd
. IfBitcoinArmory
andlibbtc
share the same parent directory asc20p1305_cffi
, you can omit both path arguments. - Copy both
libc20p1305deps.dll
andc20p1305.cp3XX-win_amd64.pyd
toBitcoinArmory/armoryengine
.
Warning
The instructions below may be outdated and will be updated in time.
To build Armory on Mac OS X, you can follow the instructions found here: https://github.com/goatpig/BitcoinArmory/blob/master/osxbuild/OSX_build_notes.md