]> Pileus Git - ~andy/gtk/commitdiff
Visual Studio Builds: Support Building Introspection Files
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 6 Mar 2013 05:12:01 +0000 (13:12 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 6 Mar 2013 05:12:01 +0000 (13:12 +0800)
Add Windows .bat and Python script to call g-ir-scanner to build
introspection files for Visual Studio builds.  This will read from the
autotools files using Python REGEX functionality to determine the headers
and sources for g-ir-scanner to process, so the autotools files will not
need to be updated except to distribute the necessary files.  Thils will
also enable one to build introspection files on Windows without using a
BASH-style shell such as MSYS.

Also add an utility Visual Studio project to call the Windows .bat to
build the introspection files for GTK+/GDK, for convenience.

build/win32/Makefile.am
build/win32/gen-file-list-gtk.py [new file with mode: 0644]
build/win32/gengir_gtk.bat [new file with mode: 0644]
build/win32/vs10/Makefile.am
build/win32/vs10/gengir.vcxproj [new file with mode: 0644]
build/win32/vs9/Makefile.am
build/win32/vs9/gengir.vcproj [new file with mode: 0644]

index f48c8e3eb3906478acb4bcb256753dab10a659ab..af2f66ded8b6d897a112f2b14e750939cc5593be 100644 (file)
@@ -4,4 +4,8 @@ SUBDIRS = \
        vs9  \
        vs10
 
+EXTRA_DIST +=  \
+       gen-file-list-gtk.py    \
+       gengir_gtk.bat
+
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/gen-file-list-gtk.py b/build/win32/gen-file-list-gtk.py
new file mode 100644 (file)
index 0000000..a727d5c
--- /dev/null
@@ -0,0 +1,140 @@
+#!/usr/bin/python
+# vim: encoding=utf-8
+# Generate the file lists for processing with g-ir-scanner
+import os
+import sys
+import re
+import string
+import subprocess
+import optparse
+
+def gen_gdk_filelist(srcroot, subdir, dest):
+    vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
+                             vars = {},
+                             conds = {},
+                             filters = ['gdk_public_h_sources', 'gdk_c_sources'])
+
+    vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
+
+    files = vars['gdk_public_h_sources'].split() + \
+            vars['gdk_c_sources'].split() + \
+            vars['gdk_enums'].split()
+
+    sources = [i for i in files if (i != 'gdkkeysyms-compat.h')]
+
+    with open(dest, 'w') as d:
+        for i in sources:
+            d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
+
+def gen_filelist_gtk(srcroot, subdir, dest):
+    vars = read_vars_from_AM(os.path.join(srcroot, 'gtk', 'Makefile.am'),
+                             vars = {},
+                             conds = {'USE_WIN32':True},
+                             filters = ['gtkinclude_HEADERS',
+                                        'deprecatedinclude_HEADERS',
+                                        'gtk_base_c_sources'])
+
+    vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
+
+    files = vars['gtkinclude_HEADERS'].split() + \
+            vars['deprecatedinclude_HEADERS'].split() + \
+            vars['gtk_base_c_sources'].split() + \
+            vars['gtk_other_src'].split()
+
+    sources = [i for i in files if not (i.endswith('private.h')) and i != 'gtktextdisplay.h' and i != 'gtktextlayout.h']
+
+    with open(dest, 'w') as d:
+        for i in sources:
+            d.write(srcroot + '\\' + subdir + '\\' + i.replace('/', '\\') + '\n')
+
+def read_vars_from_AM(path, vars = {}, conds = {}, filters = None):
+    '''
+    path: path to the Makefile.am
+    vars: predefined variables
+    conds: condition variables for Makefile
+    filters: if None, all variables defined are returned,
+             otherwise, it is a list contains that variables should be returned
+    '''
+    cur_vars = vars.copy()
+    RE_AM_VAR_REF = re.compile(r'\$\((\w+?)\)')
+    RE_AM_VAR = re.compile(r'^\s*(\w+)\s*=(.*)$')
+    RE_AM_INCLUDE = re.compile(r'^\s*include\s+(\w+)')
+    RE_AM_CONTINUING = re.compile(r'\\\s*$')
+    RE_AM_IF = re.compile(r'^\s*if\s+(\w+)')
+    RE_AM_ELSE = re.compile(r'^\s*else')
+    RE_AM_ENDIF = re.compile(r'^\s*endif')
+    def am_eval(cont):
+        return RE_AM_VAR_REF.sub(lambda x: cur_vars.get(x.group(1), ''), cont)
+    with open(path, 'r') as f:
+        contents = f.readlines()
+    #combine continuing lines
+    i = 0
+    ncont = []
+    while i < len(contents):
+        line = contents[i]
+        if RE_AM_CONTINUING.search(line):
+            line = RE_AM_CONTINUING.sub('', line)
+            j = i + 1
+            while j < len(contents) and RE_AM_CONTINUING.search(contents[j]):
+                line += RE_AM_CONTINUING.sub('', contents[j])
+                j += 1
+            else:
+                if j < len(contents):
+                    line += contents[j]
+            i = j
+        else:
+            i += 1
+        ncont.append(line)
+
+    #include, var define, var evaluation
+    i = -1
+    skip = False
+    oldskip = []
+    while i < len(ncont) - 1:
+        i += 1
+        line = ncont[i]
+        mo = RE_AM_IF.search(line)
+        if mo:
+            oldskip.append(skip)
+            skip = False if mo.group(1) in conds and conds[mo.group(1)] \
+                         else True
+            continue
+        mo = RE_AM_ELSE.search(line)
+        if mo:
+            skip = not skip
+            continue
+        mo = RE_AM_ENDIF.search(line)
+        if mo:
+            if oldskip:
+                skip = oldskip.pop()
+            continue
+        if not skip:
+            mo = RE_AM_INCLUDE.search(line)
+            if mo:
+                cur_vars.update(read_vars_from_AM(am_eval(mo.group(1)), cur_vars, conds, None))
+                continue
+            mo = RE_AM_VAR.search(line)
+            if mo:
+                cur_vars[mo.group(1)] = am_eval(mo.group(2).strip())
+                continue
+
+    #filter:
+    if filters != None:
+        ret = {}
+        for i in filters:
+            ret[i] = cur_vars.get(i, '')
+        return ret
+    else:
+        return cur_vars
+
+def main(argv):
+    srcroot = '..\\..'
+    subdir_gdk = 'gdk'
+    subdir_gtk = 'gtk'
+
+    gen_gdk_filelist(srcroot, subdir_gdk, 'gdk_list')
+    gen_filelist_gtk(srcroot, subdir_gtk, 'gtk_list')
+    return 0
+
+if __name__ == '__main__':
+    sys.exit(main(sys.argv))
diff --git a/build/win32/gengir_gtk.bat b/build/win32/gengir_gtk.bat
new file mode 100644 (file)
index 0000000..d8a82f2
--- /dev/null
@@ -0,0 +1,176 @@
+@echo off\r
+\r
+setlocal EnableDelayedExpansion\r
+\r
+rem Needed environmental variables:\r
+rem PLAT: Windows platform-Win32 (i.e. x86) or x64 (i.e. x86-64)\r
+rem CONF: Configuration Type, Release or Debug\r
+rem VSVER: Visual C++ version used [9, 10 or 11]\r
+rem BASEDIR: Where the dependent libraries/headers are located\r
+rem PKG_CONFIG_PATH: Where the GLib/ATK/Pango/GDK-Pixbuf and their dependent pkg-config .pc files can be found\r
+rem MINGWDIR: Installation path of MINGW GCC, so gcc.exe can be found in %MINGWDIR%\bin.\r
+\r
+rem Note that the Python executable/installation and all the runtime dependencies of the\r
+rem library/libraries need to be in your PATH or %BASEBIN%\bin.\r
+\r
+rem Check the environemental variables...\r
+if /i "%PLAT%" == "Win32" goto PLAT_OK\r
+if /i "%PLAT%" == "x64" goto PLAT_OK\r
+if /i "%PLAT%" == "x86" (\r
+   set PLAT=Win32\r
+   goto PLAT_OK\r
+)\r
+if /i "%PLAT%" == "x86-64" (\r
+   set PLAT=x64\r
+   goto PLAT_OK\r
+)\r
+goto ERR_PLAT\r
+\r
+:PLAT_OK\r
+if "%VSVER%" == "9" goto VSVER_OK\r
+if "%VSVER%" == "10" goto VSVER_OK\r
+if "%VSVER%" == "11" goto VSVER_OK\r
+goto ERR_VSVER\r
+:VSVER_OK\r
+if /i "%CONF%" == "Release" goto CONF_OK\r
+if /i "%CONF%" == "Debug" goto CONF_OK\r
+goto ERR_CONF\r
+:CONF_OK\r
+if "%BASEDIR%" == "" goto ERR_BASEDIR\r
+if not exist %BASEDIR% goto ERR_BASEDIR\r
+\r
+if "%PKG_CONFIG_PATH%" == "" goto ERR_PKGCONFIG\r
+if not exist %PKG_CONFIG_PATH%\gobject-2.0.pc goto ERR_PKGCONFIG\r
+\r
+if "%MINGWDIR%" == "" goto ERR_MINGWDIR\r
+if not exist %MINGWDIR%\bin\gcc.exe goto ERR_MINGWDIR\r
+\r
+set CC=cl\r
+set BINDIR=%CD%\vs%VSVER%\%CONF%\%PLAT%\bin\r
+set INCLUDE=%BASEDIR%\include\glib-2.0;%BASEDIR%\lib\glib-2.0\include;%INCLUDE%\r
+set LIB=%BINDIR%;%BASEDIR%\lib;%LIB%\r
+set PATH=%BINDIR%;%BASEDIR%\bin;%PATH%;%MINGWDIR%\bin\r
+set PYTHONPATH=%BASEDIR%\lib\gobject-introspection;%BINDIR%\r
+\r
+echo Creating filelist files for generating GDK3/GTK3 .gir's...\r
+call python gen-file-list-gtk.py\r
+\r
+echo Setup .bat for generating GDK3/GTK3 .gir's...\r
+\r
+rem ===============================================================================\r
+rem Begin setup of gtk_gir.bat to create Gdk-3.0.gir\r
+rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)\r
+rem ===============================================================================\r
+\r
+echo echo Generating Gdk-3.0.gir...> gtk_gir.bat\r
+echo @echo off>> gtk_gir.bat\r
+echo.>> gtk_gir.bat\r
+rem ===============================================================\r
+rem Setup the command line flags to g-ir-scanner for Gdk-3.0.gir...\r
+rem ===============================================================\r
+echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gdk ^^>> gtk_gir.bat\r
+echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat\r
+echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat\r
+echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat\r
+echo --namespace=Gdk --nsversion=3.0 ^^>> gtk_gir.bat\r
+echo --include=Gio-2.0 --include=GdkPixbuf-2.0 ^^>> gtk_gir.bat\r
+echo --include=Pango-1.0 --include=cairo-1.0 ^^>> gtk_gir.bat\r
+echo --no-libtool --library=gdk-3-vs%VSVER% ^^>> gtk_gir.bat\r
+echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat\r
+echo --pkg-export gdk-3.0 --warn-all --c-include="gdk/gdk.h" ^^>> gtk_gir.bat\r
+echo -I..\.. -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION ^^>> gtk_gir.bat\r
+echo --filelist=gdk_list ^^>> gtk_gir.bat\r
+echo -o Gdk-3.0.gir>> gtk_gir.bat\r
+echo.>> gtk_gir.bat\r
+\r
+echo Completed setup of .bat for generating Gdk-3.0.gir.\r
+echo.>> gtk_gir.bat\r
+\r
+rem =================================================\r
+rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir\r
+rem =================================================\r
+\r
+rem ===============================================================================\r
+rem Begin setup of gtk_gir.bat to create Gtk-3.0.gir\r
+rem (The ^^ is necessary to span the command to multiple lines on Windows cmd.exe!)\r
+rem ===============================================================================\r
+\r
+echo echo Generating Gtk-3.0.gir...>> gtk_gir.bat\r
+echo.>> gtk_gir.bat\r
+rem ===============================================================\r
+rem Setup the command line flags to g-ir-scanner for Gtk-3.0.gir...\r
+rem ===============================================================\r
+echo python %BASEDIR%\bin\g-ir-scanner --verbose -I..\.. -I..\..\gtk -I..\..\gdk ^^>> gtk_gir.bat\r
+echo -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include ^^>> gtk_gir.bat\r
+echo -I%BASEDIR%\include\pango-1.0 -I%BASEDIR%\include\atk-1.0 ^^>> gtk_gir.bat\r
+echo -I%BASEDIR%\include\gdk-pixbuf-2.0 -I%BASEDIR%\include ^^>> gtk_gir.bat\r
+echo --namespace=Gtk --nsversion=3.0 ^^>> gtk_gir.bat\r
+echo --include=Atk-1.0 ^^>> gtk_gir.bat\r
+echo --include-uninstalled=./Gdk-3.0.gir ^^>> gtk_gir.bat\r
+echo --no-libtool --library=gtk-3-vs%VSVER% ^^>> gtk_gir.bat\r
+echo --reparse-validate --add-include-path=%BASEDIR%\share\gir-1.0 --add-include-path=. ^^>> gtk_gir.bat\r
+echo --pkg-export gtk+-3.0 --warn-all --c-include="gtk/gtkx.h" ^^>> gtk_gir.bat\r
+echo -I..\.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/dummy/lib\" ^^>> gtk_gir.bat\r
+echo -DGTK_DATADIR=\"/dummy/share\" -DGTK_DATA_PREFIX=\"/dummy\" ^^>> gtk_gir.bat\r
+echo -DGTK_SYSCONFDIR=\"/dummy/etc\" -DGTK_VERSION=\"3.6.2\" ^^>> gtk_gir.bat\r
+echo -DGTK_BINARY_VERSION=\"3.0.0\" -DGTK_HOST=\"i686-pc-vs%VSVER%\" ^^>> gtk_gir.bat\r
+echo -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file\" ^^>> gtk_gir.bat\r
+echo -DGTK_PRINT_PREVIEW_COMMAND=\"undefined-gtk-print-preview-command\" ^^>> gtk_gir.bat\r
+echo -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED ^^>> gtk_gir.bat\r
+echo -DINCLUDE_IM_am_et -DINCLUDE_IM_cedilla -DINCLUDE_IM_cyrillic_translit ^^>> gtk_gir.bat\r
+echo -DINCLUDE_IM_ime -DINCLUDE_IM_inuktitut -DINCLUDE_IM_ipa ^^>> gtk_gir.bat\r
+echo -DINCLUDE_IM_multipress -DINCLUDE_IM_thai -DINCLUDE_IM_ti_er ^^>> gtk_gir.bat\r
+echo -DINCLUDE_IM_ti_et -DINCLUDE_IM_viqr --filelist=gtk_list ^^>> gtk_gir.bat\r
+echo -o Gtk-3.0.gir>> gtk_gir.bat\r
+echo.>> gtk_gir.bat\r
+\r
+echo Completed setup of .bat for generating Gtk-3.0.gir.\r
+echo.>> gtk_gir.bat\r
+\r
+rem =================================================\r
+rem Finish setup of gtk_gir.bat to create Gtk-3.0.gir\r
+rem =================================================\r
+\r
+rem =======================\r
+rem Now generate the .gir's\r
+rem =======================\r
+CALL gtk_gir.bat\r
+\r
+rem Clean up the .bat/filelists for generating the .gir files...\r
+del gtk_gir.bat\r
+del gdk_list\r
+del gtk_list\r
+\r
+rem Now compile the generated .gir files\r
+%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gdk-3.0.gir -o Gdk-3.0.typelib\r
+%BASEDIR%\bin\g-ir-compiler --includedir=. --debug --verbose Gtk-3.0.gir -o Gtk-3.0.typelib\r
+rem Copy the generated .girs and .typelibs to their appropriate places\r
+\r
+mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\share\gir-1.0\r
+move /y *.gir %BASEDIR%\share\gir-1.0\\r
+\r
+mkdir ..\..\build\win32\vs%VSVER%\%CONF%\%PLAT%\lib\girepository-1.0\r
+move /y *.typelib %BASEDIR%\lib\girepository-1.0\\r
+\r
+goto DONE\r
+\r
+:ERR_PLAT\r
+echo You need to specify a valid Platform [set PLAT=Win32 or PLAT=x64]\r
+goto DONE\r
+:ERR_VSVER\r
+echo You need to specify your Visual Studio version [set VSVER=9 or VSVER=10 or VSVER=11]\r
+goto DONE\r
+:ERR_CONF\r
+echo You need to specify a valid Configuration [set CONF=Release or CONF=Debug]\r
+goto DONE\r
+:ERR_BASEDIR\r
+echo You need to specify a valid BASEDIR.\r
+goto DONE\r
+:ERR_PKGCONFIG\r
+echo You need to specify a valid PKG_CONFIG_PATH\r
+goto DONE\r
+:ERR_MINGWDIR\r
+echo You need to specify a valid MINGWDIR, where a valid gcc installation can be found.\r
+goto DONE\r
+:DONE\r
+\r
index 9f93d4c35d052acc50e8e0ba881f9645a0eb9267..24e5f46886f198a4eaf0bae402b40153c0df271f 100644 (file)
@@ -1,29 +1,30 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST += \
-       README.txt \
-       gtk+.sln \
-       gtk+.props \
-       gdk-win32.vcxproj \
-       gdk-win32.vcxproj.filters \
-       gdk.vcxproj \
-       gdk.vcxprojin \
-       gdk.vcxproj.filters \
-       gdk.vcxproj.filtersin \
-       gtk.vcxproj \
-       gtk.vcxprojin \
-       gtk.vcxproj.filters \
-       gtk.vcxproj.filtersin \
-       gtk3-demo.vcxproj \
-       gtk3-demo.vcxproj.filters \
-       gtk3-demo-application.vcxproj \
-       gtk3-demo-application.vcxproj.filters \
-       gtka11y.vcxproj \
-       gtka11y.vcxproj.filters \
-       gtka11y.vcxprojin \
-       gtka11y.vcxproj.filtersin \
-       gailutil.vcxproj \
-       gailutil.vcxproj.filters \
+EXTRA_DIST +=  \
+       README.txt      \
+       gtk+.sln        \
+       gtk+.props      \
+       gdk-win32.vcxproj       \
+       gdk-win32.vcxproj.filters       \
+       gdk.vcxproj     \
+       gdk.vcxprojin   \
+       gdk.vcxproj.filters     \
+       gdk.vcxproj.filtersin   \
+       gtk.vcxproj     \
+       gtk.vcxprojin   \
+       gtk.vcxproj.filters     \
+       gtk.vcxproj.filtersin   \
+       gtk3-demo.vcxproj       \
+       gtk3-demo.vcxproj.filters       \
+       gtk3-demo-application.vcxproj   \
+       gtk3-demo-application.vcxproj.filters   \
+       gtka11y.vcxproj \
+       gtka11y.vcxproj.filters \
+       gtka11y.vcxprojin       \
+       gtka11y.vcxproj.filtersin       \
+       gailutil.vcxproj        \
+       gailutil.vcxproj.filters        \
+       gengir.vcxproj  \
        install.vcxproj
 
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs10/gengir.vcxproj b/build/win32/vs10/gengir.vcxproj
new file mode 100644 (file)
index 0000000..3d94c27
--- /dev/null
@@ -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-3BA7CBF33B15}</ProjectGuid>
+    <RootNamespace>gengir</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>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Utility</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+  </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="gtk+.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="gtk+.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="gtk+.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="gtk+.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>$(DoGenGir)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <PreBuildEvent>
+      <Command>$(DoGenGir)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <PreBuildEvent>
+      <Command>$(DoGenGir)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <PreBuildEvent>
+      <Command>$(DoGenGir)</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ProjectReference Include="gdk.vcxproj">
+      <Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="gtk.vcxproj">
+      <Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f5}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
index 02437aaf6334775fdabaa1e57038658db7efde7a..d52df20e49d7c883fae051461a87cbe7090688cd 100644 (file)
@@ -1,19 +1,20 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST += \
-       README.txt \
-       gtk+.sln \
-       gtk+.vsprops \
-       gdk-win32.vcproj \
-       gdk.vcproj \
-       gdk.vcprojin \
-       gtk.vcproj \
-       gtk.vcprojin \
-       gtk3-demo.vcproj \
-       gtk3-demo-application.vcproj \
-       gtka11y.vcproj \
-       gtka11y.vcprojin \
-       gailutil.vcproj \
+EXTRA_DIST +=  \
+       README.txt      \
+       gtk+.sln        \
+       gtk+.vsprops    \
+       gdk-win32.vcproj        \
+       gdk.vcproj      \
+       gdk.vcprojin    \
+       gtk.vcproj      \
+       gtk.vcprojin    \
+       gtk3-demo.vcproj        \
+       gtk3-demo-application.vcproj    \
+       gtka11y.vcproj  \
+       gtka11y.vcprojin        \
+       gailutil.vcproj \
+       gengir.vcproj   \
        install.vcproj
 
 -include $(top_srcdir)/git.mk
diff --git a/build/win32/vs9/gengir.vcproj b/build/win32/vs9/gengir.vcproj
new file mode 100644 (file)
index 0000000..ef20564
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="gengir"
+       ProjectGUID="{2093D218-190E-4194-9421-3BA7CBF33B15}"
+       RootNamespace="gengir"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="131072"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       InheritedPropertySheets=".\gtk+.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(DoGenGir)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       InheritedPropertySheets=".\gtk+.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(DoGenGir)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       InheritedPropertySheets=".\gtk+.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(DoGenGir)"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       InheritedPropertySheets=".\gtk+.vsprops"
+                       OutputDirectory="$(GlibEtcInstallRoot)"
+                       ConfigurationType="10"
+                       CharacterSet="2"
+                       WholeProgramOptimization="1"
+                       DeleteExtensionsOnClean=""
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                               CommandLine="$(DoGenGir)"
+                       />
+               </Configuration>
+       </Configurations>
+</VisualStudioProject>