From 39703440cfd4e7949708266270e447b7b22c9347 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 20 Jan 2014 16:30:22 +0800 Subject: Rework The Visual Studio 2008 Build Process This patch makes the build of G-I on Visual Studio 2008 into a two-step process, as it would make it clearer and easier to the one building G-I by: -Splitting up the property sheets into multiple parts, where pre-configured code (which is currently shipped with the tarball) is copied using custom build steps, so that they can be re-copied when they are updated. This also removes the need for setting environment variables before launching the Visual Studio Project to build the G-I DLL, the tools written in C and the _giscanner Python2 module. The Python2 paths (set to Python 2.7.x) are now set in a property sheet, which can be updated quite easily, if needed. -Use a set of NMake Makefiles to build the introspection files for GLib, and also the .gir's that are shipped with G-I, and make it clear to people what things are needed to build the introspection files. -Standardizing across the board that we now use $(ApiVersion) for the .lib files and the "installation" of headers, etc. Similar updates to the Visual Studio 2010 files will follow later. --- Makefile-msvcproj.am | 12 +- build/Makefile.am | 6 + build/detectenv_msvc.mak | 65 +++++++++ build/gen-cairo-gir.py | 59 ++++++++ build/gi-introspection-msvc.mak | 210 ++++++++++++++++++++++++++++ build/introspection-msvc.mak | 79 +++++++++++ build/win32/vs10/annotation.vcxproj | 8 +- build/win32/vs10/everything.vcxproj | 8 +- build/win32/vs10/foo.vcxproj | 8 +- build/win32/vs10/gettype.vcxproj | 8 +- build/win32/vs10/gimarshallingtests.vcxproj | 8 +- build/win32/vs10/gir.propsin | 22 +-- build/win32/vs10/girepository.vcxprojin | 8 +- build/win32/vs10/gtkfrob.vcxproj | 8 +- build/win32/vs10/regress.vcxproj | 8 +- build/win32/vs10/sletter.vcxproj | 8 +- build/win32/vs10/testinherit.vcxproj | 8 +- build/win32/vs10/utility.vcxproj | 8 +- build/win32/vs9/Makefile.am | 17 ++- build/win32/vs9/README.txt | 41 ++++-- build/win32/vs9/_giscanner.vcproj | 36 ++--- build/win32/vs9/annotation.vcproj | 28 ++-- build/win32/vs9/cmph-bdz-test.vcproj | 20 +-- build/win32/vs9/cmph.vcprojin | 20 +-- build/win32/vs9/everything.vcproj | 190 ------------------------- build/win32/vs9/foo.vcproj | 28 ++-- build/win32/vs9/g-ir-compiler.vcprojin | 28 ++-- build/win32/vs9/g-ir-generate.vcproj | 20 +-- build/win32/vs9/generate_typelibs.vcproj | 74 ---------- build/win32/vs9/gettype.vcproj | 28 ++-- build/win32/vs9/gi-build-defines.vsprops | 29 ++++ build/win32/vs9/gi-extra-paths.vsprops | 18 +++ build/win32/vs9/gi-gen-srcs.vsprops | 39 ++++++ build/win32/vs9/gi-install.vspropsin | 39 ++++++ build/win32/vs9/gi-prebuild.vcproj | 201 ++++++++++++++++++++++++++ build/win32/vs9/gi-version-paths.vsprops | 57 ++++++++ build/win32/vs9/gimarshallingtests.vcproj | 28 ++-- build/win32/vs9/gir.vspropsin | 170 ---------------------- build/win32/vs9/girepository.vcprojin | 111 ++++++--------- build/win32/vs9/glib-print.vcproj | 20 +-- build/win32/vs9/gobject-introspection.sln | 63 +++++---- build/win32/vs9/gtkfrob.vcproj | 28 ++-- build/win32/vs9/install.vcproj | 8 +- build/win32/vs9/regress.vcproj | 28 ++-- build/win32/vs9/sletter.vcproj | 28 ++-- build/win32/vs9/testinherit.vcproj | 28 ++-- build/win32/vs9/utility.vcproj | 28 ++-- 47 files changed, 1100 insertions(+), 894 deletions(-) create mode 100644 build/detectenv_msvc.mak create mode 100644 build/gen-cairo-gir.py create mode 100644 build/gi-introspection-msvc.mak create mode 100644 build/introspection-msvc.mak delete mode 100644 build/win32/vs9/everything.vcproj delete mode 100644 build/win32/vs9/generate_typelibs.vcproj create mode 100644 build/win32/vs9/gi-build-defines.vsprops create mode 100644 build/win32/vs9/gi-extra-paths.vsprops create mode 100644 build/win32/vs9/gi-gen-srcs.vsprops create mode 100644 build/win32/vs9/gi-install.vspropsin create mode 100644 build/win32/vs9/gi-prebuild.vcproj create mode 100644 build/win32/vs9/gi-version-paths.vsprops delete mode 100644 build/win32/vs9/gir.vspropsin diff --git a/Makefile-msvcproj.am b/Makefile-msvcproj.am index 32b9314d..f4dcd3cd 100644 --- a/Makefile-msvcproj.am +++ b/Makefile-msvcproj.am @@ -110,11 +110,11 @@ # and Python scripts to install #-------------------------------- ./build/win32/vs9/gir.vs9.install: - echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(GIApiVersion)\girepository ' >./build/win32/vs9/gir.vs9.install + echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository ' >./build/win32/vs9/gir.vs9.install echo '' >>./build/win32/vs9/gir.vs9.install for F in `echo $(girepo_HEADERS) | tr '/' '\\\\'`; do \ case $$F in \ - *.h) echo 'copy ..\..\..\'$$F' $$(CopyDir)\include\gobject-introspection-$$(GIApiVersion)\girepository ' \ + *.h) echo 'copy ..\..\..\'$$F' $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository ' \ ;; \ esac; \ done >>./build/win32/vs9/gir.vs9.install @@ -144,11 +144,11 @@ done >>./build/win32/vs9/gir.vs9.install ./build/win32/vs10/gir.vs10.install: - echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(GIApiVersion)\girepository' >./build/win32/vs10/gir.vs10.install + echo 'mkdir $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository' >./build/win32/vs10/gir.vs10.install echo '' >>./build/win32/vs10/gir.vs10.install for F in `echo $(girepo_HEADERS) | tr '/' '\\\\'`; do \ case $$F in \ - *.h) echo 'copy ..\..\..\'$$F' $$(CopyDir)\include\gobject-introspection-$$(GIApiVersion)\girepository' && \ + *.h) echo 'copy ..\..\..\'$$F' $$(CopyDir)\include\gobject-introspection-$$(ApiVersion)\girepository' && \ echo '' \ ;; \ esac; \ @@ -178,8 +178,8 @@ esac; \ done >>./build/win32/vs10/gir.vs10.install -./build/win32/vs9/gir.vsprops: ./build/win32/vs9/gir.vs9.install $(top_srcdir)/build/win32/vs9/gir.vspropsin - $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gir.vspropsin >$@ +./build/win32/vs9/gi-install.vsprops: ./build/win32/vs9/gir.vs9.install $(top_srcdir)/build/win32/vs9/gi-install.vspropsin + $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gi-install.vspropsin >$@ rm ./build/win32/vs9/gir.vs9.install ./build/win32/vs10/gir.props: ./build/win32/vs10/gir.vs10.install $(top_srcdir)/build/win32/vs10/gir.propsin diff --git a/build/Makefile.am b/build/Makefile.am index 0f81afe3..42ce0fb1 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -1 +1,7 @@ SUBDIRS = win32 + +EXTRA_DIST = \ + detectenv_msvc.mak \ + gen-cairo-gir.py \ + gi-introspection-msvc.mak \ + introspection-msvc.mak diff --git a/build/detectenv_msvc.mak b/build/detectenv_msvc.mak new file mode 100644 index 00000000..3e3dcdf4 --- /dev/null +++ b/build/detectenv_msvc.mak @@ -0,0 +1,65 @@ +# 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 +!else +VSVER = 0 +!endif + +!if "$(VSVER)" == "0" +MSG = ^ +This NMake Makefile set supports Visual Studio^ +9 (2008) through 12 (2013). Your Visual Studio^ +version is not supported. +!error $(MSG) +!endif + +VALID_CFGSET = FALSE +!if "$(CFG)" == "release" || "$(CFG)" == "debug" +VALID_CFGSET = TRUE +!endif + +!if "$(CFG)" == "release" +CFLAGS_ADD = /MD /O2 +!else +CFLAGS_ADD = /MDd /Od /Zi /DG_ENABLE_DEBUG +!endif + +!if "$(PLAT)" == "x64" +LDFLAGS_ARCH = /machine:x64 +!else +LDFLAGS_ARCH = /machine:x86 +!endif \ No newline at end of file diff --git a/build/gen-cairo-gir.py b/build/gen-cairo-gir.py new file mode 100644 index 00000000..a4b4fff4 --- /dev/null +++ b/build/gen-cairo-gir.py @@ -0,0 +1,59 @@ +#!/usr/bin/python +# +# Expand the bundled cairo-1.0.gir.in files +# for use in Visual C++ builds of G-I +# +# Author: Fan, Chun-wei +# Date: January 20, 2014 +# +# (Adapted from setup.py in +# $(glib_src_root)/build/win32/setup.py written by Shixin Zeng) + +import os +import sys +import re +import string +import subprocess +import optparse + +def process_in(src, dest, vars): + RE_VARS = re.compile(r'%(\w+?)%') + with open(src, 'r') as s: + with open(dest, 'w') as d: + for i in s: + i = RE_VARS.sub(lambda x: str(vars[x.group(1)]), i) + d.write(i) + +def parent_dir(path): + if not os.path.isabs(path): + path = os.path.abspath(path) + if os.path.isfile(path): + path = os.path.dirname(path) + return os.path.split(path)[0] + +def setup_vars_cairo(src, dest, dllname): + vars = {} + vars['CAIRO_GIR_PACKAGE'] = 'cairo-gobject' + vars['CAIRO_SHARED_LIBRARY'] = '%s' % dllname + process_in (src, dest, vars) + +def main(argv): + parser = optparse.OptionParser() + parser.add_option('--dllname', dest='dllname', action='store', help='Full file name of the Cairo-GObject DLL for the Cairo Introspection File') + parser.add_option('--vsver', dest='vsver', action='store', help='Version of Visual Studio used, 9 or 2008 for VS 2008, 10 or 2010 for VS2010, 11 or 2012 for VS2012') + opt, args = parser.parse_args(argv) + if opt.dllname is None: + print ('dllname must be specified. Please refer to %s -h for more information' % os.path.basename(__file__)) + sys.exit() + + # Get the srcroot and the path where the bundled .gir files reside in the package + srcroot = parent_dir(__file__) + preset_gir_path = os.path.join(srcroot, 'gir') + + # Set up variables in cairo-1.0.gir.in to produce cairo-1.0.gir + setup_vars_cairo(os.path.join(preset_gir_path, 'cairo-1.0.gir.in'), + os.path.join(preset_gir_path, 'cairo-1.0.gir'), + opt.dllname) + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/build/gi-introspection-msvc.mak b/build/gi-introspection-msvc.mak new file mode 100644 index 00000000..284d5c19 --- /dev/null +++ b/build/gi-introspection-msvc.mak @@ -0,0 +1,210 @@ +# NMake Makefile to build Introspection Files for G-I + +# Change or pass in as a variable/env var if needed +# The main DLLs that are used to build introspection files that are "installed" +GI_DLLNAME = girepository-1-vs$(VSVER) +GLIB_DLLNAME = glib-2-vs$(VSVER) +GMODULE_DLLNAME = gmodule-2-vs$(VSVER) +GOBJECT_DLLNAME = gobject-2-vs$(VSVER) +GIO_DLLNAME = gio-2-vs$(VSVER) +CAIROGOBJECT_DLLNAME= cairo-gobject-vs$(VSVER) + +# Please do not change anything after this line + +!include detectenv_msvc.mak + +GI_APIVERSION = 1.0 +GLIB_APIVERSION = 2.0 + +CHECK_PACKAGE = gio-$(GLIB_APIVERSION) + +!include introspection-msvc.mak + +BINDIR = ..\build\win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin +G_IR_SCANNER_CURRENT = ..\tools\g-ir-scanner +G_IR_COMPILER_CURRENT = $(BINDIR)\g-ir-compiler.exe + +!if "$(PLAT)" == "x64" +TIME_T_DEFINE = -Dtime_t=long long +!else +TIME_T_DEFINE = -Dtime_t=long +!endif + +# The .gir's that are in $(srcroot)/gir, applicable to Windows +# cairo-1.0.gir is not listed as it needs to be processed first +bundled_girs = \ + win32-1.0.gir \ + fontconfig-2.0.gir \ + freetype2-2.0.gir \ + GL-1.0.gir \ + libxml2-2.0.gir + +# The .typelib's that are build from the .gir's bundled with the +# G-I package, applicable to Windows +bundled_typelibs = \ + cairo-1.0.typelib \ + fontconfig-2.0.typelib \ + freetype2-2.0.typelib \ + GL-1.0.typelib \ + libxml2-2.0.typelib \ + win32-1.0.typelib + +# The .gir's for GLib/G-I that are built and "installed" +built_install_girs = \ + GLib-$(GLIB_APIVERSION).gir \ + GModule-$(GLIB_APIVERSION).gir \ + GObject-$(GLIB_APIVERSION).gir \ + Gio-$(GLIB_APIVERSION).gir \ + GIRepository-$(GLIB_APIVERSION).gir + +# The .typelib's for GLib/G-I that are built and "installed" +built_install_typelibs = \ + GLib-$(GLIB_APIVERSION).typelib \ + GModule-$(GLIB_APIVERSION).typelib \ + GObject-$(GLIB_APIVERSION).typelib \ + Gio-$(GLIB_APIVERSION).typelib \ + GIRepository-$(GLIB_APIVERSION).typelib + +!include introspection-msvc.mak + +!if "$(BUILD_INTROSPECTION)" == "TRUE" +all: setgirbuildnev $(built_install_girs) $(built_install_typelibs) $(bundled_girs) $(bundled_typelibs) + +setgirbuildnev: + @set CC=$(CC) + @set PYTHONPATH=..;$(BINDIR) + @set PATH=$(BINDIR);$(BASEDIR)\bin;$(PATH);$(MINGWDIR)\bin + @set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) + @set LIB=win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(BASEDIR)\lib;$(LIB) + @set UNINSTALLED_INTROSPECTION_SRCDIR=.. + +glib_list: + @-echo Generating file list for GLib... + @-echo $(BASEDIR)\lib\glib-2.0\include\glibconfig.h> $@ + @-for /f %%a in ('dir /b $(BASEDIR)\include\glib-2.0\glib\*.h') do @echo $(BASEDIR)\include\glib-2.0\glib\%%a>> $@ + @-echo $(BASEDIR)\include\glib-2.0\gobject\glib-types.h>> $@ + @-echo ..\gir\glib-2.0.c>> $@ + +gobject_list: + @-echo Generating file list for GObject... + @-type NUL > $@ + @-for /f %%a in ('dir /b $(BASEDIR)\include\glib-2.0\gobject\*.h') do @if not %%a == glib-types.h @echo $(BASEDIR)\include\glib-2.0\gobject\%%a>> $@ + @-echo ..\gir\gobject-2.0.c>> $@ + +gio_list: + @-echo Generating file list for GIO... + @-type NUL > $@ + @-for /f %%a in ('dir /b $(BASEDIR)\include\gio-win32-2.0\gio\*.h') do @echo $(BASEDIR)\include\gio-win32-2.0\gio\%%a>> $@ + @-for /f %%a in ('dir /b $(BASEDIR)\include\glib-2.0\gio\*.h') do @if not %%a == gsettingsbackend.h @echo $(BASEDIR)\include\glib-2.0\gio\%%a>> $@ + @-echo ..\gir\gio-2.0.c>> $@ + +gi_list: + @-echo Generating file list for girepository... + @-echo ..\girepository\girepository.h > $@ + @-echo ..\girepository\girepository.c >> $@ + @-for /f %%a in ('dir /b ..\girepository\gi*info.c') do @echo ..\girepository\%%a >> $@ + @-for /f %%a in ('dir /b ..\girepository\gi*info.h') do @echo ..\girepository\%%a >> $@ + @-echo ..\girepository\gitypelib.h >> $@ + @-echo ..\girepository\gitypes.h >> $@ + +# Make a copy of girepository-1.0.lib to girepository-2.0.lib for use +# during the linking stage of the dump binary, in the generation +# of GIRepository-2.0.gir (the resulting binary will still be +# linked and referring to the original girepository DLL) +win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin\girepository-$(GLIB_APIVERSION).lib: win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin\girepository-$(GI_APIVERSION).lib + @-copy /b win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin\girepository-$(GI_APIVERSION).lib $@ + +# Generated .gir files for GLib/GModule/GObject/Gio/GIRepository +GLib-$(GLIB_APIVERSION).gir: glib_list + @-echo Generating $@... + $(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \ + --add-include-path=..\gir --add-include-path=. --namespace=GLib --nsversion=$(GLIB_APIVERSION) \ + --no-libtool --pkg=glib-$(GLIB_APIVERSION) --include=win32-$(GI_APIVERSION) --library=$(GLIB_DLLNAME) --library=$(GOBJECT_DLLNAME) \ + --external-library --reparse-validate --identifier-prefix=G --symbol-prefix=g \ + --symbol-prefix=glib --c-include="glib.h" -I$(BASEDIR)\include\glib-$(GLIB_APIVERSION) \ + -I$(BASEDIR)\lib\glib-2.0\include -I$(BASEDIR)\include -DGETTEXT_PACKAGE=Dummy \ + -DGLIB_COMPILATION -D__G_I18N_LIB_H__ --filelist=glib_list -o $@ + +GModule-$(GLIB_APIVERSION).gir: GLib-$(GLIB_APIVERSION).gir + @-echo Generating $@... + $(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \ + --add-include-path=..\gir --add-include-path=. --namespace=GModule --nsversion=2.0 \ + --no-libtool --include=GLib-$(GLIB_APIVERSION) --pkg=gmodule-$(GLIB_APIVERSION) --library=$(GMODULE_DLLNAME) \ + --external-library --reparse-validate --identifier-prefix=G --c-include="gmodule.h" \ + -I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include -I$(BASEDIR)\include \ + $(BASEDIR)\include\glib-2.0\gmodule.h ..\gir\gmodule-2.0.c -o $@ + +GObject-$(GLIB_APIVERSION).gir: gobject_list GModule-$(GLIB_APIVERSION).gir + @-echo Generating $@... + $(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \ + --add-include-path=..\gir --add-include-path=. --namespace=GObject --nsversion=$(GLIB_APIVERSION) \ + --no-libtool --include=GLib-$(GLIB_APIVERSION) --pkg=gobject-$(GLIB_APIVERSION) --library=$(GOBJECT_DLLNAME) \ + --external-library --reparse-validate --identifier-prefix=G --c-include="glib-gobject.h" \ + -I$(BASEDIR)/include/glib-2.0 -I$(BASEDIR)/lib/glib-2.0/include -I$(BASEDIR)/include \ + -DGOBJECT_COMPILATION --filelist=gobject_list -o $@ + +Gio-$(GLIB_APIVERSION).gir: gio_list GObject-$(GLIB_APIVERSION).gir + @-echo Generating $@... + $(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \ + --add-include-path=..\gir --add-include-path=. --namespace=Gio --nsversion=$(GLIB_APIVERSION) \ + --no-libtool --pkg=gio-$(GLIB_APIVERSION) --pkg=gio-windows-$(GLIB_APIVERSION) --include=GObject-$(GLIB_APIVERSION) \ + --library=$(GIO_DLLNAME) --external-library --reparse-validate --warn-all \ + --identifier-prefix=G --include=GLib-$(GLIB_APIVERSION) --c-include="gio/gio.h" -DGIO_COMPILATION \ + -I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \ + -I$(BASEDIR)\include --filelist=gio_list -o $@ + +GIRepository-$(GLIB_APIVERSION).gir: gi_list GObject-$(GLIB_APIVERSION).gir win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin\girepository-$(GLIB_APIVERSION).lib + @-echo Generating $@... + $(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose --warn-all \ + --add-include-path=..\gir --add-include-path=. --namespace=GIRepository --nsversion=$(GLIB_APIVERSION) \ + --identifier-prefix=GI --symbol-prefix=g --c-include="girepository.h" --add-include-path=. \ + --no-libtool --pkg=gobject-$(GLIB_APIVERSION) --include=GObject-$(GLIB_APIVERSION) \ + --library=girepository-1-vs%VSVER% -I..\girepository -I.. -I%BASEDIR%\include \ + -I%BASEDIR%\include\glib-2.0 -I%BASEDIR%\lib\glib-2.0\include --filelist=gi_list \ + -DGI_COMPILATION -o $@ + +# Bundled cairo-1.0.gir.in processing +cairo-1.0.gir: ..\gir\cairo-1.0.gir.in + @-echo Generating and copying $@ from $*.gir.in... + @-if not exist ..\gir\$*.gir $(PYTHON2) gen-cairo-gir.py --dllname=$(CAIROGOBJECT_DLLNAME).dll + @-copy ..\gir\$*.gir $@ + +# Copy the .gir's bundled with G-I to this folder +$(bundled_girs): ..\gir\win32-1.0.gir ..\gir\fontconfig-2.0.gir ..\gir\freetype2-2.0.gir ..\gir\GL-1.0.gir ..\gir\libxml2-2.0.gir + @-echo Copying the bundled $*.gir that came with the GobjectIntrospection package... + @-copy ..\gir\$*.gir $@ + +# Generate .typelib's from generated .gir's +$(built_install_typelibs): $(built_install_girs) + @-echo Compiling $*.typelib... + @-$(G_IR_COMPILER_CURRENT) --includedir=. --debug --verbose $*.gir -o $@ + +# Generate .typelib's from bundled .gir's +$(bundled_typelibs): cairo-1.0.gir $(bundled_girs) + @-echo Compiling the bundled $*.gir that came with the GobjectIntrospection package... + @-$(G_IR_COMPILER_CURRENT) --includedir=. --debug --verbose $*.gir -o $@ + +install-introspection: setgirbuildnev $(built_install_girs) $(built_install_typelibs) $(bundled_girs) cairo-1.0.gir $(bundled_typelibs) + @-copy cairo-1.0.gir $(G_IR_INCLUDEDIR) + @-for %a in ($(built_install_girs)) do @copy %a $(G_IR_INCLUDEDIR) + @-for %b in ($(built_install_typelibs)) do @copy %b $(G_IR_TYPELIBDIR) + @-for %c in ($(bundled_girs)) do @copy %c $(G_IR_INCLUDEDIR) + @-for %d in ($(bundled_typelibs)) do @copy %d $(G_IR_TYPELIBDIR) + +!else +all: install-introspection + +install-introspection: + @-echo $(ERROR_MSG) +!endif + +clean: + @-del /f/q ..\gir\cairo-$(GI_APIVERSION).gir + @-del /f/q *.typelib + @-del /f/q *.gir + @-del /f/q win32\vs$(VSVER)\$(CFG)\$(PLAT)\bin\girepository-$(GLIB_APIVERSION).lib + @-del /f/q gi_list + @-del /f/q gio_list + @-del /f/q gobject_list + @-del /f/q glib_list + @-del /f/q *.pyc diff --git a/build/introspection-msvc.mak b/build/introspection-msvc.mak new file mode 100644 index 00000000..beff817d --- /dev/null +++ b/build/introspection-msvc.mak @@ -0,0 +1,79 @@ +# Common Utility NMake Makefile Template +# Used to Generate Introspection files for various Projects + +# 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 + +BASEDIR = ..\..\vs$(VSVER)\$(PLAT) +GIR_SUBDIR = share\gir-1.0 +GIR_TYPELIBDIR = lib\girepository-1.0 +G_IR_SCANNER = $(BASEDIR)\bin\g-ir-scanner +G_IR_COMPILER = $(BASEDIR)\bin\g-ir-compiler.exe +G_IR_INCLUDEDIR = $(BASEDIR)\$(GIR_SUBDIR) +G_IR_TYPELIBDIR = $(BASEDIR)\$(GIR_TYPELIBDIR) + +# Note: The PYTHON2 must be a Python 2.6.x or 2.7.x Interpretor! +# Either having python.exe from Python 2.6.x/2.7.x in your PATH will work +# or passing in PYTHON2= will do + +# This is required, and gobject-introspection needs to be built +# before this can be successfully run. +PYTHON2=python + +# Don't change anything following this line! +VALID_PKG_CONFIG_PATH = FALSE +VALID_GCC_INSTPATH = FALSE + +MSG_INVALID_PKGCONFIG = You must set or specifiy a valid PKG_CONFIG_PATH +MSG_INVALID_MINGWDIR = You must set or specifiy a valid MINGWDIR, where gcc.exe can be found in %MINGWDIR%\bin +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 ![IF EXIST %MINGWDIR%\bin\gcc.exe @echo VALID_GCC_INSTPATH=TRUE > gcccheck.x] +!endif + +!if ![IF NOT EXIST %MINGWDIR%\bin\gcc.exe @echo VALID_GCC_INSTPATH=FALSE > gcccheck.x] +!endif + +!include gcccheck.x + +!if ![del $(ERRNUL) /q/f pkgconfig.chksize gcccheck.x] +!endif + +VALID_CFGSET = FALSE +!if "$(CFG)" == "release" || "$(CFG)" == "debug" +VALID_CFGSET = TRUE +!endif + +!if "$(VALID_GCC_INSTPATH)" != "TRUE" +BUILD_INTROSPECTION = FALSE +ERROR_MSG = $(MSG_INVALID_MINGWDIR) +!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/vs10/annotation.vcxproj b/build/win32/vs10/annotation.vcxproj index b732cadf..eb194f43 100644 --- a/build/win32/vs10/annotation.vcxproj +++ b/build/win32/vs10/annotation.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/everything.vcxproj b/build/win32/vs10/everything.vcxproj index fe135282..a0afe93c 100644 --- a/build/win32/vs10/everything.vcxproj +++ b/build/win32/vs10/everything.vcxproj @@ -94,7 +94,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -122,7 +122,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -151,7 +151,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -182,7 +182,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/foo.vcxproj b/build/win32/vs10/foo.vcxproj index 480f11e1..237784fc 100644 --- a/build/win32/vs10/foo.vcxproj +++ b/build/win32/vs10/foo.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/gettype.vcxproj b/build/win32/vs10/gettype.vcxproj index 197e1c92..44c8d040 100644 --- a/build/win32/vs10/gettype.vcxproj +++ b/build/win32/vs10/gettype.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/gimarshallingtests.vcxproj b/build/win32/vs10/gimarshallingtests.vcxproj index d87fa7c4..9100eae8 100644 --- a/build/win32/vs10/gimarshallingtests.vcxproj +++ b/build/win32/vs10/gimarshallingtests.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/gir.propsin b/build/win32/vs10/gir.propsin index 47c855c3..49aaa6c8 100644 --- a/build/win32/vs10/gir.propsin +++ b/build/win32/vs10/gir.propsin @@ -5,7 +5,7 @@ 10 $(SolutionDir)\..\..\.. $(GlibEtcInstallRoot) - 1.0 + 1.0 $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName) echo EXPORTS > $(DefDir)\girepository.def @@ -103,7 +103,7 @@ goto DONE lib - -$(GIApiVersion)-0 + -$(ApiVersion)-0 -1-vs10 $(LibGISeparateVS10DllPrefix) @@ -131,20 +131,20 @@ copy ..\..\..\tools\g-ir-scanner $(CopyDir)\bin copy $(SolutionDir)$(Configuration)\$(Platform)\bin\_giscanner.pyd $(CopyDir)\lib\gobject-introspection\giscanner -mkdir $(CopyDir)\share\gir-$(GIApiVersion) +mkdir $(CopyDir)\share\gir-$(ApiVersion) -copy $(SolutionDir)$(Configuration)\$(Platform)\share\gir-$(GIApiVersion)\*.gir $(CopyDir)\share\gir-$(GIApiVersion) +copy $(SolutionDir)$(Configuration)\$(Platform)\share\gir-$(ApiVersion)\*.gir $(CopyDir)\share\gir-$(ApiVersion) -mkdir $(CopyDir)\share\gobject-introspection-$(GIApiVersion) +mkdir $(CopyDir)\share\gobject-introspection-$(ApiVersion) -copy ..\..\..\girepository\gdump.c $(CopyDir)\share\gobject-introspection-$(GIApiVersion) +copy ..\..\..\girepository\gdump.c $(CopyDir)\share\gobject-introspection-$(ApiVersion) -mkdir $(CopyDir)\lib\girepository-$(GIApiVersion) +mkdir $(CopyDir)\lib\girepository-$(ApiVersion) -copy $(SolutionDir)$(Configuration)\$(Platform)\bin\girepository-$(GIApiVersion).lib $(CopyDir)\lib +copy $(SolutionDir)$(Configuration)\$(Platform)\bin\girepository-$(ApiVersion).lib $(CopyDir)\lib -copy $(SolutionDir)$(Configuration)\$(Platform)\lib\girepository-$(GIApiVersion)\*.typelib $(CopyDir)\lib\girepository-$(GIApiVersion) +copy $(SolutionDir)$(Configuration)\$(Platform)\lib\girepository-$(ApiVersion)\*.typelib $(CopyDir)\lib\girepository-$(ApiVersion) @@ -188,8 +188,8 @@ if not exist ..\..\..\tools\g-ir-annotation-tool copy ..\..\..\tools\g-ir-annota $(CopyDir) - - $(GIApiVersion) + + $(ApiVersion) $(DefDir) diff --git a/build/win32/vs10/girepository.vcxprojin b/build/win32/vs10/girepository.vcxprojin index ef8b96f9..fe70a0d3 100644 --- a/build/win32/vs10/girepository.vcxprojin +++ b/build/win32/vs10/girepository.vcxprojin @@ -94,7 +94,7 @@ $(IntDir)girepository.def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -122,7 +122,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -151,7 +151,7 @@ $(IntDir)girepository.def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -182,7 +182,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/gtkfrob.vcxproj b/build/win32/vs10/gtkfrob.vcxproj index efbbb63c..10297ca1 100644 --- a/build/win32/vs10/gtkfrob.vcxproj +++ b/build/win32/vs10/gtkfrob.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/regress.vcxproj b/build/win32/vs10/regress.vcxproj index f4b7e288..052bf0f7 100644 --- a/build/win32/vs10/regress.vcxproj +++ b/build/win32/vs10/regress.vcxproj @@ -90,7 +90,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -114,7 +114,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -139,7 +139,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -166,7 +166,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/sletter.vcxproj b/build/win32/vs10/sletter.vcxproj index bfaea789..b4b341ff 100644 --- a/build/win32/vs10/sletter.vcxproj +++ b/build/win32/vs10/sletter.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/testinherit.vcxproj b/build/win32/vs10/testinherit.vcxproj index 65c914b8..5eab228e 100644 --- a/build/win32/vs10/testinherit.vcxproj +++ b/build/win32/vs10/testinherit.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs10/utility.vcxproj b/build/win32/vs10/utility.vcxproj index 8ef0fe82..044ed9ad 100644 --- a/build/win32/vs10/utility.vcxproj +++ b/build/win32/vs10/utility.vcxproj @@ -89,7 +89,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -112,7 +112,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX86 @@ -136,7 +136,7 @@ ..\$(ProjectName).def true Windows - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 @@ -162,7 +162,7 @@ Windows true true - $(TargetDir)$(ProjectName)-$(GIApiVersion).lib + $(TargetDir)$(ProjectName)-$(ApiVersion).lib MachineX64 diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am index ed82cbca..a385ce65 100644 --- a/build/win32/vs9/Makefile.am +++ b/build/win32/vs9/Makefile.am @@ -1,16 +1,19 @@ EXTRA_DIST = \ gobject-introspection.sln \ + gi-build-defines.vsprops \ + gi-extra-paths.vsprops \ + gi-gen-srcs.vsprops \ + gi-install.vspropsin \ + gi-install.vsprops \ + gi-version-paths.vsprops \ + gi-prebuild.vcproj \ girepository.vcprojin \ - gir.vspropsin \ - gir.vsprops \ annotation.vcproj \ cmph-bdz-test.vcproj \ cmph.vcprojin \ - everything.vcproj \ foo.vcproj \ g-ir-compiler.vcprojin \ g-ir-generate.vcproj \ - generate_typelibs.vcproj \ gettype.vcproj \ gimarshallingtests.vcproj \ glib-print.vcproj \ @@ -23,8 +26,8 @@ EXTRA_DIST = \ _giscanner.vcproj \ README.txt -gir.vsprops: $(top_srcdir)/build/win32/vs9/gir.vspropsin gir.vs9.install - $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gir.vspropsin >$@ +gi-install.vsprops: $(top_srcdir)/build/win32/vs9/gi-install.vspropsin gir.vs9.install + $(CPP) -P - <$(top_srcdir)/build/win32/vs9/gi-install.vspropsin >$@ rm gir.vs9.install -CLEANFILES = gir.vsprops +CLEANFILES = gir-install.vsprops diff --git a/build/win32/vs9/README.txt b/build/win32/vs9/README.txt index 579e5ece..36b1ddd4 100644 --- a/build/win32/vs9/README.txt +++ b/build/win32/vs9/README.txt @@ -59,16 +59,40 @@ http://www.gtk.org/download/win32.php [32-bit] http://www.gtk.org/download/win64.php [64-bit] *** Note! *** -Please note that due to numerous possible configurations on Python, some environmental -variables need to be set before launching the gobject-introsection.sln solution file. - -These variables are namely: -PYTHONDIR: Root installation folder of your Python interpretor, where python.exe is - located. Currently only Python 2.6.x and 2.7.x is supported. - It must match your build configuration (Win32 or x64/amd64) +Please note that due to numerous possible configurations on Python, PKG_CONFIG_PATH and +MinGW, the build of G-I is now a 2-step process: one with the Visual Studio Projects that +will build the libraries, tools, Python Module and test DLLs (except for the everything +test), and the other one with NMake Makefiles for building the introspection files. +Please note that if one needs to change the installation location +of Python, one needs to change the values of PythonDir (for x86/Win32 builds) and/or +PythonDirX64 (for x64 builds) in gi-extra-paths.vsprops + +The use of Visual Studio Projects will no longer require the setting of environmental +variables, but the following environmental variables are needed (either by using "set xxx=yyy" +or by nmake -f gi-introspection-msvc.mak xxx=yyy) for building the introspection files (which +should be done after successfully building the Project Files): + +PYTHON2: Full path to your Python 2.6.x/2.7.x interpretor (python.exe) if it is + not in your PATH. Please note that only 2.6.x and 2.7.x works at this time. + You need to use a x64/amd64 version of Python for x64 builds, and a Win32/x86 + version of Python for Win32/x86 builds PKG_CONFIG_PATH: Location of the .pc (pkg-config) files, especially for the GLib .pc files. MINGWDIR: Root installation folder for your Windows GCC (such as MinGW). For example, if your gcc executable (gcc.exe) is in c:\mingw\bin, use "set MINGWDIR=c:\mingw" + You need to use a x64/amd64 version of gcc for x64 builds, and a Win32/x86 + version of gcc for Win32/x86 builds + +GCC is currently needed to as the GCC preprocessor is used to create the introspection dump source +file, which is then compiled with the Visual C++ compiler to produce the .gir files. + +Please see $(srcroot)\build\gi-introspection-msvc.mak for more details. Doing +"nmake -f gi-introspection-msvc.mak (options omitted)" will build the various introspection files, +"nmake -f gi-introspection-msvc.mak tests-introspection" will build the introspection files for the tests, +and "nmake -f gi-introspection-msvc.mak (options omitted) install-introspection" will copy the introspection +files to \vs9\\share\gir-1.0 (.gir files) and \vs9\\lib\girepository-1.0 +(.typelib files) + + *** End of Note! *** The "install" project will copy build results and headers into their @@ -77,9 +101,6 @@ built DLLs go into \vs9\\bin, built LIBs into \vs9\\lib and gobject-introspection headers into \vs9\\include\gobject-introsection-1.0. -The generated .gir files will end up in \vs9\\share\gir-1.0 -and .typelib files will end up in \vs9\\lib\girepository-1.0 - This is then from where project files higher in the stack are supposed to look for them, not from a specific gobject-introspection source tree. diff --git a/build/win32/vs9/_giscanner.vcproj b/build/win32/vs9/_giscanner.vcproj index 3619a2fb..8f1e2a6e 100644 --- a/build/win32/vs9/_giscanner.vcproj +++ b/build/win32/vs9/_giscanner.vcproj @@ -22,16 +22,13 @@ - - - - - - - - diff --git a/build/win32/vs9/cmph-bdz-test.vcproj b/build/win32/vs9/cmph-bdz-test.vcproj index 0bd8106b..d83bcdb5 100644 --- a/build/win32/vs9/cmph-bdz-test.vcproj +++ b/build/win32/vs9/cmph-bdz-test.vcproj @@ -22,12 +22,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/win32/vs9/foo.vcproj b/build/win32/vs9/foo.vcproj index 3a2aeef2..f88dfd8c 100644 --- a/build/win32/vs9/foo.vcproj +++ b/build/win32/vs9/foo.vcproj @@ -22,12 +22,9 @@ - - - - diff --git a/build/win32/vs9/g-ir-compiler.vcprojin b/build/win32/vs9/g-ir-compiler.vcprojin index f08b9195..b18648ff 100644 --- a/build/win32/vs9/g-ir-compiler.vcprojin +++ b/build/win32/vs9/g-ir-compiler.vcprojin @@ -22,16 +22,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/win32/vs9/gettype.vcproj b/build/win32/vs9/gettype.vcproj index 5806277c..d4c18894 100644 --- a/build/win32/vs9/gettype.vcproj +++ b/build/win32/vs9/gettype.vcproj @@ -22,12 +22,9 @@ - - - - diff --git a/build/win32/vs9/gi-build-defines.vsprops b/build/win32/vs9/gi-build-defines.vsprops new file mode 100644 index 00000000..12cd0cf3 --- /dev/null +++ b/build/win32/vs9/gi-build-defines.vsprops @@ -0,0 +1,29 @@ + + + + + + + diff --git a/build/win32/vs9/gi-extra-paths.vsprops b/build/win32/vs9/gi-extra-paths.vsprops new file mode 100644 index 00000000..83c1d416 --- /dev/null +++ b/build/win32/vs9/gi-extra-paths.vsprops @@ -0,0 +1,18 @@ + + + + + + + diff --git a/build/win32/vs9/gi-gen-srcs.vsprops b/build/win32/vs9/gi-gen-srcs.vsprops new file mode 100644 index 00000000..3b9c0b0d --- /dev/null +++ b/build/win32/vs9/gi-gen-srcs.vsprops @@ -0,0 +1,39 @@ + + + + + + + + diff --git a/build/win32/vs9/gi-install.vspropsin b/build/win32/vs9/gi-install.vspropsin new file mode 100644 index 00000000..eb898d8d --- /dev/null +++ b/build/win32/vs9/gi-install.vspropsin @@ -0,0 +1,39 @@ + + + + diff --git a/build/win32/vs9/gi-prebuild.vcproj b/build/win32/vs9/gi-prebuild.vcproj new file mode 100644 index 00000000..8f911ef9 --- /dev/null +++ b/build/win32/vs9/gi-prebuild.vcproj @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/win32/vs9/gi-version-paths.vsprops b/build/win32/vs9/gi-version-paths.vsprops new file mode 100644 index 00000000..13a2579a --- /dev/null +++ b/build/win32/vs9/gi-version-paths.vsprops @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + diff --git a/build/win32/vs9/gimarshallingtests.vcproj b/build/win32/vs9/gimarshallingtests.vcproj index eb970926..89b850cf 100644 --- a/build/win32/vs9/gimarshallingtests.vcproj +++ b/build/win32/vs9/gimarshallingtests.vcproj @@ -22,12 +22,9 @@ - - - - diff --git a/build/win32/vs9/gir.vspropsin b/build/win32/vs9/gir.vspropsin deleted file mode 100644 index a42b214b..00000000 --- a/build/win32/vs9/gir.vspropsin +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/win32/vs9/girepository.vcprojin b/build/win32/vs9/girepository.vcprojin index 12436213..438aa3d4 100644 --- a/build/win32/vs9/girepository.vcprojin +++ b/build/win32/vs9/girepository.vcprojin @@ -22,17 +22,14 @@ - - - - - - - - - - - - - - - - @@ -226,7 +174,40 @@ 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}" - > + > + + + + + + + + + + + + + diff --git a/build/win32/vs9/glib-print.vcproj b/build/win32/vs9/glib-print.vcproj index 0491ebac..f269dca8 100644 --- a/build/win32/vs9/glib-print.vcproj +++ b/build/win32/vs9/glib-print.vcproj @@ -22,12 +22,9 @@ - - - - - - - - diff --git a/build/win32/vs9/install.vcproj b/build/win32/vs9/install.vcproj index 04cda9c7..58ad177b 100644 --- a/build/win32/vs9/install.vcproj +++ b/build/win32/vs9/install.vcproj @@ -21,7 +21,7 @@ - - - - diff --git a/build/win32/vs9/sletter.vcproj b/build/win32/vs9/sletter.vcproj index 706166b2..aaef2650 100644 --- a/build/win32/vs9/sletter.vcproj +++ b/build/win32/vs9/sletter.vcproj @@ -22,12 +22,9 @@ - - - - diff --git a/build/win32/vs9/testinherit.vcproj b/build/win32/vs9/testinherit.vcproj index fd62b906..b5d26c7b 100644 --- a/build/win32/vs9/testinherit.vcproj +++ b/build/win32/vs9/testinherit.vcproj @@ -22,12 +22,9 @@ - - - - diff --git a/build/win32/vs9/utility.vcproj b/build/win32/vs9/utility.vcproj index 7d510324..44251dd3 100644 --- a/build/win32/vs9/utility.vcproj +++ b/build/win32/vs9/utility.vcproj @@ -22,12 +22,9 @@ - - - - -- cgit v1.2.1