Instructions to get Friture running
===================================

Most of Friture code-base is written in Python. As such, it is interpreted and does not need compilation, apart from the special cases below.

UI and resource files
---------------------
If friture.ui or resource.qrc are changed, the corresponding python files need to be rebuilt:
	pyuic4 ui/friture.ui > friture/ui_friture.py
	pyuic4 ui/settings.ui > friture/ui_settings.py
	pyrcc4 resources/friture.qrc -o friture/friture_rc.py

Cython extension
----------------
Friture uses Cython extensions where computing is a bottleneck. These extensions can be built automatically with:
	python setup.py build_ext --inplace
Alternatively, to build the 'exp_smoothing_conv' extension manually on Linux, you can do:
	cython exp_smoothing_conv.pyx
	gcc -shared -pthread -fPIC -fwrapv -O2 -Wall -fno-strict-aliasing -I/usr/include/python2.6 -o exp_smoothing_conv.so exp_smoothing_conv.c

Filters parameters
------------------
The filters parameters are precomputed in a file called 'generated_filters.py'. To rebuild this file,
run the script named 'filter_design.py'.

Windows executable
------------------
To build an executable for Windows, with the python interpreter included, run:
	python setup.py py2exe
You get a 'dist' directory with friture.exe and a collection of dependencies (dlls and compiled python extensions), that can be
bundled together in an installer.

PyQwt
-----
In some cases (old versions in distribution repository), you may want to build PyQwt from source.
In ubuntu, this can be done this way:
	First:
		sudo ln -s libqwt-qt4.so libqwt.so
	Then, in the pyqwt configure subdirectory (for ubuntu lucid lynx):
		python configure.py -Q ../qwt-5.2 -4 --module-install-path=/usr/lib/pymodules/python2.6/PyQt4/Qwt5
		make
		sudo make install
Or, alternatively :
	sudo apt-get build-dep python-qwt5-qt4
	sudo apt-get -b source python-qwt5-qt4
	sudo dpkg -i *.deb
