lprof can be built on Windows with Visual Studio. IF you don't have Visual
Studio, you can download the fully functional Visual Studio 9 2008 Express
Edition from:
   http://www.microsoft.com/express/ .

Both the express edition and the driver development kit (see below) come as ISO
images. If you'd rather not waste two DVDs, install a virtual CD tool like
MagicISO:
   http://www.magiciso.com/tutorials/miso-magicdisc-overview.htm
and use it to mount the DVD images and insall from them.




You'll need a recent CMake; grab a snapshot build from cmake.org


You'll need the Windows Driver Development Kit:
   http://www.microsoft.com/whdc/devtools/ddk/default.mspx
You can get away without installing the 16 bit libraries or any of the IA64
stuff but the defaults are quite OK.


You'll need the libtiff and libjpeg sources:

   http://www.ijg.org/files/jpegsrc.v6b.tar.gz
   ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.zip

( most compression tools will handle .tar.gz files; if yours doesn't install
7-zip from http://www.7-zip.org/ )



You'll need a binary build of the libusb (driver version, NOT filter driver
version) from libusb-win32.sf.net .


Finally, you'll need Qt version 4.3.3 or newer from TrollTech. Download the
win32 sources (not the binary version) and unzip them.  Open a Visual Studio
2008 Command Prompt and cd to the unpacked Qt source directory. Now, to configure Qt
run:

   configure -fast -shared -debug-and-release -platform win32-msvc2005

then:

   nmake

If you're not going to be doing any debug builds, use -release instead of
-debug-and-release to save a huge amount of disk space and about half the
compile time.

Now wait a very long time until the Qt build finishes. There's no need to "install" it.





TODO:

- Document installing zlib binary
- Document libjpeg, libtiff compilation



To compile lprof, make a folder called "lprof-build" at the same level as the
lprof source folder. Now open a Visual Studio environment window or use your
existing one and cd to the lprof-build folder. The following commands will then
build lprof, assuming that the location of the various libraries you've
installed is how they're shown below.

TODO: decent explanation, provide a simple .cmd file, etc.

set PATH=C:\Developer\Qt\4.3.3-vc9\bin;%PATH%
set TIFFDIR=C:\Developer\vc\tiff-3.8.2\libtiff
set JPEGDIR=C:\Developer\vc\jpeg
set ZLIBDIR=C:\Developer\zlib123-dll
set USBDIR=C:\developer\libusb-win32-device
cmake -G "Visual Studio 9 2008" -DCMAKE_INCLUDE_PATH=%ZLIBDIR%\include;%TIFFDIR%;%JPEGDIR%;%USBDIR%\include -DCMAKE_LIBRARY_PATH=%ZLIBDIR%\lib;%TIFFDIR%;%JPEGDIR%;%USBDIR%\lib\msvc -DTIFF_NAMES=libtiff -DZLIB_NAMES=zdll ..\lprof-qt4


If cmake runs successfully you should be able to open the generated project
file and run a build. If you build the "INSTALL" target the files will be
copied to C:\Program Files\lprof and will be almost ready to use. All you need
to do now is to copy the zlib dll, libusb dll, and the Qt DLLs to the
C:\program files\lprof folder.

(HENG) 
LProf currently has some very specific expectations about the directory structure of 
the installation directory.  It currently expects this to look like a unix prefix 
(where <prefix> is c:\Program Files\LProf by default) since it uses the same 
logic on Windows as on unix like platforms to find things like help files, tempate 
files and translation files.  That is it assumes that it is installed in 

<prefix>\bin

and looks for things in:

<prefix>\share\lprof...

A while back the OS/X code for this was alatered so that it was more "Mac like" and
perhaps at some point we should do this for Windows as well.  The flip side is that
there is already some NSIS configuration files in the root of the source tree that 
with only minor tweaks should work with the cmake build and it is setup to create
the correct directory structure in <prefix>. 

One other option for dealing with this is to start including these files as resources
in the executable.  It would make this bigger but it might simplify some of the issues
related to managing these files.
(/HENG)


Before you can use lprof for video calibration with a hardware colorimeter you
must install a libusb driver for your device. This isn't required for scanner
calibation, for rough monitor adjustment, or for monitor calibration using supplied
measurement files.

TODO: Document how to install win32 libusb driver (amazingly not that painful)

(HENG) This and other information is documented (at least there is a start) in the 
LProf help system in the "Windows Specific Information" section.  This not only covers 
LibUSB-Win32 but has information on the LibUSB-Win32 filter driver and installing 
specific devices.  It also has a Vid Pid table for the supported devices so that users 
can confirm that they are working with the correct device when they make driver changes.
(/HENG) 
