nip 7.10 source and documentation 
=================================

nip2 (new ip) is a user interface for the VIPS image processing library. 

If you've got a pre-built binary, try running nip2-7.10.x/bin/run-nip2.sh (on
unix) or nip2-7.10.x/bin/nip2.exe (on windows).

Dependencies
============

vips
----

You need version 7.10.0 or later. Download and install from:

	http://www.vips.ecs.soton.ac.uk

See the VIPS README for details.

gtk+-2.4.x
----------

nip2 needs gtk+-2.4.9 or later. If your system includes it, great. If not,
this can require a bit of effort to build and install.

gtk+-2.4.x needs a bunch of extra packages for the file browser to work well.

 shared-mime-info

this is thing from freedesktop.org that lets KDE and GNOME share information
about file MIME types ... the new file chooser uses it to let it display a
useful icon beside each filename

 hicolor-icon-theme
 gnome-icon-theme

strangely, you need to have both these icon themes installed

finally, you need to tell gtk which icon theme to use to render the file icons
... put this in your .gtkrc-2.0

 gtk-icon-theme-name = "gnome"

(some version of suse helpfully call this file .gtkrc-2.0-Default instead,
thank you SuSE)

have a close look at the file-open dialog in the nip2 screenshot, you should
be able to get all these icons appearing

 http://www.vips.ecs.soton.ac.uk/vips-7.9/snap6.jpg

So in sumamry, I'd install in this order:

 glib
 pango (you may have to install sub-stuff here, make sure at the end of
configure it says it has the FT2 backend working)
 atk
 gtk
 vips
 nip2
 shared-mime-info
 hicolor-icon-theme
 gnome-icon-theme

you can install all of them to some prefix of your choice, they don't have to
go into system areas. So I use /usr/local for all of them, but /home/john/vips
for vips and nip2.

EXCEPT ... if you find you have to update fontconfig/render/etc. as part of
the pango install. These are parts of your X system, and you need to actually
update that in place. You can't just install to /usr/local/ (as far as I
know).

other dependencies
------------------

flex
bison
	lex/yacc sort-of work too

intltool
	if you need to work with the i18n stuff

fftw2
	used to load and save wisdom if VIPS is using it

libxml2
	You need version 2.0 or later of libxml2.

	If necessary, download from:
	
		http://www.libxml.org

	or on Linux, install the libxml2-devel package from your distribution 
	CDs.

Building
========

*nix
----

Freebsd, gentoo and debian should be able to use ports/emerge/apt-get. Other
unixes will need to build from source. There are some (not very good) static
linux binaries on the VIPS website.

MSC toolchain
-------------

There are a set of makefiles and icons in nip-7.10.x/proj, no support though.

mac os x
--------

CFLAGS="-no-cpp-precomp" ./configure ...

regular builds
--------------

debug build with

CFLAGS="-g -Wall -DDEBUG_FATAL -DDEBUG_LEAK" ./configure --prefix=/home/john/vips

production build with

CFLAGS="-O2 -Wall -DG_DISABLE_CAST_CHECKS" ./configure --prefix=/home/john/vips

win32 laptop

CFLAGS="-mms-bitfields -Wall -O2 -g -DDEBUG_FATAL -DDEBUG_LEAK" ./configure --with-fftw-includes=/include --with-fftw-libraries=/lib

Static link
-----------

build all of gtk static:

% cd glib
% ./configure --enable-static
% cd pango
% ./configure --enable-static --with-included-modules=basic-fc
% cd atk
% ./configure --enable-static
% cd gtk+
% ./configure --enable-static --without-libtiff --disable-modules \
              --with-included-loaders=xpm,png

Edit src/Makefile, look for LDADD, and swap for something like:

LDADD = -pthread \
	-Wl,--export-dynamic -L/usr/X11R6/lib \
	/usr/local/lib/libgtk-x11-2.0.a \
	/usr/local/lib/libgdk-x11-2.0.a \
	/usr/local/lib/libatk-1.0.a \
	/usr/local/lib/libgdk_pixbuf-2.0.a \
	/usr/local/lib/libpangoxft-1.0.a \
	/usr/local/lib/libpangox-1.0.a \
	/usr/lib/libxml2.a \
	/home/john/vips/lib/libvips.a \
	/usr/lib/libMagick.a \
	/usr/lib/libexif.a \
	/usr/lib/libfreetype.a \
	-lXext \
	-lXt -lSM -lICE -lX11 -lpthread  \
	/usr/lib/libpng.a \
	/usr/lib/libtiff.a \
	-lz \
	/usr/lib/libjpeg.a \
	/usr/local/lib/libpangoft2-1.0.a \
	/usr/lib/libfontconfig.a \
	/usr/lib/libfreetype.a \
	/usr/lib/libexpat.a \
	/usr/local/lib/libpango-1.0.a \
	/usr/X11R6/lib/libXft.a \
	/usr/X11R6/lib/libXcursor.a \
	/usr/X11R6/lib/libXrender.a \
	/usr/X11R6/lib/libXinerama.a \
	/usr/X11R6/lib/libXrandr.a \
	/usr/local/lib/libgobject-2.0.a \
	/usr/lib/libdrfftw.a \
	/usr/lib/libdfftw.a \
	/usr/lib/liblcms.a \
	/usr/lib/libbz2.a \
	-lm \
	/usr/local/lib/libgmodule-2.0.a \
	-ldl \
	/usr/local/lib/libgthread-2.0.a \
	/usr/local/lib/libglib-2.0.a 

To test, try removing 

	/usr/local/etc/pango/pango.modules

and see if it still works

Disclaimer: No guarantees of performance accompany this software, nor is any
responsibility assumed on the part of the authors. Please read the licence
agreement.

