Skip to content

Building and using bitmonero qt

Neozaru edited this page Jun 25, 2014 · 6 revisions

Building

Dependencies

bitmonero-qt uses Qt SDK and Qt Quick 2 plugin. You will need Qt development packages.

Example in Arch distribution : sudo pacman -S qt5

Example in Debian-based distribution : sudo apt-get install qt5-default qttools5-dev-tools qtdeclarative5-dev qml-module-qt*

You will also need a recent version of Monero Core, because bitmonero-qt relies on it. You can find code and build instructions here : https://github.com/monero-project/bitmonero

Building

If you meet all dependencies, a single qmake && make should be enough.

git clone https://github.com/Neozaru/bitmonero-qt.git
cd bitmonero-qt
qmake
make

Compiled binary will be placed in $BUILDDIR/app/bitmonero-qt

[Advanced] Building with LibMoneroWallet

LibMoneroWallet is an experimental C++ wrapper. Its main goal is to provide an easy interface for creating and managing wallets, using a shared C++ library. As LibMoneroWallet is not part of official bitmonero project (it may be integrated in the future if accepted by the community), you will have to compile a custom version of bitmonero : https://github.com/Neozaru/bitmonero/tree/wallet_wrapper

After compiling, you will find libmonerowallet.so in build/release/src. You can install it manually (from bitmonero directory, as root) :

cp build/release/src/libmonerowallet.so /usr/lib
mkdir /usr/include/MoneroWallet && cp src/monero_wallet_wrapper/*.hh /usr/include/MoneroWallet/

... or you can go in build/release/src folder and perform sudo make install

(I haven't tested it on Windows, but I guess that libmonerowallet will have a .dll extension)

Once you have added libmonerowallet dependency in your system, you have to configure bitmonero-qt for enabling libmonerowallet library.

qmake "CONFIG += libMoneroWallet"
make

Usage

bitmonero-qt uses Monero Core's bitmonerod (daemon) and simplewallet binaries. It spawn them as subprocesses and establishes Json-RPC connections with them.

In order to let bitmonero-qt find the required binaries, you have to put or link bitmonerod and simplewallet in one of the following locations :

  • The same directory as bitmonero-qt executable.
  • /usr/bin/ (Linux)
  • $HOME/.bitmonero-qt/ (all platforms)

Make sure that no instance of bitmonerod is already running, since bitmonero-qt will spawn it for you. Then simply execute bitmonero-qt (or bitmonero-qt.exe)

Using already-running bitmonerod

You may want to use bitmonero-qt while managing bitmonerod daemon by yourself. Simply put this line in $HOME/bitmonero-qt/bitmonero-qt.conf :

spawn_daemon=false

When loading, bitmonero-qt will not create a bitmonerod subprocess and will attempt to get an RPC connection with the already-running bitmonerod. It uses port 18081 by default. You can change this behavior in $HOME/bitmonero-qt/bitmonero-qt.conf :

daemon_uri=localhost
daemon_port=18081

Using custom bitmonerod and simplewallet location

Following options are available in $HOME/bitmonero-qt/bitmonero-qt.conf :

daemon_program=/usr/local/bin/bitmonerod
wallet_program=/usr/local/bin/simplewallet

[Advanced] Working without simplewallet RPC

A recent change in bitmonero-qt allows you to integrate the wallet logic into bitmonero-qt, avoiding dependencies with simplewallet CLI. Your bitmonero-qt have to be compiled with LibMoneroWallet (more info in [building] section above). To enable this feature, change or create wallet_interface option in $HOME/bitmonero-qt/bitmonero-qt.conf :

wallet_interface=LibMonero
wallet_handler_interface=LibMonero

You can also remove all simplewallet related configurations.

/!\ Remember that bitmonero-qt, still relies on bitmonerd daemon.