Debian / Ubuntu or other Linux systems
======================================

Configure Repository
--------------------

Install the AG Projects debian software signing key:

wget http://download.ag-projects.com/agp-debian-gpg.key
sudo apt-key add agp-debian-gpg.key

Add the appropriate repository to /etc/apt/sources.list, see:
http://projects.ag-projects.com/projects/documentation/wiki/Repositories


Note for Ubuntu users
---------------------

The "universe" repository needs to be enabled. See:
https://help.ubuntu.com/community/Repositories/Ubuntu


Update package list
-------------------

Update the list of available packages:

sudo apt-get update


Install Blink
-------------

sudo apt-get install blink


Manual Installation
-------------------

Retrieve and unpack the tar archive from:
http://download.ag-projects.com/Blink/Linux/

Install the runtime dependencies:

 * python (2.7)
 * python-application (>= 2.0.0)
 * python-cjson
 * python-eventlib
 * python-qt5 (>= 5.0)
 * python-twisted-core
 * python-sipsimple (>= 3.0.0)
 * python-zope.interface

After installing the above dependencies, install Blink system wide using:

python setup.py build_ext
sudo python setup.py install


Creating Debian Packages
------------------------

Install the building dependencies:

 * debhelper (>= 7)
 * python-all (>= 2.7, not 3)
 * python-qt5 (>= 5.0)
 * python-support
 * build-essential
 * python-all-dev
 * devscripts
 * libvncserver-dev (or libvncserver-devel)

Create a clean distribution file:

python setup.py sdist

Go to the ./dist directory and untar the file created at the step above.

Go to the newly created directory and type:

debuild

The .deb and related files are built in the upper directory.


Installation on Microsoft Windows
=================================

Step 1. Install dependencies
----------------------------

* Install PyQt4: pacman -S mingw-w64-i686-python2-pyqt5

NOTE: at the time of this writing binary packages weren't available due to some work
in progress, they can alternatively be built manually.


Step 1.1. Install libvncclient
------------------------------

The MSYS2 project does not provide a package for libvncclient, and since our
needs are pretty specific, we provide the source to build a package which just
install the client side VNC libraries.

* Install dependencies: patch
* Get the package code: darcs get http://devel.ag-projects.com/repositories/windows/mingw-w64-libvncclient
* Enter the directory and build+instal the package: cd mingw-w64-libvncclient && makepkg-mingw -cifL --nocheck --nosign
* In case the above command fails with an error run it again


Step 2. Build and run Blink
---------------------------

if [ -d blink-qt ]; then
        cd blink-qt
        darcs pull -a
else
        darcs get --set-scripts-executable http://devel.ag-projects.com/repositories/blink-qt
        cd blink-qt
fi
./build_inplace
./run