Introduction
This is a port of Wez PHP build cscript to cairo. I tested it with Visual C++ Express Edition and VC7 but it should work with other versions as well. There is many things to add to match the Unix build system, but it is already a good start.
The build system can compile Cairo with the Image, PDF, PS, SVG or Win32 backends, freetype2 and fontconfig support included. They are all enable by default if the underlying libs and includes have been detected.
The next main goal is to add the tests suite support (nmake tests) and create a release script (build a cairo.zip from a release).
Here is a nice screenshot (using cairo-1.2.4) :)
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 pierre dot php [at] gmail dot com.
Some example using cairo on windows
Usage
To use it, you need to create a directory structure similar to:
c:\ cairo
`-- cairo-1.2.5 `-- windows `-- cairo.def `-- buildconf.bat `-- conf.bat `-- cairo_build `-- include `-- lib
Where "cairo-1.2.5" is 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.5>cscript /nologo configure.js --help ..Display the configure help..
Or use the conf.bat batch file.
You can fetch a complete Cairo 1.2.5 package here (git 2006-12-09 snapshot + patch). The cairo_build contents is available here.
By default, the configure script tries to enable everything (w32, image, pdf or ps surface, ft2/fc support). You can disable
each backend or option using --disable-{backendname}
options (--disable-pdf to disable the PDF surface).
Use --enable-debug to have a debug lib.
If you need 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.
Downloads:
- Development libs and includes, cairo_build_windows.zip
- Cairo snapshot (2006/10/27) ready to use package, cairo-1.2.5-windows.zip
- Example VC7 project cairo_example_windows.zip
Changelog
2006/09/13
- Added SVG Support
