[gtksourceview] build: Support Builds Using Visual Studio



commit e368ed2e191536447f87c637d9093c9f94a8bcd5
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Sep 25 17:18:55 2015 +0800

    build: Support Builds Using Visual Studio
    
    This adds the Visual Studio projects and related support files so that
    one is able to use the projects to build gtksourceview using MSVC, as
    well as generate the introspection files using MSVC.
    
    Also add a math.h compatibility header for builds on Visual Studio <= 2012
    so that there is an implementation for round() for these compilers, which
    is taken from GDK-Pixbuf.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759838

 Makefile.am                                        |    6 +-
 build/Makefile.am                                  |    3 +
 build/win32/Makefile.am                            |   39 +++
 build/win32/detectenv-msvc.mak                     |   76 +++++
 build/win32/gen-enums.batin                        |   40 +++
 build/win32/gtksourceview-introspection-msvc.mak   |   36 +++
 build/win32/introspection-msvc.mak                 |   73 +++++
 build/win32/replace.py                             |  102 +++++++
 build/win32/vs10/Makefile.am                       |   30 ++
 build/win32/vs10/gtksourceview-build-defines.props |   32 ++
 build/win32/vs10/gtksourceview-gen-srcs.props.in   |   42 +++
 build/win32/vs10/gtksourceview-install.propsin     |   42 +++
 build/win32/vs10/gtksourceview-install.vcxproj     |  108 +++++++
 build/win32/vs10/gtksourceview-version-paths.props |   61 ++++
 build/win32/vs10/gtksourceview.sln                 |   36 +++
 build/win32/vs10/gtksourceview.vcxproj.filtersin   |   26 ++
 build/win32/vs10/gtksourceview.vcxprojin           |  229 ++++++++++++++
 build/win32/vs11/Makefile.am                       |   23 ++
 build/win32/vs12/Makefile.am                       |   19 ++
 build/win32/vs14/Makefile.am                       |   19 ++
 build/win32/vs9/Makefile.am                        |   25 ++
 .../win32/vs9/gtksourceview-build-defines.vsprops  |   26 ++
 build/win32/vs9/gtksourceview-gen-srcs.vsprops.in  |   35 +++
 build/win32/vs9/gtksourceview-install.vcproj       |   77 +++++
 build/win32/vs9/gtksourceview-install.vspropsin    |   33 ++
 .../win32/vs9/gtksourceview-version-paths.vsprops  |   61 ++++
 build/win32/vs9/gtksourceview.sln                  |   39 +++
 build/win32/vs9/gtksourceview.vcprojin             |  312 ++++++++++++++++++++
 build/win32/vs9/math.h                             |   58 ++++
 config.h.win32.in                                  |   85 ++++++
 configure.ac                                       |   10 +
 gtksourceview/Makefile.am                          |   75 +++++
 32 files changed, 1876 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 182d6a6..278599e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gtksourceview po data docs tests
+SUBDIRS = gtksourceview po data docs tests build
 
 pkgconfig_DATA = gtksourceview-3.0.pc
 
@@ -7,7 +7,9 @@ EXTRA_DIST = \
        gtksourceview-3.0.pc.in \
        gtksourceview-zip.in \
        HACKING \
-       MAINTAINERS
+       MAINTAINERS \
+       config.h.win32.in \
+       config.h.win32
 
 MAINTAINERCLEANFILES =                 \
        ABOUT-NLS               \
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644
index 0000000..73e7a6f
--- /dev/null
+++ b/build/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = win32
+
+-include $(top_srcdir)/git.mk
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
new file mode 100644
index 0000000..45a8546
--- /dev/null
+++ b/build/win32/Makefile.am
@@ -0,0 +1,39 @@
+SUBDIRS = \
+       vs9     \
+       vs10    \
+       vs11    \
+       vs12    \
+       vs14
+
+GENERATED_ITEMS = gen-enums.bat
+
+if HAVE_INTROSPECTION
+GENERATED_ITEMS += \
+       introspection.body.mak  \
+       GtkSource_3_0_gir_list
+
+introspection.body.mak: GtkSource-3.0.gir.msvc.introspect
+       -$(RM) introspection.body.mak
+       for F in `ls *.msvc.introspect`; do \
+               case $$F in \
+                       *)      cat $(top_builddir)/build/win32/$$F >>$@ \
+                       ;; \
+               esac; \
+       done
+       $(RM) GtkSource-3.0.gir.msvc.introspect
+endif
+
+EXTRA_DIST = \
+       replace.py      \
+       detectenv-msvc.mak      \
+       gtksourceview-introspection-msvc.mak    \
+       introspection-msvc.mak  \
+       gen-enums.batin \
+       $(GENERATED_ITEMS)
+
+gen-enums.bat: $(top_srcdir)/build/win32/gen-enums.batin enum.headers
+       -$(RM) $@
+       $(CPP) -P - -traditional-cpp <$< >$@
+       $(RM) enum.headers
+
+DISTCLEANFILES = $(GENERATED_ITEMS)
diff --git a/build/win32/detectenv-msvc.mak b/build/win32/detectenv-msvc.mak
new file mode 100644
index 0000000..c23e444
--- /dev/null
+++ b/build/win32/detectenv-msvc.mak
@@ -0,0 +1,76 @@
+# Common NMake Makefile module for checking the build environment
+# This can be copied from $(glib_srcroot)\build\win32 for GNOME items
+# that support MSVC builds and introspection under MSVC, and can be used
+# for building test programs as well.
+
+# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
+# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
+!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
+MSG = ^
+This Makefile is only for Visual Studio 2008 and later.^
+You need to ensure that the Visual Studio Environment is properly set up^
+before running this Makefile.
+!error $(MSG)
+!endif
+
+ERRNUL  = 2>NUL
+_HASH=^#
+
+!if ![echo VCVERSION=_MSC_VER > vercl.x] \
+    && ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
+    && ![echo PLAT=Win32 >> vercl.x] \
+    && ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
+    && ![echo PLAT=x64 >> vercl.x] \
+    && ![echo $(_HASH)endif >> vercl.x] \
+    && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+    && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
+VSVER = 9
+!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
+VSVER = 10
+!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
+VSVER = 11
+!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
+VSVER = 12
+!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
+VSVER = 14
+!else
+VSVER = 0
+!endif
+
+!if "$(VSVER)" == "0"
+MSG = ^
+This NMake Makefile set supports Visual Studio^
+9 (2008) through 14 (2015).  Your Visual Studio^
+version is not supported.
+!error $(MSG)
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "debug"
+VALID_CFGSET = TRUE
+!endif
+
+# We want debugging symbols logged for all builds,
+# using .pdb files for release builds
+CFLAGS_BASE = /Zi
+
+!if "$(CFG)" == "release"
+CFLAGS_ADD = /MD /O2 $(CFLAGS_BASE)
+!else
+CFLAGS_ADD = /MDd /Od $(CFLAGS_BASE)
+!endif
+
+!if "$(PLAT)" == "x64"
+LDFLAGS_ARCH = /machine:x64
+!else
+LDFLAGS_ARCH = /machine:x86
+!endif
diff --git a/build/win32/gen-enums.batin b/build/win32/gen-enums.batin
new file mode 100644
index 0000000..831cb48
--- /dev/null
+++ b/build/win32/gen-enums.batin
@@ -0,0 +1,40 @@
+ echo OFF
+
+cd ..\..\gtksourceview
+
+if exist gtksourceview-typebuiltins.h del gtksourceview-typebuiltins.h
+if exist gtksourceview-typebuiltins.c del gtksourceview-typebuiltins.c
+
+call perl %1\bin\glib-mkenums ^
+--fhead "#ifdef HAVE_CONFIG_H\n" ^
+--fhead "#include \"config.h\"\n" ^
+--fhead "#endif\n\n" ^
+--fhead "#include <glib-object.h>\n" ^
+--fhead "#include \"gtksourceview-typebuiltins.h\"\n\n" ^
+--fprod "\n/* enumerations from \"@filename \" */" ^
+--vhead "static const G Type@Value _ enum_name@_values[] = {" ^
+--vprod "  { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," ^
+--vtail "  { 0, NULL, NULL }\n};\n\n" ^
+--vtail "GType\n enum_name@_get_type (void)\n{\n" ^
+--vtail "  static GType type = 0;\n\n" ^
+--vtail "  if (!type)\n" ^
+--vtail "    type = g_ type@_register_static (\"@EnumName \", _ enum_name@_values);\n\n" ^
+--vtail "  return type;\n}\n\n" ^
+#include "enum.headers"
+&1> gtksourceview-typebuiltins.c
+
+call perl %1\bin\glib-mkenums ^
+--fhead "#ifndef __GTKSOURCEVIEW_TYPEBUILTINS_H__\n" ^
+--fhead "#define __GTKSOURCEVIEW_TYPEBUILTINS_H__\n\n" ^
+--ftail "#endif /* __GTKSOURCEVIEW_TYPEBUILTINS_H__ */\n" ^
+--fprod "#include <gtksourceview/@filename@>\n" ^
+--eprod "G_BEGIN_DECLS\n" ^
+--eprod "#define GTK_TYPE_ ENUMSHORT@ @enum_name _get_type()\n" ^
+--eprod "GTK_SOURCE_ENUM_EXTERN\nGType @enum_name _get_type (void);\n" ^
+--eprod "G_END_DECLS\n\n" ^
+# include "enum.headers"
+&1> gtksourceview-typebuiltins.h
+
+
+call perl -p -i.tmp -e "s/GTK_TYPE_SOURCE_/GTK_SOURCE_TYPE_/g" gtksourceview-typebuiltins.h
+del gtksourceview-typebuiltins.h.tmp
diff --git a/build/win32/gtksourceview-introspection-msvc.mak 
b/build/win32/gtksourceview-introspection-msvc.mak
new file mode 100644
index 0000000..8fd47f9
--- /dev/null
+++ b/build/win32/gtksourceview-introspection-msvc.mak
@@ -0,0 +1,36 @@
+# NMake Makefile to build Introspection Files for GtkSourceView
+
+!include detectenv-msvc.mak
+
+APIVERSION = 3.0
+
+CHECK_PACKAGE = gtk+-3.0
+
+built_install_girs = GtkSource-$(APIVERSION).gir
+built_install_typelibs = GtkSource-$(APIVERSION).typelib
+
+!include introspection-msvc.mak
+
+!if "$(BUILD_INTROSPECTION)" == "TRUE"
+all: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
+
+setgirbuildenv:
+       @set PYTHONPATH=$(PREFIX)\lib\gobject-introspection
+       @set PATH=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(PREFIX)\bin;$(PATH)
+       @set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
+       @set LIB=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(LIB)
+
+!include introspection.body.mak
+
+install-introspection: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
+       @-copy *.gir $(G_IR_INCLUDEDIR)
+       @-copy /b *.typelib $(G_IR_TYPELIBDIR)
+
+!else
+all:
+       @-echo $(ERROR_MSG)
+!endif
+
+clean:
+       @-del /f/q *.typelib
+       @-del /f/q *.gir
diff --git a/build/win32/introspection-msvc.mak b/build/win32/introspection-msvc.mak
new file mode 100644
index 0000000..d32f7cf
--- /dev/null
+++ b/build/win32/introspection-msvc.mak
@@ -0,0 +1,73 @@
+# Common NMake Makefile module for checking the build environment is sane
+# for building introspection files under MSVC/NMake.
+# This can be copied from $(gi_srcroot)\build\win32 for GNOME items
+# that support MSVC builds and introspection under MSVC.
+
+# Can override with env vars as needed
+# You will need to have built gobject-introspection for this to work.
+# Change or pass in or set the following to suit your environment
+
+!if "$(PREFIX)" == ""
+PREFIX = ..\..\..\vs$(VSVER)\$(PLAT)
+!endif
+
+# Note: The PYTHON must be the Python release series that was used to build
+# the GObject-introspection scanner Python module!
+# Either having python.exe your PATH will work or passing in
+# PYTHON=<full path to your Python interpretor> will do
+
+# This is required, and gobject-introspection needs to be built
+# before this can be successfully run.
+!if "$(PYTHON)" == ""
+PYTHON=python
+!endif
+
+# Don't change anything following this line!
+
+GIR_SUBDIR = share\gir-1.0
+GIR_TYPELIBDIR = lib\girepository-1.0
+G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
+G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
+G_IR_INCLUDEDIR = $(PREFIX)\$(GIR_SUBDIR)
+G_IR_TYPELIBDIR = $(PREFIX)\$(GIR_TYPELIBDIR)
+
+VALID_PKG_CONFIG_PATH = FALSE
+
+MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH
+MSG_INVALID_CFG = You need to specify or set CFG to be release or debug to use this Makefile to build the 
Introspection Files
+
+ERROR_MSG =
+
+BUILD_INTROSPECTION = TRUE
+
+!if ![pkg-config --print-errors --errors-to-stdout $(CHECK_PACKAGE) > pkgconfig.x]     \
+       && ![setlocal]  \
+       && ![set file="pkgconfig.x"]    \
+       && ![FOR %A IN (%file%) DO @echo PKG_CHECK_SIZE=%~zA > pkgconfig.chksize]       \
+       && ![del $(ERRNUL) /q/f pkgconfig.x]
+!endif
+
+!include pkgconfig.chksize
+!if "$(PKG_CHECK_SIZE)" == "0"
+VALID_PKG_CONFIG_PATH = TRUE
+!else
+VALID_PKG_CONFIG_PATH = FALSE
+!endif
+
+!if ![del $(ERRNUL) /q/f pkgconfig.chksize]
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "debug"
+VALID_CFGSET = TRUE
+!endif
+
+!if "$(VALID_PKG_CONFIG_PATH)" != "TRUE"
+BUILD_INTROSPECTION = FALSE
+ERROR_MSG = $(MSG_INVALID_PKGCONFIG)
+!endif
+
+!if "$(VALID_CFGSET)" != "TRUE"
+BUILD_INTROSPECTION = FALSE
+ERROR_MSG = $(MSG_INVALID_CFG)
+!endif
diff --git a/build/win32/replace.py b/build/win32/replace.py
new file mode 100644
index 0000000..69ef417
--- /dev/null
+++ b/build/win32/replace.py
@@ -0,0 +1,102 @@
+#!/usr/bin/python
+#
+# Simple utility script to manipulate
+# certain types of strings in a file
+
+# This can be used in various projects where
+# there is the need to replace strings in files,
+# and is copied from GLib's $(srcroot)/build/win32
+
+# Author: Fan, Chun-wei
+# Date: September 03, 2014
+
+import os
+import sys
+import re
+import string
+import argparse
+
+valid_actions = ['remove-prefix',
+                 'replace-var',
+                 'replace-str',
+                 'remove-str']
+
+def replace(src, dest, instring, outstring):
+    with open(src, 'r') as s:
+        with open(dest, 'w') as d:
+            for line in s:
+                i = line.replace(instring, outstring)
+                d.write(i)
+
+def check_required_args(args, params):
+    for param in params:
+        if getattr(args, param, None) is None:
+            raise SystemExit('%s: error: --%s argument is required' % (__file__, param))
+
+def warn_ignored_args(args, params):
+    for param in params:
+        if getattr(args, param, None) is not None:
+            print('%s: warning: --%s argument is ignored' % (__file__, param))
+
+def main(argv):
+
+    parser = argparse.ArgumentParser(description='Process strings in a file.')
+    parser.add_argument('-a',
+                        '--action',
+                        help='Action to carry out.  Can be one of:\n'
+                             'remove-prefix\n'
+                             'replace-var\n'
+                             'replace-str\n'
+                             'remove-str',
+                        choices=valid_actions)
+    parser.add_argument('-i', '--input', help='Input file')
+    parser.add_argument('-o', '--output', help='Output file')
+    parser.add_argument('--instring', help='String to replace or remove')
+    parser.add_argument('--var', help='Autotools variable name to replace')
+    parser.add_argument('--outstring',
+                        help='New String to replace specified string or variable')
+    parser.add_argument('--removeprefix', help='Prefix of string to remove')
+
+    args = parser.parse_args()
+
+    input_string = ''
+    output_string = ''
+
+    # We must have action, input, output for all operations
+    check_required_args(args, ['action','input','output'])
+
+    # Build the arguments by the operation that is to be done,
+    # to be fed into replace()
+
+    # Get rid of prefixes from a string
+    if args.action == 'remove-prefix':
+        check_required_args(args, ['instring','removeprefix'])
+        warn_ignored_args(args, ['outstring','var'])
+        input_string = args.removeprefix + args.instring
+        output_string = args.instring
+
+    # Replace an m4-style variable (those surrounded by @...@)
+    if args.action == 'replace-var':
+        check_required_args(args, ['var','outstring'])
+        warn_ignored_args(args, ['instring','removeprefix'])
+        input_string = '@' + args.var + '@'
+        output_string = args.outstring
+
+    # Replace a string
+    if args.action == 'replace-str':
+        check_required_args(args, ['instring','outstring'])
+        warn_ignored_args(args, ['var','removeprefix'])
+        input_string = args.instring
+        output_string = args.outstring
+
+    # Remove a string
+    if args.action == 'remove-str':
+        check_required_args(args, ['instring'])
+        warn_ignored_args(args, ['var','outstring','removeprefix'])
+        input_string = args.instring
+        output_string = ''
+
+    replace(args.input, args.output, input_string, output_string)
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am
new file mode 100644
index 0000000..e0cec8d
--- /dev/null
+++ b/build/win32/vs10/Makefile.am
@@ -0,0 +1,30 @@
+GENERATED_ITEMS =                      \
+       gtksourceview.vcxproj           \
+       gtksourceview.vcxproj.filters   \
+       gtksourceview-install.props     \
+       math.h
+
+MSVC10_HEADERS_LISTS = \
+       gtksourceview.vs10.headers
+
+EXTRA_DIST =                                   \
+       gtksourceview.sln                       \
+       gtksourceview-build-defines.props       \
+       gtksourceview-gen-srcs.props            \
+       gtksourceview-install.propsin           \
+       gtksourceview-version-paths.props       \
+       gtksourceview.vcxprojin                 \
+       gtksourceview.vcxproj.filtersin         \
+       gtksourceview-install.vcxproj           \
+       $(GENERATED_ITEMS)
+
+gtksourceview-install.props: $(top_srcdir)/build/win32/vs10/gtksourceview-install.propsin 
$(MSVC10_HEADERS_LISTS)
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtksourceview-install.propsin >$@
+       $(RM) $(MSVC10_HEADERS_LISTS)
+
+math.h: $(top_srcdir)/build/win32/vs9/math.h
+       cp $< $@
+
+DISTCLEANFILES = $(GENERATED_ITEMS)
+
+-include $(top_srcdir)/git.mk
diff --git a/build/win32/vs10/gtksourceview-build-defines.props 
b/build/win32/vs10/gtksourceview-build-defines.props
new file mode 100644
index 0000000..a7b7bdd
--- /dev/null
+++ b/build/win32/vs10/gtksourceview-build-defines.props
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="gtksourceview-version-paths.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+       
<GtkSourceBuildDefines>G_LOG_DOMAIN="GtkSourceView";ENABLE_PROVIDERS;GTK_SOURCE_VERSION_MIN_REQUIRED=GTK_SOURCE_VERSION_3_0</GtkSourceBuildDefines>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_PropertySheetDisplayName>gtksourceviewbuilddefinesprops</_PropertySheetDisplayName>
+    <OutDir>$(SolutionDir)$(Configuration)\$(PlatformName)\bin\</OutDir>
+    <IntDir>$(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      
<AdditionalIncludeDirectories>..\..\..;..\..\..\gtksourceview;.\;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\gtk-3.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+      <AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
+    </ClCompile>
+    <Link>
+      
<AdditionalDependencies>gtk-3.0.lib;gdk-3.0.lib;gdk_pixbuf-2.0.lib;pangocairo-1.0.lib;pango-1.0.lib;atk-1.0.lib;gio-2.0.lib;gobject-2.0.lib;gmodule-2.0.lib;gthread-2.0.lib;glib-2.0.lib;intl.lib;cairo.lib;libxml2.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <BuildMacro Include="GtkSourceBuildDefines">
+      <Value>$(GtkSourceBuildDefines)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/gtksourceview-gen-srcs.props.in 
b/build/win32/vs10/gtksourceview-gen-srcs.props.in
new file mode 100644
index 0000000..0c552e6
--- /dev/null
+++ b/build/win32/vs10/gtksourceview-gen-srcs.props.in
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="gtksourceview-build-defines.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <CopyConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</CopyConfigH>
+    <GenerateEnums>
+cd ..
+
+CALL gen-enums.bat $(GlibEtcInstallRoot)
+
+cd $(SolutionDir)
+    </GenerateEnums>
+    <GenerateRsrcSrc>
+$(GlibEtcInstallRoot)\bin\glib-compile-resources --target=..\..\..\gtksourceview\gtksourceview-resources.c 
--generate-source --sourcedir=..\..\..\gtksourceview ..\..\..\gtksourceview\gtksourceview.gresource.xml
+    </GenerateRsrcSrc>
+    <GenGtksourceVersionH>
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\..\gtksourceview\gtksourceversion.h.in --output=..\..\..\gtksourceview\gtksourceversion.h.tmp1 
--var=GTK_SOURCE_MAJOR_VERSION --outstring= GTK_SOURCE_MAJOR_VERSION@
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\..\gtksourceview\gtksourceversion.h.tmp1 
--output=..\..\..\gtksourceview\gtksourceversion.h.tmp2 --var=GTK_SOURCE_MINOR_VERSION --outstring= 
GTK_SOURCE_MINOR_VERSION@
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring= GTK_SOURCE_MICRO_VERSION@
+del ..\..\..\gtksourceview\gtksourceversion.h.tmp1 ..\..\..\gtksourceview\gtksourceversion.h.tmp2
+    </GenGtksourceVersionH>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_PropertySheetDisplayName>gtksourceviewgensrcsprops</_PropertySheetDisplayName>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="CopyConfigH">
+      <Value>$(CopyConfigH)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GenerateEnums">
+      <Value>$(GenerateEnums)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GenerateRsrcSrc">
+      <Value>$(GenerateRsrcSrc)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GenGtksourceVersionH">
+      <Value>$(GenGtksourceVersionH)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/gtksourceview-install.propsin b/build/win32/vs10/gtksourceview-install.propsin
new file mode 100644
index 0000000..fcd7c65
--- /dev/null
+++ b/build/win32/vs10/gtksourceview-install.propsin
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ImportGroup Label="PropertySheets">
+    <Import Project="gtksourceview-build-defines.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros">
+    <GtkSourceviewDoInstall>
+mkdir $(CopyDir)
+mkdir $(CopyDir)\bin
+copy 
$(SolutionDir)$(Configuration)\$(Platform)\bin\$(GtkSourceviewDllPrefix)gtksourceview$(GtkSourceviewDllSuffix).dll
 $(CopyDir)\bin
+copy 
$(SolutionDir)$(Configuration)\$(Platform)\bin\$(GtkSourceviewDllPrefix)gtksourceview$(GtkSourceviewDllSuffix).pdb
 $(CopyDir)\bin
+
+mkdir $(CopyDir)\include\gtksourceview-$(ApiVersion)\gtksourceview\completion-providers\words
+#include "gtksourceview.vs10.headers"
+copy ..\..\..\gtksourceview\completion-providers\words\gtksourcecompletionwords.h 
$(CopyDir)\include\gtksourceview-$(ApiVersion)\gtksourceview\completion-providers\words
+
+mkdir $(CopyDir)\lib
+copy $(SolutionDir)$(Configuration)\$(Platform)\bin\gtksourceview-$(ApiVersion).lib $(CopyDir)\lib
+
+mkdir $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
+copy ..\..\..\data\language-specs\*.lang $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
+copy ..\..\..\data\language-specs\*.rng $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
+copy ..\..\..\data\language-specs\check-language.sh 
$(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
+copy ..\..\..\data\language-specs\language.dtd $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs
+
+mkdir $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
+copy ..\..\..\data\styles\*.xml $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
+copy ..\..\..\data\styles\styles.rng $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
+copy ..\..\..\data\styles\check-style.sh $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles
+    </GtkSourceviewDoInstall>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_PropertySheetDisplayName>gtksourceviewinstallprops</_PropertySheetDisplayName>
+    <OutDir>$(SolutionDir)$(Configuration)\$(PlatformName)\bin\</OutDir>
+    <IntDir>$(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\</IntDir>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="GtkSourceviewDoInstall">
+      <Value>$(GtkSourceviewDoInstall)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/gtksourceview-install.vcxproj b/build/win32/vs10/gtksourceview-install.vcxproj
new file mode 100644
index 0000000..635c6ab
--- /dev/null
+++ b/build/win32/vs10/gtksourceview-install.vcxproj
@@ -0,0 +1,108 @@
+<?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="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2093D218-190E-4194-9421-3BA7CBF33B10}</ProjectGuid>
+    <RootNamespace>gtksourceviewinstall</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-install.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-install.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-install.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-install.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GlibEtcInstallRoot)\</OutDir>
+    <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GlibEtcInstallRoot)\</OutDir>
+    <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GlibEtcInstallRoot)\</OutDir>
+    <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GlibEtcInstallRoot)\</OutDir>
+    <ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <PreBuildEvent>
+      <Command>$(GtkSourceviewDoInstall)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <PreBuildEvent>
+      <Command>$(GtkSourceviewDoInstall)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <PreBuildEvent>
+      <Command>$(GtkSourceviewDoInstall)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <PreBuildEvent>
+      <Command>$(GtkSourceviewDoInstall)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ProjectReference Include="gtksourceview.vcxproj">
+      <Project>{b95c0a8d-2528-40c4-8ade-1fde8b6e50e8}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/build/win32/vs10/gtksourceview-version-paths.props 
b/build/win32/vs10/gtksourceview-version-paths.props
new file mode 100644
index 0000000..0a0486a
--- /dev/null
+++ b/build/win32/vs10/gtksourceview-version-paths.props
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup Label="UserMacros">
+    <VSVer>10</VSVer>
+    <GlibEtcInstallRoot>$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
+    <CopyDir>$(GlibEtcInstallRoot)</CopyDir>
+    <DefDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)</DefDir>
+    <ApiVersion>3.0</ApiVersion>
+    <GtkSourceviewLibtoolCompatibleDllPrefix>lib</GtkSourceviewLibtoolCompatibleDllPrefix>
+    <GtkSourceviewLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</GtkSourceviewLibtoolCompatibleDllSuffix>
+    <GtkSourceviewSeparateVSDllPrefix />
+    <GtkSourceviewSeparateVSDllSuffix>-3-vs$(VSVer)</GtkSourceviewSeparateVSDllSuffix>
+    <GtkSourceviewDllPrefix>$(GtkSourceviewSeparateVSDllPrefix)</GtkSourceviewDllPrefix>
+    <GtkSourceviewDllSuffix>$(GtkSourceviewSeparateVSDllSuffix)</GtkSourceviewDllSuffix>
+    <PythonPath>c:\python27</PythonPath>
+  </PropertyGroup>
+  <PropertyGroup>
+    <_PropertySheetDisplayName>gtksourceviewversionpathsprops</_PropertySheetDisplayName>
+  </PropertyGroup>
+  <ItemGroup>
+    <BuildMacro Include="VSVer">
+      <Value>$(VSVer)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GlibEtcInstallRoot">
+      <Value>$(GlibEtcInstallRoot)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GlibEtcInstallRootFromBuildWin32">
+      <Value>$(GlibEtcInstallRootFromBuildWin32)</Value>
+    </BuildMacro>
+    <BuildMacro Include="CopyDir">
+      <Value>$(CopyDir)</Value>
+    </BuildMacro>
+    <BuildMacro Include="DefDir">
+      <Value>$(DefDir)</Value>
+    </BuildMacro>
+    <BuildMacro Include="ApiVersion">
+      <Value>$(ApiVersion)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewLibtoolCompatibleDllPrefix">
+      <Value>$(GtkSourceviewLibtoolCompatibleDllPrefix)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewLibtoolCompatibleDllSuffix">
+      <Value>$(GtkSourceviewLibtoolCompatibleDllSuffix)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewSeparateVSDllPrefix">
+      <Value>$(GtkSourceviewSeparateVSDllPrefix)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewSeparateVSDllSuffix">
+      <Value>$(GtkSourceviewSeparateVSDllSuffix)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewDllPrefix">
+      <Value>$(GtkSourceviewDllPrefix)</Value>
+    </BuildMacro>
+    <BuildMacro Include="GtkSourceviewDllSuffix">
+      <Value>$(GtkSourceviewDllSuffix)</Value>
+    </BuildMacro>
+    <BuildMacro Include="PythonPath">
+      <Value>$(PythonPath)</Value>
+    </BuildMacro>
+  </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/gtksourceview.sln b/build/win32/vs10/gtksourceview.sln
new file mode 100644
index 0000000..80b0198
--- /dev/null
+++ b/build/win32/vs10/gtksourceview.sln
@@ -0,0 +1,36 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtksourceview", "gtksourceview.vcxproj", 
"{B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtksourceview-install", 
"gtksourceview-install.vcxproj", "{2093D218-190E-4194-9421-3BA7CBF33B10}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Win32 = Debug|Win32
+               Debug|x64 = Debug|x64
+               Release|Win32 = Release|Win32
+               Release|x64 = Release|x64
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|Win32.ActiveCfg = Debug|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|Win32.Build.0 = Debug|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|x64.ActiveCfg = Debug|x64
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|x64.Build.0 = Debug|x64
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|Win32.ActiveCfg = Release|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|Win32.Build.0 = Release|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|x64.ActiveCfg = Release|x64
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|x64.Build.0 = Release|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.ActiveCfg = Debug|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.Build.0 = Debug|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.ActiveCfg = Debug|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.Build.0 = Debug|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.ActiveCfg = Release|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.Build.0 = Release|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.ActiveCfg = Release|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.Build.0 = Release|x64
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
diff --git a/build/win32/vs10/gtksourceview.vcxproj.filtersin 
b/build/win32/vs10/gtksourceview.vcxproj.filtersin
new file mode 100644
index 0000000..8e66edd
--- /dev/null
+++ b/build/win32/vs10/gtksourceview.vcxproj.filtersin
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <ItemGroup>
+    <Filter Include="Sources">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Headers">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+#include "gtksourceview.vs10.sourcefiles.filters"
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
+    <CustomBuild Include="..\gen_enums_c.bat"><Filter>Resource Files</Filter></CustomBuild>
+    <CustomBuild Include="..\..\..\gtksourceview\gtksourceview.gresource.xml"><Filter>Resource 
Files</Filter></CustomBuild>
+    <CustomBuild Include="..\..\..\gtksourceview\gtksourceversion.h.in"><Filter>Resource 
Files</Filter></CustomBuild>
+  </ItemGroup>
+</Project>
diff --git a/build/win32/vs10/gtksourceview.vcxprojin b/build/win32/vs10/gtksourceview.vcxprojin
new file mode 100644
index 0000000..6f1d3ef
--- /dev/null
+++ b/build/win32/vs10/gtksourceview.vcxprojin
@@ -0,0 +1,229 @@
+<?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="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}</ProjectGuid>
+    <RootNamespace>gtksourceview</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v100</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-gen-srcs.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-gen-srcs.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-gen-srcs.props" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" 
Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+    <Import Project="gtksourceview-gen-srcs.props" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      
<PreprocessorDefinitions>_DEBUG;$(GtkSourceBuildDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>$(GtkSourceBuildDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      
<PreprocessorDefinitions>_DEBUG;$(GtkSourceBuildDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>MaxSpeed</Optimization>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>$(GtkSourceBuildDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <Link>
+      <OutputFile>$(OutDir)$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+#include "gtksourceview.vs10.sourcefiles"
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\..\..\config.h.win32">
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying config.h from 
config.h.win32...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyConfigH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying config.h from 
config.h.win32...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyConfigH)</Command>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\config.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying config.h from 
config.h.win32...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyConfigH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying config.h from 
config.h.win32...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyConfigH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\config.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\..\..\gtksourceview\gtksourceversion.h.in">
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating 
gtksourceversion.h...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenGtksourceVersionH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtksourceview\gtksourceversion.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating 
gtksourceversion.h...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenGtksourceVersionH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtksourceview\gtksourceversion.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating 
gtksourceversion.h...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenGtksourceVersionH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtksourceview\gtksourceversion.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating 
gtksourceversion.h...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenGtksourceVersionH)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtksourceview\gtksourceversion.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\gen_enums_c.bat">
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating Enumeration 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateEnums)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating Enumeration 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateEnums)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating Enumeration 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateEnums)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating Enumeration 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateEnums)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h;%(Outputs)</Outputs>
+    </CustomBuild>
+    <CustomBuild Include="..\..\..\gtksourceview\gtksourceview.gresource.xml">
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GResource 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateRsrcSrc)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtksourceview\gtksourceview-resources.c;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GResource 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateRsrcSrc)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtksourceview\gtksourceview-resources.c;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GResource 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateRsrcSrc)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtksourceview\gtksourceview-resources.c;%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GResource 
sources...</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateRsrcSrc)</Command>
+      <Outputs 
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtksourceview\gtksourceview-resources.c;%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/build/win32/vs11/Makefile.am b/build/win32/vs11/Makefile.am
new file mode 100644
index 0000000..a97c432
--- /dev/null
+++ b/build/win32/vs11/Makefile.am
@@ -0,0 +1,23 @@
+EXTRA_DIST =                           \
+       gtksourceview.sln                       \
+       gtksourceview-build-defines.props       \
+       gtksourceview-gen-srcs.props            \
+       gtksourceview-install.props             \
+       gtksourceview-version-paths.props       \
+       gtksourceview.vcxproj                   \
+       gtksourceview.vcxproj.filters           \
+       gtksourceview-install.vcxproj           \
+       math.h
+
+math.h: $(top_srcdir)/build/win32/vs9/math.h
+       cp $< $@
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_VER = 11
+MSVC_FORMAT_VER = 12
+MSVC_VER_LONG = 2012
+
+include $(top_srcdir)/build/Makefile-newvs.am
+
+-include $(top_srcdir)/git.mk
diff --git a/build/win32/vs12/Makefile.am b/build/win32/vs12/Makefile.am
new file mode 100644
index 0000000..d383ca2
--- /dev/null
+++ b/build/win32/vs12/Makefile.am
@@ -0,0 +1,19 @@
+EXTRA_DIST =                           \
+       gtksourceview.sln                       \
+       gtksourceview-build-defines.props       \
+       gtksourceview-gen-srcs.props            \
+       gtksourceview-install.props             \
+       gtksourceview-version-paths.props       \
+       gtksourceview.vcxproj                   \
+       gtksourceview.vcxproj.filters           \
+       gtksourceview-install.vcxproj
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_VER = 12
+MSVC_FORMAT_VER = 12
+MSVC_VER_LONG = 2013
+
+include $(top_srcdir)/build/Makefile-newvs.am
+
+-include $(top_srcdir)/git.mk
diff --git a/build/win32/vs14/Makefile.am b/build/win32/vs14/Makefile.am
new file mode 100644
index 0000000..b692e60
--- /dev/null
+++ b/build/win32/vs14/Makefile.am
@@ -0,0 +1,19 @@
+EXTRA_DIST =                           \
+       gtksourceview.sln                       \
+       gtksourceview-build-defines.props       \
+       gtksourceview-gen-srcs.props            \
+       gtksourceview-install.props             \
+       gtksourceview-version-paths.props       \
+       gtksourceview.vcxproj                   \
+       gtksourceview.vcxproj.filters           \
+       gtksourceview-install.vcxproj
+
+DISTCLEANFILES = $(EXTRA_DIST)
+
+MSVC_VER = 14
+MSVC_FORMAT_VER = 12
+MSVC_VER_LONG = 14
+
+include $(top_srcdir)/build/Makefile-newvs.am
+
+-include $(top_srcdir)/git.mk
diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am
new file mode 100644
index 0000000..8c98ffa
--- /dev/null
+++ b/build/win32/vs9/Makefile.am
@@ -0,0 +1,25 @@
+GENERATED_ITEMS =              \
+       gtksourceview.vcproj    \
+       gtksourceview-install.vsprops
+
+MSVC_HEADERS_LISTS =   \
+       gtksourceview.headers
+
+EXTRA_DIST =                                   \
+       gtksourceview.sln                       \
+       gtksourceview-build-defines.vsprops     \
+       gtksourceview-gen-srcs.vsprops          \
+       gtksourceview-install.vspropsin         \
+       gtksourceview-version-paths.vsprops     \
+       gtksourceview.vcprojin                  \
+       gtksourceview-install.vcproj            \
+       $(GENERATED_ITEMS)                      \
+       math.h
+
+gtksourceview-install.vsprops: $(top_srcdir)/build/win32/vs9/gtksourceview-install.vspropsin 
$(MSVC_HEADERS_LISTS)
+       $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gtksourceview-install.vspropsin >$@
+       $(RM) $(MSVC_HEADERS_LISTS)
+
+DISTCLEANFILES = $(GENERATED_ITEMS)
+
+-include $(top_srcdir)/git.mk
diff --git a/build/win32/vs9/gtksourceview-build-defines.vsprops 
b/build/win32/vs9/gtksourceview-build-defines.vsprops
new file mode 100644
index 0000000..757bc6c
--- /dev/null
+++ b/build/win32/vs9/gtksourceview-build-defines.vsprops
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="gtksourceviewbuilddefinesprops"
+       OutputDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin"
+       IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\obj\$(ProjectName)\"
+       InheritedPropertySheets=".\gtksourceview-version-paths.vsprops"
+       >
+       <Tool
+               Name="VCCLCompilerTool"
+               
AdditionalIncludeDirectories="..\..\..;..\..\..\gtksourceview;.\;$(GlibEtcInstallRoot)\include\gtk-3.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include"
+               PreprocessorDefinitions="HAVE_CONFIG_H"
+               ForcedIncludeFiles="msvc_recommended_pragmas.h"
+               AdditionalOptions="/MP"
+       />
+       <Tool
+               Name="VCLinkerTool"
+               AdditionalDependencies="gtk-3.0.lib gdk-3.0.lib gdk_pixbuf-2.0.lib pangocairo-1.0.lib 
pango-1.0.lib atk-1.0.lib gio-2.0.lib gobject-2.0.lib gmodule-2.0.lib gthread-2.0.lib glib-2.0.lib intl.lib 
cairo.lib libxml2.lib"
+               AdditionalLibraryDirectories="$(GlibEtcInstallRoot)\lib"
+       />
+       <UserMacro
+               Name="GtkSourceBuildDefines"
+               
Value="G_LOG_DOMAIN=\&quot;GtkSourceView\&quot;;ENABLE_PROVIDERS;GTK_SOURCE_VERSION_MIN_REQUIRED=GTK_SOURCE_VERSION_3_0"
+       />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/gtksourceview-gen-srcs.vsprops.in 
b/build/win32/vs9/gtksourceview-gen-srcs.vsprops.in
new file mode 100644
index 0000000..332d10e
--- /dev/null
+++ b/build/win32/vs9/gtksourceview-gen-srcs.vsprops.in
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="gtksourceviewgensrcsprops"
+       InheritedPropertySheets=".\gtksourceview-build-defines.vsprops"
+       >
+       <UserMacro
+               Name="CopyConfigH"
+               Value="copy ..\..\..\config.h.win32 ..\..\..\config.h"
+       />
+       <UserMacro
+               Name="GenerateEnums"
+               Value="
+cd ..&#x0D;&#x0A;
+CALL gen-enums.bat $(GlibEtcInstallRoot)&#x0D;&#x0A;
+cd $(SolutionDir)&#x0D;&#x0A;
+                     "
+       />
+       <UserMacro
+               Name="GenerateRsrcSrc"
+               Value="
+$(GlibEtcInstallRoot)\bin\glib-compile-resources --target=..\..\..\gtksourceview\gtksourceview-resources.c 
--generate-source --sourcedir=..\..\..\gtksourceview 
..\..\..\gtksourceview\gtksourceview.gresource.xml&#x0D;&#x0A;
+                     "
+       />
+       <UserMacro
+               Name="GenGtksourceVersionH"
+               Value="
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\..\gtksourceview\gtksourceversion.h.in --output=..\..\..\gtksourceview\gtksourceversion.h.tmp1 
--var=GTK_SOURCE_MAJOR_VERSION --outstring= GTK_SOURCE_MAJOR_VERSION@&#x0D;&#x0A;
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\..\gtksourceview\gtksourceversion.h.tmp1 
--output=..\..\..\gtksourceview\gtksourceversion.h.tmp2 --var=GTK_SOURCE_MINOR_VERSION --outstring= 
GTK_SOURCE_MINOR_VERSION@&#x0D;&#x0A;
+$(PythonPath)\python.exe ..\replace.py --action=replace-var 
--input=..\..\..\gtksourceview\gtksourceversion.h.tmp2 --output=..\..\..\gtksourceview\gtksourceversion.h 
--var=GTK_SOURCE_MICRO_VERSION --outstring= GTK_SOURCE_MICRO_VERSION@&#x0D;&#x0A;
+del ..\..\..\gtksourceview\gtksourceversion.h.tmp1 ..\..\..\gtksourceview\gtksourceversion.h.tmp2&#x0D;&#x0A;
+                     "
+       />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/gtksourceview-install.vcproj b/build/win32/vs9/gtksourceview-install.vcproj
new file mode 100644
index 0000000..7a20852
--- /dev/null
+++ b/build/win32/vs9/gtksourceview-install.vcproj
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="gtksourceview-install"
+       ProjectGUID="{2093D218-190E-4194-9421-3BA7CBF33B10}"
+       RootNamespace="gtksourceviewinstall"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="131072"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       InheritedPropertySheets=".\gtksourceview-install.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(GtkSourceviewDoInstall)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       InheritedPropertySheets=".\gtksourceview-install.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(GtkSourceviewDoInstall)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       InheritedPropertySheets=".\gtksourceview-install.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(GtkSourceviewDoInstall)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       InheritedPropertySheets=".\gtksourceview-install.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(GtkSourceviewDoInstall)"
+                       />
+               </Configuration>
+       </Configurations>
+</VisualStudioProject>
diff --git a/build/win32/vs9/gtksourceview-install.vspropsin b/build/win32/vs9/gtksourceview-install.vspropsin
new file mode 100644
index 0000000..1c489bb
--- /dev/null
+++ b/build/win32/vs9/gtksourceview-install.vspropsin
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="gtksourceviewinstallprops"
+       InheritedPropertySheets=".\gtksourceview-build-defines.vsprops"
+       >
+       <UserMacro
+               Name="GtkSourceviewDoInstall"
+               Value="
+mkdir $(CopyDir)&#x0D;&#x0A;
+mkdir $(CopyDir)\bin&#x0D;&#x0A;
+copy 
$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\$(GtkSourceviewDllPrefix)gtksourceview$(GtkSourceviewDllSuffix).dll
 $(CopyDir)\bin&#x0D;&#x0A;
+copy 
$(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\$(GtkSourceviewDllPrefix)gtksourceview$(GtkSourceviewDllSuffix).pdb
 $(CopyDir)\bin&#x0D;&#x0A;
+
+mkdir $(CopyDir)\include\gtksourceview-$(ApiVersion)\gtksourceview\completion-providers\words&#x0D;&#x0A;
+#include "gtksourceview.headers"
+copy ..\..\..\gtksourceview\completion-providers\words\gtksourcecompletionwords.h 
$(CopyDir)\include\gtksourceview-$(ApiVersion)\gtksourceview\completion-providers\words&#x0D;&#x0A;
+
+mkdir $(CopyDir)\lib&#x0D;&#x0A;
+copy $(SolutionDir)$(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
+
+mkdir $(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs&#x0D;&#x0A;
+copy ..\..\..\data\language-specs\*.lang 
$(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs&#x0D;&#x0A;
+copy ..\..\..\data\language-specs\*.rng 
$(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs&#x0D;&#x0A;
+copy ..\..\..\data\language-specs\language.dtd 
$(CopyDir)\share\gtksourceview-$(ApiVersion)\language-specs&#x0D;&#x0A;
+
+mkdir $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles&#x0D;&#x0A;
+copy ..\..\..\data\styles\*.xml $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles&#x0D;&#x0A;
+copy ..\..\..\data\styles\styles.rng $(CopyDir)\share\gtksourceview-$(ApiVersion)\styles&#x0D;&#x0A;
+"
+       />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/gtksourceview-version-paths.vsprops 
b/build/win32/vs9/gtksourceview-version-paths.vsprops
new file mode 100644
index 0000000..8dc97da
--- /dev/null
+++ b/build/win32/vs9/gtksourceview-version-paths.vsprops
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="gtksourceviewversionpathsprops"
+       >
+       <UserMacro
+               Name="ApiVersion"
+               Value="3.0"
+       />
+       <UserMacro
+               Name="VSVer"
+               Value="9"
+       />
+       <UserMacro
+               Name="GlibEtcInstallRoot"
+               Value="$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(PlatformName)"
+       />
+       <UserMacro
+               Name="GlibMkEnumsPath"
+               Value="..\..\..\vs$(VSVer)\$(PlatformName)"
+       />
+       <UserMacro
+               Name="DefDir"
+               Value="$(SolutionDir)$(ConfigurationName)\$(PlatformName)\obj\$(ProjectName)"
+       />
+       <UserMacro
+               Name="CopyDir"
+               Value="$(GlibEtcInstallRoot)"
+       />
+       <UserMacro
+               Name="GtkSourceviewLibtoolCompatibleDllPrefix"
+               Value="lib"
+       />
+       <UserMacro
+               Name="GtkSourceviewLibtoolCompatibleDllSuffix"
+               Value="-$(ApiVersion)-0"
+       />
+       <UserMacro
+               Name="GtkSourceviewSeparateVSDllPrefix"
+               Value=""
+       />
+       <UserMacro
+               Name="GtkSourceviewSeparateVSDllSuffix"
+               Value="-3-vs$(VSVer)"
+       />
+       <!-- Change these two to GtkSourceviewLibtoolCompatibleDllPrefix and
+       GtkSourceviewLibtoolCompatibleDllSuffix if that is what you want -->
+       <UserMacro
+               Name="GtkSourceviewDllPrefix"
+               Value="$(GtkSourceviewSeparateVSDllPrefix)"
+       />
+       <UserMacro
+               Name="GtkSourceviewDllSuffix"
+               Value="$(GtkSourceviewSeparateVSDllSuffix)"
+       />
+       <UserMacro
+               Name="PythonPath"
+               Value="c:\python27"
+       />
+</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/gtksourceview.sln b/build/win32/vs9/gtksourceview.sln
new file mode 100644
index 0000000..34b7ee4
--- /dev/null
+++ b/build/win32/vs9/gtksourceview.sln
@@ -0,0 +1,39 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtksourceview", "gtksourceview.vcproj", 
"{B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtksourceview-install", "gtksourceview-install.vcproj", 
"{2093D218-190E-4194-9421-3BA7CBF33B10}"
+       ProjectSection(ProjectDependencies) = postProject
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8} = {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}
+       EndProjectSection
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Win32 = Debug|Win32
+               Debug|x64 = Debug|x64
+               Release|Win32 = Release|Win32
+               Release|x64 = Release|x64
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|Win32.ActiveCfg = Debug|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|Win32.Build.0 = Debug|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|x64.ActiveCfg = Debug|x64
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Debug|x64.Build.0 = Debug|x64
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|Win32.ActiveCfg = Release|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|Win32.Build.0 = Release|Win32
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|x64.ActiveCfg = Release|x64
+               {B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}.Release|x64.Build.0 = Release|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.ActiveCfg = Debug|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.Build.0 = Debug|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.ActiveCfg = Debug|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.Build.0 = Debug|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.ActiveCfg = Release|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.Build.0 = Release|Win32
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.ActiveCfg = Release|x64
+               {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.Build.0 = Release|x64
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
diff --git a/build/win32/vs9/gtksourceview.vcprojin b/build/win32/vs9/gtksourceview.vcprojin
new file mode 100644
index 0000000..1333768
--- /dev/null
+++ b/build/win32/vs9/gtksourceview.vcprojin
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="gtksourceview"
+       ProjectGUID="{B95C0A8D-2528-40C4-8ADE-1FDE8B6E50E8}"
+       RootNamespace="gtksourceview"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="196613"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       ConfigurationType="2"
+                       InheritedPropertySheets=".\gtksourceview-gen-srcs.vsprops"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               PreprocessorDefinitions="_DEBUG;$(GtkSourceBuildDefines)"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               
OutputFile="$(OutDir)\$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
+                               TargetMachine="1"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       ConfigurationType="2"
+                       InheritedPropertySheets=".\gtksourceview-gen-srcs.vsprops"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               PreprocessorDefinitions="_DEBUG;$(GtkSourceBuildDefines)"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               
OutputFile="$(OutDir)\$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll"
+                               LinkIncremental="2"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
+                               TargetMachine="17"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       ConfigurationType="2"
+                       InheritedPropertySheets=".\gtksourceview-gen-srcs.vsprops"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               EnableIntrinsicFunctions="true"
+                               PreprocessorDefinitions="$(GtkSourceBuildDefines)"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               
OutputFile="$(OutDir)\$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
+                               TargetMachine="1"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       ConfigurationType="2"
+                       InheritedPropertySheets=".\gtksourceview-gen-srcs.vsprops"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               EnableIntrinsicFunctions="true"
+                               PreprocessorDefinitions="$(GtkSourceBuildDefines)"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               
OutputFile="$(OutDir)\$(GtkSourceviewDllPrefix)$(ProjectName)$(GtkSourceviewDllSuffix).dll"
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               ImportLibrary="$(TargetDir)$(ProjectName)-$(ApiVersion).lib"
+                               TargetMachine="17"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Sources"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+#include "gtksourceview.sourcefiles"
+               </Filter>
+               <Filter
+                       Name="Headers"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+                       <File RelativePath="..\..\..\config.h.win32">
+                               <FileConfiguration Name="Debug|Win32">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Copying config.h from config.h.win32..."
+                                               CommandLine="$(CopyConfigH)"
+                                               Outputs="..\..\..\config.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|Win32">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Copying config.h from config.h.win32..."
+                                               CommandLine="$(CopyConfigH)"
+                                               Outputs="..\..\..\config.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Debug|x64">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Copying config.h from config.h.win32..."
+                                               CommandLine="$(CopyConfigH)"
+                                               Outputs="..\..\..\config.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|x64">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Copying config.h from config.h.win32..."
+                                               CommandLine="$(CopyConfigH)"
+                                               Outputs="..\..\..\config.h"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File RelativePath="..\..\..\gtksourceview\gtksourceversion.h.in"
+                               >
+                               <FileConfiguration Name="Debug|Win32">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating gtksourceversion.h..."
+                                               CommandLine="$(GenGtksourceVersionH)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceversion.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Debug|x64">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating gtksourceversion.h..."
+                                               CommandLine="$(GenGtksourceVersionH)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceversion.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|Win32">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating gtksourceversion.h..."
+                                               CommandLine="$(GenGtksourceVersionH)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceversion.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|x64">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating gtksourceversion.h..."
+                                               CommandLine="$(GenGtksourceVersionH)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceversion.h"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File RelativePath="..\gen_enums_c.bat">
+                               <FileConfiguration Name="Debug|Win32">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Generating Enumeration sources..."
+                                               CommandLine="$(GenerateEnums)"
+                                               
Outputs="..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|Win32">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Generating Enumeration sources..."
+                                               CommandLine="$(GenerateEnums)"
+                                               
Outputs="..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Debug|x64">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Generating Enumeration sources..."
+                                               CommandLine="$(GenerateEnums)"
+                                               
Outputs="..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|x64">
+                                       <Tool Name="VCCustomBuildTool"
+                                               Description="Generating Enumeration sources..."
+                                               CommandLine="$(GenerateEnums)"
+                                               
Outputs="..\..\..\gtksourceview\gtksourceview-typebuiltins.c;..\..\..\gtksourceview\gtksourceview-typebuiltins.h"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File RelativePath="..\..\..\gtksourceview\gtksourceview.gresource.xml"
+                               >
+                               <FileConfiguration Name="Debug|Win32">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating GResource sources..."
+                                               CommandLine="$(GenerateRsrcSrc)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceview-resources.c"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Debug|x64">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating GResource sources..."
+                                               CommandLine="$(GenerateRsrcSrc)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceview-resources.c"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|Win32">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating GResource sources..."
+                                               CommandLine="$(GenerateRsrcSrc)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceview-resources.c"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration Name="Release|x64">
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating GResource sources..."
+                                               CommandLine="$(GenerateRsrcSrc)"
+                                               Outputs="..\..\..\gtksourceview\gtksourceview-resources.c"
+                                       />
+                               </FileConfiguration>
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/build/win32/vs9/math.h b/build/win32/vs9/math.h
new file mode 100644
index 0000000..a442179
--- /dev/null
+++ b/build/win32/vs9/math.h
@@ -0,0 +1,58 @@
+/* GdkPixbuf library - Compatibility Math Header for
+ *                     pre-Visual Studio 2013 Headers
+ *                     to Build GDK-Pixbuf
+ *
+ * Copyright (C) 2014 Chun-wei Fan
+ *
+ * Authors: Chun-wei Fan <fanc999 yahoo com tw>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _MSC_VER
+#error "This Header is intended for Visual Studio Builds only"
+#endif
+
+/* Include the stock Visual Studio math.h first */
+#include <../include/math.h>
+
+/* Visual Studio 2013 and later do not need this compatibility item */
+#if (_MSC_VER < 1800)
+
+#ifndef __MSVC_MATH_COMPAT_H__
+#define __MSVC_MATH_COMPAT_H__
+
+/* Note: This is a rather generic fallback implementation for round(), which is
+ *       okay for the purposes for GTK+, but please note the following if intending
+ *       use this implementation:
+ *
+ *       -The largest floating point value strictly less than 0.5.  The problem is
+ *        that the addition produces 1 due to rounding.
+ *
+ *       -A set of large integers near 2^52 for which adding 0.5 is the same as
+ *        adding 1, again due to rounding.
+ */
+
+static __inline double
+round (double x)
+{
+  if (x >= 0)
+    return floor (x + 0.5);
+  else
+    return ceil (x - 0.5);
+}
+
+#endif /* __MSVC_MATH_COMPAT_H__ */
+
+#endif /* _MSC_VER < 1800 */
\ No newline at end of file
diff --git a/config.h.win32.in b/config.h.win32.in
new file mode 100644
index 0000000..f39180f
--- /dev/null
+++ b/config.h.win32.in
@@ -0,0 +1,85 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Defined if native language support should be enabled. */
+#define ENABLE_NLS 1
+
+/* Define to the gettext package name. */
+#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#ifndef _MSC_VER
+#define HAVE_INTTYPES_H 1
+#endif
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#if (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+#define HAVE_STDINT_H 1
+#endif
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#ifndef _MSC_VER
+#define HAVE_STRINGS_H 1
+#endif
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#ifndef _MSC_VER
+#define HAVE_UNISTD_H 1
+#endif
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Defined if os is Mac OSX */
+/* #undef OS_OSX */
+
+/* Name of package */
+#define PACKAGE "gtksourceview"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gtksourceview";
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "gtksourceview"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "gtksourceview @PACKAGE_VERSION@"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "gtksourceview"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "http://projects.gnome.org/gtksourceview/";
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "@PACKAGE_VERSION@"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "@PACKAGE_VERSION@"
+
+#ifdef _MSC_VER
+#define _GTK_SOURCE_EXTERN __declspec (dllexport) extern
+#else
+#define _GTK_SOURCE_EXTERN __attribute__((visibility("default")))  __declspec (dllexport) extern
+#endif
diff --git a/configure.ac b/configure.ac
index bfc04f3..3d9bb49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -223,6 +223,16 @@ AC_CONFIG_FILES([
 gtksourceview-3.0.pc
 gtksourceview-zip
 Makefile
+config.h.win32
+build/Makefile
+build/win32/Makefile
+build/win32/vs9/Makefile
+build/win32/vs9/gtksourceview-gen-srcs.vsprops
+build/win32/vs10/Makefile
+build/win32/vs10/gtksourceview-gen-srcs.props
+build/win32/vs11/Makefile
+build/win32/vs12/Makefile
+build/win32/vs14/Makefile
 data/Makefile
 data/glade/Makefile
 data/language-specs/Makefile
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index ab785b8..440f6cd 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -329,4 +329,79 @@ CLEANFILES += $(vapi_DATA)
 
 endif # ENABLE_VAPIGEN
 
+# MSVC items
+
+# Pull in the libgtksourcecompletionwords sources since on MSVC we want to
+# build everything in the same .dll with no intermediate libs
+gtksource_win32_more_sources =                                         \
+       completion-providers/words/gtksourcecompletionwords.c           \
+       completion-providers/words/gtksourcecompletionwordsbuffer.c     \
+       completion-providers/words/gtksourcecompletionwordslibrary.c    \
+       completion-providers/words/gtksourcecompletionwordsproposal.c   \
+       completion-providers/words/gtksourcecompletionwordsutils.c
+
+MSVCPROJS = gtksourceview
+
+gtksourceview_FILES =                                  \
+       $(libgtksourceview_public_c_files)              \
+       $(libgtksourceview_private_c_files)             \
+       $(nodist_libgtksourceview_core_la_SOURCES)      \
+       $(gtksource_win32_more_sources)
+
+gtksourceview_EXCLUDES = dummy
+gtksourceview_HEADERS_DIR = $(libgtksourceview_3_0_includedir)
+gtksourceview_HEADERS_INST = \
+       $(libgtksourceview_public_headers)      \
+       $(nodist_libgtksourceview_3_0_include_HEADERS)
+
+gtksourceview_HEADERS_EXCLUDES = dummy
+
+include $(top_srcdir)/build/Makefile.msvcproj
+
+$(top_builddir)/build/win32/enums.headers: $(libgtksourceview_public_headers)
+       -$(RM) $(top_builddir)/build/win32/enum.headers
+       for F in $(libgtksourceview_public_headers); do \
+               case $$F in \
+               *.h) \
+                       echo $$F' ^'>>$(top_builddir)/build/win32/enum.headers \
+                       ;; \
+               esac \
+       done
+
+# NMake/MSVC introspection
+if HAVE_INTROSPECTION
+NMAKE_INTROSPECTION_FILES = \
+       $(top_builddir)/build/win32/GtkSource-3.0.gir.msvc.introspect   \
+       $(top_builddir)/build/win32/GtkSource_3_0_gir_list
+
+MSVC_INTROSPECT_GIRS = GtkSource-3.0.gir
+
+GtkSource_3_0_gir_MSVC_FILES = \
+       $(libgtksourcecompletionwords_files)    \
+       $(libgtksourceview_public_headers)      \
+       $(libgtksourceview_public_c_files)      \
+       $(BUILT_SOURCES)
+
+GtkSource_3_0_gir_MSVC_INCLUDE_GIRS = Gtk-3.0 Gdk-3.0
+GtkSource_3_0_gir_MSVC_PACKAGES = gtk+-3.0 gdk-3.0
+GtkSource_3_0_gir_MSVC_EXPORT_PACKAGES = gtksourceview-3.0
+GtkSource_3_0_gir_MSVC_LIBS = gtksourceview-3.0
+GtkSource_3_0_gir_MSVC_CFLAGS = -I..\\..
+
+GtkSource_3_0_gir_MSVC_SCANNERFLAGS = \
+       --c-include=gtksourceview/gtksource.h   \
+       --warn-all      \
+       --filelist=GtkSource_3_0_gir_list
+
+include $(top_srcdir)/build/Makefile.msvc-introspection
+else
+NMAKE_INTROSPECTION_FILES =
+endif
+
+dist-hook: \
+       $(top_builddir)/build/win32/enums.headers               \
+       $(top_builddir)/build/win32/vs9/gtksourceview.vcproj    \
+       $(top_builddir)/build/win32/vs9/gtksourceview.headers   \
+       $(NMAKE_INTROSPECTION_FILES)
+
 -include $(top_srcdir)/git.mk


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