Blame win32/vs9/README.txt

Packit a4058c
Note that all this is rather experimental.
Packit a4058c

Packit a4058c
Please do not build this package in a path that contains spaces to avoid
Packit a4058c
possible problems during the build or during the usage of the library.
Packit a4058c

Packit a4058c
Please refer to the following GNOME Live! page for more detailed
Packit a4058c
instructions on building GDK-Pixbuf and its dependencies with Visual C++:
Packit a4058c

Packit a4058c
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
Packit a4058c

Packit a4058c
This VS9 solution and the projects it includes are intented to be used
Packit a4058c
in a GDK-Pixbuf source tree unpacked from a tarball. In a git checkout you
Packit a4058c
first need to use some Unix-like environment or manual work to expand
Packit a4058c
the .in files needed, mainly config.h.win32.in into config.h.win32.
Packit a4058c
You will also need to expand gdk-pixbuf.vcprojin here into
Packit a4058c
gdk-pixbuf.vcproj.
Packit a4058c

Packit a4058c
Two variants of the library are supported here for compilation-one
Packit a4058c
that makes use of native GDI+ APIs (The Debug/Release configurations)
Packit a4058c
and another that does not use GDI+ (those that use external third
Packit a4058c
party image manipulation libraries, the Debug_NoGDIP/Release_NoGDIP
Packit a4058c
configurations).  Note that both variants require LibPNG and ZLib, and
Packit a4058c
both variants have the image loaders built into the main GDK-Pixbuf library.
Packit a4058c

Packit a4058c
If one wants to build additional GDK-Pixbuf image loaders/modules that are
Packit a4058c
not included in the main GDK-Pixbuf library, such as the one included in
Packit a4058c
librsvg, he/she needs to place the compiled loader DLL (preferably built
Packit a4058c
with Visual C++ 2008) into the following location:
Packit a4058c
<parent_folder_of_the_GDK-Pixbuf_DLL>\lib\gdk-pixbuf-2.0\2.10.0\loaders\
Packit a4058c
and run the gdk-pixbuf-query-loaders utility to generate a loaders.cache
Packit a4058c
file in <parent_folder_of_the_GDK-Pixbuf_DLL>\lib\gdk-pixbuf-2.0\2.10.0.
Packit a4058c

Packit a4058c
The dependencies for this package are gettext-runtime (libintl), GLib*
Packit a4058c
ZLib and LibPNG at the minimum.  Note that if you intend to build GDK-Pixbuf
Packit a4058c
that does not use GDI+, you will also need the IJG JPEG libraries, libTIFF and
Packit a4058c
libjasper (for JPEG-2000 operations).
Packit a4058c

Packit a4058c
Please note that the Visual Studio project files will typically link to the
Packit a4058c
latest stable release of LibPNG which the GDK-Pixbuf codebase supports by
Packit a4058c
default.  If you intend to use and link to an older version of LibPNG, you
Packit a4058c
may change the "Additional Dependencies" setting accordingly (such as changing
Packit a4058c
from libpng16.lib to libpng14.lib) for the GDK-Pixbuf project.  The minimum
Packit a4058c
supported release series for LibPNG is 1.0.x at this time of writing.
Packit a4058c

Packit a4058c
For the Dependencies, you may either:
Packit a4058c

Packit a4058c
a) look for all of the dependencies (except GLib*, libjasper) under
Packit a4058c

Packit a4058c
   http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ (32-bit) -OR-
Packit a4058c
   http://ftp.gnome.org/pub/GNOME/binaries/win64/dependencies/ (64-bit)
Packit a4058c

Packit a4058c
   Please use the latest versions of these libraries that are available there,
Packit a4058c
   these are packaged by Tor Lillqvist, which are built with MinGW/GCC.
Packit a4058c
   Please see b) below regarding the build of libjasper and GLib*
Packit a4058c

Packit a4058c
   Note for LibPNG, version 1.6.x is needed.
Packit a4058c

Packit a4058c
-OR-
Packit a4058c

Packit a4058c
b) Build them yourself with VS9 (but you may most probably wish to get
Packit a4058c
   gettext-runtime from the URL(s) mentioned in a)).  Use the latest
Packit a4058c
   stable versions for them (you may need to get the latest unstable version of
Packit a4058c
   GLib if you are using an unstable version of GDK-Pixbuf):
Packit a4058c

Packit a4058c
   GLib*:   Grab the latest sources from http://www.gtk.org under "Download"
Packit a4058c
            (stable only-please make a search for the latest unstable versions)
Packit a4058c
   IJG JPEG: http://www.ijg.org/
Packit a4058c
   LibPNG: http://www.libpng.org/pub/png/libpng.html (1.6.x is needed here)
Packit a4058c
   LibTIFF: http://www.remotesensing.org/libtiff/
Packit a4058c
   LibJasper: http://www.ece.uvic.ca/~mdadams/jasper/
Packit a4058c
   ZLib:   http://www.zlib.net
Packit a4058c

Packit a4058c
   The above 6 packages all have supported mechanisms (Makefiles and/or Project
Packit a4058c
   Files) for building under VS9 (upgrade the Project Files from earlier VS
Packit a4058c
   versions will do for these, when applicable).  It is recommended that ZLib
Packit a4058c
   is built using the win32/Makefile.msc makefile with VS9 with the ASM routines
Packit a4058c
   to avoid linking problems (copy zdll.lib to zlib1.lib[Release] or to zlib1d.lib
Packit a4058c
   [Debug] after completion of compilation)-see win32/Makefile.msc in ZLib for
Packit a4058c
   more details.
Packit a4058c

Packit a4058c
* This GLib refers to a build that is built by VS9
Packit a4058c

Packit a4058c
Set up the source tree as follows under some arbitrary top
Packit a4058c
folder <root>:
Packit a4058c

Packit a4058c
<root>\gdk-pixbuf\<this-gdk-pixbuf-source-tree>
Packit a4058c
<root>\vs9\<PlatformName>
Packit a4058c

Packit a4058c
*this* file you are now reading is thus located at
Packit a4058c
<root>\gdk-pixbuf\<this-gdk-pixbuf-source-tree>\win32\vs9\README.
Packit a4058c

Packit a4058c
<PlatformName> is either Win32 or x64, as in VS9 project files.
Packit a4058c

Packit a4058c
You should unpack the <dependent-package>-dev and <dependent-packge> (runtime)
Packit a4058c
into <root>\vs9\<PlatformName>, if you download any of the packages from
Packit a4058c

Packit a4058c
http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ (32-bit) -OR-
Packit a4058c
http://ftp.gnome.org/pub/GNOME/binaries/win64/dependencies/ (64-bit)
Packit a4058c

Packit a4058c
so that for instance libintl.h end up at 
Packit a4058c
<root>\vs9\<PlatformName>\include\libintl.h.
Packit a4058c

Packit a4058c
If you build any of the dependencies yourselves, copy the: 
Packit a4058c
-DLLs and EXEs into <root>\vs9\<PlatformName>\bin
Packit a4058c
-headers into <root>\vs9\<PlatformName>\include\
Packit a4058c
-LIBs into <root>\vs9\<PlatformName>\lib
Packit a4058c

Packit a4058c
If you have not built GLib with VS9 and placed the LIBs and headers in a
Packit a4058c
place where VS9 can find them automatically, you should also uncompress
Packit a4058c
your GLib sources in <root>\ and build it from there, following the
Packit a4058c
instructions in <root>\glib<-version>\win32\vs9, so that the required
Packit a4058c
headers, EXEs, DLLs and LIBs will end up in
Packit a4058c
<root>\vs9\<PlatformName>\include\glib-2.0 (headers)
Packit a4058c
<root>\vs9\<PlatformName>\lib (LIBs, also glib-2.0/include/glibconfig.h)
Packit a4058c
<root>\vs9\<PlatformName>\bin (EXEs/DLLs)
Packit a4058c
respectively.
Packit a4058c

Packit a4058c
After the build of GDK-Pixbuf, the "install" project will copy build results
Packit a4058c
and headers into their appropriate location under <root>\vs9\<PlatformName>.
Packit a4058c
For instance, built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into
Packit a4058c
<root>\vs9\<PlatformName>\lib and GDK-Pixbuf headers into
Packit a4058c
<root>\vs9\<PlatformName>\include\GDKPixbuf-2.0. This is then from where
Packit a4058c
project files higher in the stack are supposed to look for them, not
Packit a4058c
from a specific GDK-Pixbuf source tree.
Packit a4058c

Packit a4058c
There is now a "gdk-pixbuf-introspect" project that is used to build the
Packit a4058c
introspection files.  In order for this to work, check that the paths for
Packit a4058c
PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
Packit a4058c
system.  Note that it must be the same Python installation that was used to
Packit a4058c
build GObject-Introspection (G-I), and a complete G-I build/installation
Packit a4058c
needs to be found in <root>\vs9\<PlatformName>\.  Note also that this is not
Packit a4058c
built by default, so you will need to right-click on the project to build it,
Packit a4058c
which will build and "install" the other projects that are normally built, if
Packit a4058c
those were not yet built.  The introspection files that are built will be
Packit a4058c
"installed" to <root>\vs9\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
Packit a4058c
<root>\vs9\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
Packit a4058c
successful build.  for building this in a different configuration, therefore,
Packit a4058c
you will need to clean this project specifically and then rebuild.
Packit a4058c

Packit a4058c
--Chun-wei Fan <fanc999@yahoo.com.tw>
Packit a4058c
--(adapted from the GLib VS9 README.txt file originally written by Tor Lillqvist)