[gdk-pixbuf] build: Support introspection builds in MSVC projects



commit eeb17499a57cfc8a83355b1e64056c433088cf32
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Aug 25 18:12:41 2017 +0800

    build: Support introspection builds in MSVC projects
    
    This integrates the NMake Makefiles into the MSVC projects for building
    GDK-Pixbuf, to make the build process easier.  Note that the
    introspection files are not built by default, but must be explicitly
    built and cleaned.
    
    This will require a complete G-I build in $(GLibEtcInstallRoot) with the
    Python installation that was used to build G-I in order for this to
    work.
    
    Update the build documentation for the MSVC projects to reflect on this
    enhancement.

 win32/vs10/Makefile.am                        |    1 +
 win32/vs10/README.txt                         |   18 ++++-
 win32/vs10/gdk-pixbuf-build-defines.props     |   10 +++
 win32/vs10/gdk-pixbuf-introspect.vcxproj      |  103 +++++++++++++++++++++++++
 win32/vs10/gdk-pixbuf-version-paths.props.in  |    8 ++
 win32/vs10/gdk-pixbuf.sln                     |   10 +++
 win32/vs11/Makefile.am                        |    3 +-
 win32/vs12/Makefile.am                        |    3 +-
 win32/vs14/Makefile.am                        |    3 +-
 win32/vs15/Makefile.am                        |    3 +-
 win32/vs9/Makefile.am                         |    1 +
 win32/vs9/README.txt                          |   18 ++++-
 win32/vs9/gdk-pixbuf-build-defines.vsprops    |    8 ++
 win32/vs9/gdk-pixbuf-introspect.vcproj        |   76 ++++++++++++++++++
 win32/vs9/gdk-pixbuf-version-paths.vsprops.in |    8 ++
 win32/vs9/gdk-pixbuf.sln                      |   13 +++
 16 files changed, 278 insertions(+), 8 deletions(-)
---
diff --git a/win32/vs10/Makefile.am b/win32/vs10/Makefile.am
index ea7c92f..496757a 100644
--- a/win32/vs10/Makefile.am
+++ b/win32/vs10/Makefile.am
@@ -20,6 +20,7 @@ EXTRA_DIST = \
        gdk-pixbuf-pixdata.vcxproj.filters      \
        gdk-pixbuf-install.vcxproj      \
        gdk-pixbuf-install.vcxproj.filters      \
+       gdk-pixbuf-introspect.vcxproj   \
        $(GENERATED_ITEMS)
 
 gdk-pixbuf-install.props: $(top_srcdir)/win32/vs10/gdk-pixbuf-install.propsin gdk-pixbuf.vs10.headers
diff --git a/win32/vs10/README.txt b/win32/vs10/README.txt
index 677c723..df81e92 100644
--- a/win32/vs10/README.txt
+++ b/win32/vs10/README.txt
@@ -53,7 +53,7 @@ a) look for all of the dependencies (except GLib*, libjasper) under
    these are packaged by Tor Lillqvist, which are built with MinGW/GCC.
    Please see b) below regarding the build of libjasper and GLib*
 
-   Note for LibPNG, version 1.5.x is needed.
+   Note for LibPNG, version 1.6.x is needed.
 
 -OR-
 
@@ -65,7 +65,7 @@ b) Build them yourself with VS10 (but you may most probably wish to get
    GLib*:   Grab the latest sources from http://www.gtk.org under "Download"
             (stable only-please make a search for the latest unstable versions)
    IJG JPEG: http://www.ijg.org/
-   LibPNG: http://www.libpng.org/pub/png/libpng.html (1.5.x is needed here)
+   LibPNG: http://www.libpng.org/pub/png/libpng.html (1.6.x is needed here)
    LibTIFF: http://www.remotesensing.org/libtiff/
    LibJasper: http://www.ece.uvic.ca/~mdadams/jasper/
    ZLib:   http://www.zlib.net
@@ -123,5 +123,19 @@ For instance, built DLLs go into <root>\vs10\<PlatformName>\bin, built LIBs into
 project files higher in the stack are supposed to look for them, not
 from a specific GDK-Pixbuf source tree.
 
+There is now a "gdk-pixbuf-introspect" project that is used to build the
+introspection files.  In order for this to work, check that the paths for
+PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
+system.  Note that it must be the same Python installation that was used to
+build GObject-Introspection (G-I), and a complete G-I build/installation
+needs to be found in <root>\vs9\<PlatformName>\.  Note also that this is not
+built by default, so you will need to right-click on the project to build it,
+which will build and "install" the other projects that are normally built, if
+those were not yet built.  The introspection files that are built will be
+"installed" to <root>\vs9\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
+<root>\vs9\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
+successful build.  for building this in a different configuration, therefore,
+you will need to clean this project specifically and then rebuild.
+
 --Chun-wei Fan <fanc999 yahoo com tw>
 --(adapted from the GLib VS9 README.txt file originally written by Tor Lillqvist)
diff --git a/win32/vs10/gdk-pixbuf-build-defines.props b/win32/vs10/gdk-pixbuf-build-defines.props
index 2aad4a1..d36a600 100644
--- a/win32/vs10/gdk-pixbuf-build-defines.props
+++ b/win32/vs10/gdk-pixbuf-build-defines.props
@@ -15,6 +15,10 @@
     
<GdkPixbufDefines>HAVE_CONFIG_H;GDK_PIXBUF_COMPILATION;GDK_PIXBUF_ENABLE_BACKEND;DLL_EXPORT;GDK_PIXBUF_RELOCATABLE;$(GdkPixbufPrefixDefine);$(GdkPixbufBinVerDefine);$(MODULAR_MACROS)</GdkPixbufDefines>
     <GdipLibs>gdiplus.lib</GdipLibs>
     <ImagingLibs>jpeg.lib;libjasper.lib;libtiff_i.lib</ImagingLibs>
+    <GdkPixbufIntrospectNMakeCmd>cd ..
+set VCInstallDir=$(VCInstallDir)
+nmake -f gdk-pixbuf-introspection-msvc.mak CFG=$(Configuration) 
PREFIX=$(GlibEtcInstallRoot)</GdkPixbufIntrospectNMakeCmd>
+    
<GdkPixbufIntrospectBuiltFiles>$(SolutionDir)\..\GdkPixbuf-2.0.gir;$(SolutionDir)\..\GdkPixbuf-2.0.typelib</GdkPixbufIntrospectBuiltFiles>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>gdk-pixbufbuilddefinesprops</_PropertySheetDisplayName>
@@ -69,5 +73,11 @@
     <BuildMacro Include="ImagingLibs">
       <Value>$(ImagingLibs)</Value>
     </BuildMacro>
+    <BuildMacro Include="GdkPixbufIntrospectNMakeCmd">
+      <Value>$(GdkPixbufIntrospectNMakeCmd)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GdkPixbufIntrospectBuiltFiles">
+      <Value>$(GdkPixbufIntrospectBuiltFiles)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/win32/vs10/gdk-pixbuf-introspect.vcxproj b/win32/vs10/gdk-pixbuf-introspect.vcxproj
new file mode 100644
index 0000000..e55b9dd
--- /dev/null
+++ b/win32/vs10/gdk-pixbuf-introspect.vcxproj
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{4CB26FCC-45A3-4389-9474-258B5648B89D}</ProjectGuid>
+    <RootNamespace>gdkpixbufintrospect</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gdk-pixbuf-build-defines.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gdk-pixbuf-build-defines.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gdk-pixbuf-build-defines.props" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gdk-pixbuf-build-defines.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <NMakeBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
install-introspection</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) clean 
install-introspection</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
clean</NMakeCleanCommandLine>
+    <NMakeOutput>$(GdkPixbufIntrospectBuiltFiles)</NMakeOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <NMakeBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
install-introspection</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) clean 
install-introspection</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
clean</NMakeCleanCommandLine>
+    <NMakeOutput>$(GdkPixbufIntrospectBuiltFiles)</NMakeOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <NMakeBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
install-introspection</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean 
install-introspection</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
clean</NMakeCleanCommandLine>
+    <NMakeOutput>$(GdkPixbufIntrospectBuiltFiles)</NMakeOutput>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <NMakeBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
install-introspection</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean 
install-introspection</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
clean</NMakeCleanCommandLine>
+    <NMakeOutput>$(GdkPixbufIntrospectBuiltFiles)</NMakeOutput>
+  </PropertyGroup>
+  <ItemGroup>
+    <ProjectReference Include="gdk-pixbuf-install.vcxproj">
+      <Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7074fb}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/win32/vs10/gdk-pixbuf-version-paths.props.in b/win32/vs10/gdk-pixbuf-version-paths.props.in
index 1630edc..caf2049 100644
--- a/win32/vs10/gdk-pixbuf-version-paths.props.in
+++ b/win32/vs10/gdk-pixbuf-version-paths.props.in
@@ -21,6 +21,8 @@
     <PythonDir Condition="'$(VisualStudioVersion)' == '14.0'">c:\python36</PythonDir>
     <PythonDir Condition="'$(VisualStudioVersion)' == '15.0'">c:\python36</PythonDir>
     <PythonDirX64>$(PythonDir).x64</PythonDirX64>
+    <IntrospectPythonParam>PYTHON=$(PythonDir)\python.exe</IntrospectPythonParam>
+    <IntrospectPythonParamX64>PYTHON=$(PythonDirX64)\python.exe</IntrospectPythonParamX64>
   </PropertyGroup>
   <PropertyGroup>
     <_PropertySheetDisplayName>gdk-versionpathsprops</_PropertySheetDisplayName>
@@ -74,5 +76,11 @@
     <BuildMacro Include="PythonDirX64">
       <Value>$(PythonDirX64)</Value>
     </BuildMacro>
+    <BuildMacro Include="IntrospectPythonParam">
+      <Value>$(IntrospectPythonParam)</Value>
+    </BuildMacro>
+    <BuildMacro Include="IntrospectPythonParamX64">
+      <Value>$(IntrospectPythonParamX64)</Value>
+    </BuildMacro>
   </ItemGroup>
 </Project>
diff --git a/win32/vs10/gdk-pixbuf.sln b/win32/vs10/gdk-pixbuf.sln
index 6e7cd44..8daf676 100644
--- a/win32/vs10/gdk-pixbuf.sln
+++ b/win32/vs10/gdk-pixbuf.sln
@@ -11,6 +11,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-query-loaders",
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-pixdata", "gdk-pixbuf-pixdata.vcxproj", 
"{2AD2FF07-0514-41A8-8A32-920C744EA1A6}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-introspect", 
"gdk-pixbuf-introspect.vcxproj", "{4CB26FCC-45A3-4389-9474-258B5648B89D}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -103,6 +105,14 @@ Global
                {2AD2FF07-0514-41A8-8A32-920C744EA1A6}.Release_GDI+|Win32.Build.0 = Release|Win32
                {2AD2FF07-0514-41A8-8A32-920C744EA1A6}.Release_GDI+|x64.ActiveCfg = Release|x64
                {2AD2FF07-0514-41A8-8A32-920C744EA1A6}.Release_GDI+|x64.Build.0 = Release|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug|Win32.ActiveCfg = Debug|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug|x64.ActiveCfg = Debug|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug_GDI+|Win32.ActiveCfg = Debug|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug_GDI+|x64.ActiveCfg = Debug|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release|Win32.ActiveCfg = Release|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release|x64.ActiveCfg = Release|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release_GDI+|Win32.ActiveCfg = Release|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release_GDI+|x64.ActiveCfg = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
diff --git a/win32/vs11/Makefile.am b/win32/vs11/Makefile.am
index 08743e0..999d32d 100644
--- a/win32/vs11/Makefile.am
+++ b/win32/vs11/Makefile.am
@@ -14,7 +14,8 @@ EXTRA_DIST = \
        gdk-pixbuf-pixdata.vcxproj      \
        gdk-pixbuf-pixdata.vcxproj.filters      \
        gdk-pixbuf-install.vcxproj      \
-       gdk-pixbuf-install.vcxproj.filters
+       gdk-pixbuf-install.vcxproj.filters      \
+       gdk-pixbuf-introspect.vcxproj
 
 DISTCLEANFILES = $(EXTRA_DIST)
 
diff --git a/win32/vs12/Makefile.am b/win32/vs12/Makefile.am
index 8a36389..5ab939a 100644
--- a/win32/vs12/Makefile.am
+++ b/win32/vs12/Makefile.am
@@ -14,7 +14,8 @@ EXTRA_DIST = \
        gdk-pixbuf-pixdata.vcxproj      \
        gdk-pixbuf-pixdata.vcxproj.filters      \
        gdk-pixbuf-install.vcxproj              \
-       gdk-pixbuf-install.vcxproj.filters
+       gdk-pixbuf-install.vcxproj.filters      \
+       gdk-pixbuf-introspect.vcxproj
 
 DISTCLEANFILES = $(EXTRA_DIST)
 
diff --git a/win32/vs14/Makefile.am b/win32/vs14/Makefile.am
index 0738fec..46367e8 100644
--- a/win32/vs14/Makefile.am
+++ b/win32/vs14/Makefile.am
@@ -14,7 +14,8 @@ EXTRA_DIST = \
        gdk-pixbuf-pixdata.vcxproj      \
        gdk-pixbuf-pixdata.vcxproj.filters      \
        gdk-pixbuf-install.vcxproj              \
-       gdk-pixbuf-install.vcxproj.filters
+       gdk-pixbuf-install.vcxproj.filters      \
+       gdk-pixbuf-introspect.vcxproj
 
 DISTCLEANFILES = $(EXTRA_DIST)
 
diff --git a/win32/vs15/Makefile.am b/win32/vs15/Makefile.am
index 119935e..0bb2de4 100644
--- a/win32/vs15/Makefile.am
+++ b/win32/vs15/Makefile.am
@@ -14,7 +14,8 @@ EXTRA_DIST = \
        gdk-pixbuf-pixdata.vcxproj      \
        gdk-pixbuf-pixdata.vcxproj.filters      \
        gdk-pixbuf-install.vcxproj              \
-       gdk-pixbuf-install.vcxproj.filters
+       gdk-pixbuf-install.vcxproj.filters      \
+       gdk-pixbuf-introspect.vcxproj
 
 DISTCLEANFILES = $(EXTRA_DIST)
 
diff --git a/win32/vs9/Makefile.am b/win32/vs9/Makefile.am
index 66016c6..685dd1b 100644
--- a/win32/vs9/Makefile.am
+++ b/win32/vs9/Makefile.am
@@ -14,6 +14,7 @@ EXTRA_DIST =  \
        gdk-pixbuf-query-loaders.vcproj \
        gdk-pixbuf-pixdata.vcproj       \
        gdk-pixbuf-install.vcproj       \
+       gdk-pixbuf-introspect.vcproj    \
        $(GENERATED_ITEMS)
 
 gdk-pixbuf-install.vsprops: $(top_srcdir)/win32/vs9/gdk-pixbuf-install.vspropsin gdk-pixbuf.headers
diff --git a/win32/vs9/README.txt b/win32/vs9/README.txt
index 099d4e2..05544d2 100644
--- a/win32/vs9/README.txt
+++ b/win32/vs9/README.txt
@@ -53,7 +53,7 @@ a) look for all of the dependencies (except GLib*, libjasper) under
    these are packaged by Tor Lillqvist, which are built with MinGW/GCC.
    Please see b) below regarding the build of libjasper and GLib*
 
-   Note for LibPNG, version 1.5.x is needed.
+   Note for LibPNG, version 1.6.x is needed.
 
 -OR-
 
@@ -65,7 +65,7 @@ b) Build them yourself with VS9 (but you may most probably wish to get
    GLib*:   Grab the latest sources from http://www.gtk.org under "Download"
             (stable only-please make a search for the latest unstable versions)
    IJG JPEG: http://www.ijg.org/
-   LibPNG: http://www.libpng.org/pub/png/libpng.html (1.5.x is needed here)
+   LibPNG: http://www.libpng.org/pub/png/libpng.html (1.6.x is needed here)
    LibTIFF: http://www.remotesensing.org/libtiff/
    LibJasper: http://www.ece.uvic.ca/~mdadams/jasper/
    ZLib:   http://www.zlib.net
@@ -123,5 +123,19 @@ For instance, built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into
 project files higher in the stack are supposed to look for them, not
 from a specific GDK-Pixbuf source tree.
 
+There is now a "gdk-pixbuf-introspect" project that is used to build the
+introspection files.  In order for this to work, check that the paths for
+PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
+system.  Note that it must be the same Python installation that was used to
+build GObject-Introspection (G-I), and a complete G-I build/installation
+needs to be found in <root>\vs9\<PlatformName>\.  Note also that this is not
+built by default, so you will need to right-click on the project to build it,
+which will build and "install" the other projects that are normally built, if
+those were not yet built.  The introspection files that are built will be
+"installed" to <root>\vs9\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
+<root>\vs9\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
+successful build.  for building this in a different configuration, therefore,
+you will need to clean this project specifically and then rebuild.
+
 --Chun-wei Fan <fanc999 yahoo com tw>
 --(adapted from the GLib VS9 README.txt file originally written by Tor Lillqvist)
diff --git a/win32/vs9/gdk-pixbuf-build-defines.vsprops b/win32/vs9/gdk-pixbuf-build-defines.vsprops
index d69c575..0291a9f 100644
--- a/win32/vs9/gdk-pixbuf-build-defines.vsprops
+++ b/win32/vs9/gdk-pixbuf-build-defines.vsprops
@@ -64,4 +64,12 @@
                Name="ImagingLibs"
                Value="jpeg.lib libjasper.lib libtiff_i.lib"
        />
+       <UserMacro
+               Name="GdkPixbufIntrospectNMakeCmd"
+               Value="cd ..&#x0D;&#x0A;set VCInstallDir=$(VCInstallDir)&#x0D;&#x0A;nmake -f 
gdk-pixbuf-introspection-msvc.mak CFG=$(ConfigurationName) PREFIX=$(GlibEtcInstallRoot)"
+       />
+       <UserMacro
+               Name="GdkPixbufIntrospectBuiltFiles"
+               Value="$(SolutionDir)\..\GdkPixbuf-2.0.gir;$(SolutionDir)\..\GdkPixbuf-2.0.typelib"
+       />
 </VisualStudioPropertySheet>
diff --git a/win32/vs9/gdk-pixbuf-introspect.vcproj b/win32/vs9/gdk-pixbuf-introspect.vcproj
new file mode 100644
index 0000000..7aff1e2
--- /dev/null
+++ b/win32/vs9/gdk-pixbuf-introspect.vcproj
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="gdk-pixbuf-introspect"
+       ProjectGUID="{4CB26FCC-45A3-4389-9474-258B5648B89D}"
+       Keyword="MakeFileProj"
+       TargetFrameworkVersion="196613"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       ConfigurationType="0"
+                       InheritedPropertySheets=".\gdk-pixbuf-build-defines.vsprops"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
install-introspection"
+                               ReBuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
clean install-introspection"
+                               CleanCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
clean"
+                               Output="$(GdkPixbufIntrospectBuiltFiles)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       ConfigurationType="0"
+                       InheritedPropertySheets=".\gdk-pixbuf-build-defines.vsprops"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
install-introspection"
+                               ReBuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) 
$(IntrospectPythonParamX64) clean install-introspection"
+                               CleanCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
clean"
+                               Output="$(GdkPixbufIntrospectBuiltFiles)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       ConfigurationType="0"
+                       InheritedPropertySheets=".\gdk-pixbuf-build-defines.vsprops"
+                       CharacterSet="2"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
install-introspection"
+                               ReBuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
clean install-introspection"
+                               CleanCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParam) 
clean"
+                               Output="$(GdkPixbufIntrospectBuiltFiles)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       ConfigurationType="0"
+                       InheritedPropertySheets=".\gdk-pixbuf-build-defines.vsprops"
+                       >
+                       <Tool
+                               Name="VCNMakeTool"
+                               BuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
install-introspection"
+                               ReBuildCommandLine="$(GdkPixbufIntrospectNMakeCmd) 
$(IntrospectPythonParamX64) clean install-introspection"
+                               CleanCommandLine="$(GdkPixbufIntrospectNMakeCmd) $(IntrospectPythonParamX64) 
clean"
+                               Output="$(GdkPixbufIntrospectBuiltFiles)"
+                       />
+               </Configuration>
+       </Configurations>
+</VisualStudioProject>
diff --git a/win32/vs9/gdk-pixbuf-version-paths.vsprops.in b/win32/vs9/gdk-pixbuf-version-paths.vsprops.in
index dee2dbf..cc96ac8 100644
--- a/win32/vs9/gdk-pixbuf-version-paths.vsprops.in
+++ b/win32/vs9/gdk-pixbuf-version-paths.vsprops.in
@@ -70,4 +70,12 @@
                Name="PythonDirX64"
                Value="$(PythonDir).x64"
        />
+       <UserMacro
+               Name="IntrospectPythonParam"
+               Value="PYTHON=$(PythonDir)\python.exe"
+       />
+       <UserMacro
+               Name="IntrospectPythonParamX64"
+               Value="PYTHON=$(PythonDirX64)\python.exe"
+       />
 </VisualStudioPropertySheet>
diff --git a/win32/vs9/gdk-pixbuf.sln b/win32/vs9/gdk-pixbuf.sln
index 3fb3e06..fb6cbd3 100644
--- a/win32/vs9/gdk-pixbuf.sln
+++ b/win32/vs9/gdk-pixbuf.sln
@@ -26,6 +26,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-pixdata", "gdk-p
                {01ADE22D-F6EC-4D09-8FE1-B9A97DEC2BA3} = {01ADE22D-F6EC-4D09-8FE1-B9A97DEC2BA3}
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk-pixbuf-introspect", "gdk-pixbuf-introspect.vcproj", 
"{4CB26FCC-45A3-4389-9474-258B5648B89D}"
+       ProjectSection(ProjectDependencies) = postProject
+               {FC5AADB5-95CD-4BF0-BA8B-0C16FE7074FB} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7074FB}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -118,6 +123,14 @@ Global
                {7212330C-14DF-4815-9E3B-4BDB3D21F665}.Release_GDI+|Win32.Build.0 = Release|Win32
                {7212330C-14DF-4815-9E3B-4BDB3D21F665}.Release_GDI+|x64.ActiveCfg = Release|x64
                {7212330C-14DF-4815-9E3B-4BDB3D21F665}.Release_GDI+|x64.Build.0 = Release|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug|Win32.ActiveCfg = Debug|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug|x64.ActiveCfg = Debug|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug_GDI+|Win32.ActiveCfg = Debug|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Debug_GDI+|x64.ActiveCfg = Debug|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release|Win32.ActiveCfg = Release|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release|x64.ActiveCfg = Release|x64
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release_GDI+|Win32.ActiveCfg = Release|Win32
+               {4CB26FCC-45A3-4389-9474-258B5648B89D}.Release_GDI+|x64.ActiveCfg = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]