### Get submodules

If you got this source from a Git repository then before you can build you must get the repositores submodules:

```sh
git submodule update --init
```

If you downloaded the source from an archive then the submodules are already included.

### GNU/Linux build steps

If you are running a Debian-based system (Ubuntu, Linux Mint, etc.) then run the following command to install Signet's build dependencies

```sh
./build-dependencies.sh
```

If you are not on a Debian based system, build or install the equivalent libraries for Qt5 (with Websockets and x11extras), zlib, libX11, and libgcrypt.

To build simply run qmake and then make:

```sh
qmake client/client.pro CONFIG+=release
make
```

To install:

```sh
sudo make install
```

If you want to run the executable from the current directory instead of
installing it to your path, you can do so, but you will need a udev rule
before the signet software will see the hardware. To do so:

```sh
sudo cp signet-base/signetdev/host/linux/50-signet.rules /etc/udev/rules.d
```

### Mac OS build steps

To install Signet's build dependencies first install [Brew](https://brew.sh)

Once you have Brew, run:

	$ brew install qt5 libgcrypt libgpg-error zlib

To build Signet run:

	$ /usr/local/opt/qt5/bin/qmake client/client.pro CONFIG+=release
	$ make

The build will create a `signet.app` folder that you can move or copy anywhere. For example:

	$ cp -r signet.app ~/Desktop

### Windows build steps

First install [MSYS2](http://www.msys2.org). MSYS2 will provide a build environment and a package manager to download Signet's dependencies. Once MSYS2 is installed, launch the MSYS2/MinGW-64 shell and run:

	$ pacman -S mingw-w64-x86_64-gcc mingw64-w64-x86_64-make
	$ pacman -S mingw-w64-x86_64-qt5-static mingw-w64-x86_64-zlib mingw-w64-x86_64-libgcrypt
	$ pacman -S mingw-w64-x86_64-jasper mingw-w64-x86_64-openssl
	$ pacman -S mingw-w64-x86_64-dbus mingw-w64-x86_64-libwebp

Now you can build:

	$ export PATH=/mingw64/qt5-static/bin:$PATH
	$ qmake client/client.pro CONFIG+=release
	$ mingw32-make

This will build `Signet.exe` in the `release` subdirectory. This executable should be self contained and you can copy it anywhere and run it.
