While trying to get the cairo (and pimp) PHP binding ready to be released, I finally sit down and port Wez build cscript to cairo. It still needs some cleanup, a nice summary message but it works already. I tested it with Visual C++ Express Edition but it should work with other versions as well.
My next goal is to add the tests (nmake tests) and fix the nmake install.
To use it, you need to create a directory structure similar to:
c:\ cairo
`-- cairo-1.2.4 `-- windows `-- cairo.def `-- buildconf.bat `-- conf.bat `-- cairo_build `-- include `-- lib
Where “cairo-1.2.4” what the release archives, extract a recent release and add the missing directory and files:
- windows directory, it contains all development files required to compile cairo with png, ps, pdf, freetype2 and win32 support
- buildconf.bat, generates the configure.js script
- conf.bat, convenient batch to call the configure script, modify it to fit your wishes
Run “buildconf.bat” only once or if you changed the scripts, it is the equivalent of buildconf/autogen on Unix.
Call configure using cscript:
C:\cairobuild\cairo-1.2.4>cscript /nologo configure.js --help ..Display the configure help..
Or use the conf.bat batch file.
You can fetch a complete Cairo 1.2.4 package here. The cairo_build contents is available here.
By default, the configure script tries to enable everything (w32, pdf or ps surface, ft2 support). You can disable each backend or option using —disable-backendname
options (—disable-pdf to disable the PDF surface).
If you like to define additional paths for the libraries or includes, use the with-extra-includes and with-extra-libs. These options accept absolute path and will automatically add them. To change the location of the default “cairo_build” directory, use the with-cairo-build option.
Here is a nice screenshot 
These scripts are the very first versions, they seem to work well for me. But don’t run away if you have many errors or if they don’t work at all. Leave me a comment or mail me.
I’m not sure if they should be available from the cairo site right now, they still require some tweaks. However, if some of you like to have them or to contribute/help/take the hand, let me know, I can put them in some public cvs/svn. Comments, contributions welcome 
UPDATE 11/09
I fixed a possible issue with PDF and PS support, it should work way better now. The cairo_build_windows archive has been updated and a decent freetype2 is now included (from gnuwin32). The build system has been tested with VC++ Express and VC.net 2003. Also a configure.bat is now included, it is a simple “alias” for “cscript /nologo configure.js “. You can call it just like any real configure.
An VC7+ example project is available here. it uses the windows clock (from Writser Cleveringa) and store it as a PNG. It does not have any animation or fancy windows, I was too lazy to make it work. However this sample project gives all required details to use your fresh compiled cairo on windows. The second part is about using the PDF backend. The basket demo snippet is used.
Update 13/09
All backends work now, a dedicated page has been created and will be kept uptodate with the cairo git repository: cairo-win32. Results:
Downloads: