Ansifilter installation instructions
------------------------------------

Ansifilter is a small utility without external dependencies.
There are no configuration files or libs to take care of.

1. Compilation and installation
===============================

1.1 Linux
-----------

 1. tar xjvf ansifilter-x.x.tar.bz2

 2. cd ansifilter-x.x

 3. make help

 4. make
    make gui             (build the Qt GUI (requires Qt 4/5))

 5. make install         (install binary and documentation files)
    make install-gui     (install GUI binary)
    (depending on your installation destination, you need to be root)

 6. make clean (optional)
 
1.2 Windows
-----------

Install the following tools and libraries.

a) Install Qt Creator IDE (www.qt.io)

b) Install MingW (gcc toolchain)

    -Download Online-Installer: 
     https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/
    -Start mingw-w64-install.exe and select default options
    -Add bin directory of the downloaded files to the system PATH
    -open cmd.exe and type "g++ --version" to check

c) Compile Qt:

    -Download and extract package from qt.io:
     https://www.qt.io/download-open-source/ -> qt-everywhere-opensource-src-5.6.0.tar.gz
    -Open cmd.exe and change into the Qt directory
    -Configure Qt. Use static if you do not want to ship Qt DLLs:
     configure -release -nomake examples -opensource -static -strip -opengl desktop
    -Compile Qt:
     mingw32-make -j4

d) Add compiler and Qt paths (location of qmake.exe) in QtCreator

e) Install upx from http://upx.sourceforge.net/

f) Open the pro files in src/w32-projects and src/gui_qt in QtCreator and 
   adjust the paths of libraries and tools before compiling the projects. 

g) Ship Ansifilter with libgcc_s_dw2-1.dll (32 bit) libgcc_s_seh-1.dll (64 bit) libstdc++-6.dll libwinpthread-1.dll
   (all DLLs are located in the mingw32 installation)
 
 
2. Known compiler issues
========================

Ansifilter was tested with gcc > 4.8 and clang 3.9.0. It will not compile with gcc 2.x.
For gcc versions < 4.7, unique_ptr needs to be replaced by auto_ptr.
