summaryrefslogtreecommitdiff
path: root/win32/vs9
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2017-08-25 15:08:29 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2017-08-25 15:08:29 +0800
commit346c60ba0e13aeb5baf2d8e24ff121cb8d2ee64e (patch)
treea8470521e62e0d545574242efb97e3f5805300da /win32/vs9
parent6c4e0c59ace08547b891f102da1ac0364eeda72d (diff)
downloadpango-346c60ba0e13aeb5baf2d8e24ff121cb8d2ee64e.tar.gz
build: Integrate introspection build in MSVC projects
This adds the introspection NMake Makefiles buildable from within the Visual Studio projects, so that the whole Visual Studio build process would be simplified. At its current state, this will build the introspection files for PangoCairo and Pango, but does not include PangoFT2 support, so this is not supported in the [Release|Debug]_FC configs. For this to work, one needs to have a complete installation of GObject-introspection in $(GlibEtcInstallRoot), and will need to ensure that PythonDir (or PythonDirX64 on x64 systems) corresponds to the same Python series that was used to build GObject-Introspection. This needs to be built (and cleaned) separately as this is not built by default, by building/cleaning the pango-introspect project directly. In this commit, also rename the PythonPath entries in the projects and property sheets, so that we avoid getting confused with the PYTHONPATH envvar; and for Visual Studio 201x builds, we use Python 3.4.x by default 2010, 2012 and 2013, and 3.6.x by default for 2015 and 2017, as what is done now in GObject-Introspection projects.
Diffstat (limited to 'win32/vs9')
-rw-r--r--win32/vs9/Makefile.am1
-rw-r--r--win32/vs9/pango-build-defines.vsprops8
-rw-r--r--win32/vs9/pango-install.vspropsin4
-rw-r--r--win32/vs9/pango-introspect.vcproj76
-rw-r--r--win32/vs9/pango-version-paths.vsprops.in14
-rw-r--r--win32/vs9/pango.sln9
6 files changed, 107 insertions, 5 deletions
diff --git a/win32/vs9/Makefile.am b/win32/vs9/Makefile.am
index 2495d594..ecf9bb0a 100644
--- a/win32/vs9/Makefile.am
+++ b/win32/vs9/Makefile.am
@@ -18,6 +18,7 @@ EXTRA_DIST = \
pangocairo.vcprojin \
pangowin32.vcprojin \
pango-install.vcproj \
+ pango-introspect.vcproj \
stdint.h \
README.txt \
$(GENERATED_ITEMS)
diff --git a/win32/vs9/pango-build-defines.vsprops b/win32/vs9/pango-build-defines.vsprops
index 8a3cbd5f..7997fa50 100644
--- a/win32/vs9/pango-build-defines.vsprops
+++ b/win32/vs9/pango-build-defines.vsprops
@@ -51,4 +51,12 @@
Name="PangoCairoIncs"
Value="$(GlibEtcInstallRoot)\include\cairo"
/>
+ <UserMacro
+ Name="PangoIntrospectNMakeCmd"
+ Value="cd ..&#x0D;&#x0A;set VCInstallDir=$(VCInstallDir)&#x0D;&#x0A;nmake -f pango-introspection-msvc.mak CFG=$(ConfigurationName) PREFIX=$(GlibEtcInstallRoot)"
+ />
+ <UserMacro
+ Name="PangoIntrospectBuiltFiles"
+ Value="$(SolutionDir)\..\PangoCairo-1.0.gir;$(SolutionDir)\..\PangoCairo-1.0.typelib;$(SolutionDir)\..\Pango-1.0.gir;$(SolutionDir)\..\Pango-1.0.typelib"
+ />
</VisualStudioPropertySheet>
diff --git a/win32/vs9/pango-install.vspropsin b/win32/vs9/pango-install.vspropsin
index 81bc7ecb..e28a91a3 100644
--- a/win32/vs9/pango-install.vspropsin
+++ b/win32/vs9/pango-install.vspropsin
@@ -31,10 +31,10 @@ if exist ..\pangoft2.pc copy ..\pangoft2.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
/>
<UserMacro
Name="GenPangoPC"
- Value="if exist $(PythonPath)\python.exe $(PythonPath)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)"
+ Value="if exist $(PythonDir)\python.exe $(PythonDir)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)"
/>
<UserMacro
Name="GenPangoPCX64"
- Value="if exist $(PythonPathX64)\python.exe $(PythonPathX64)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)"
+ Value="if exist $(PythonDirX64)\python.exe $(PythonDirX64)\python.exe ..\pangopc.py --version=$(PangoMajorVersion).$(PangoMinorVersion).$(PangoMicroVersion) --prefix=$(CopyDir)"
/>
</VisualStudioPropertySheet>
diff --git a/win32/vs9/pango-introspect.vcproj b/win32/vs9/pango-introspect.vcproj
new file mode 100644
index 00000000..f0b930ce
--- /dev/null
+++ b/win32/vs9/pango-introspect.vcproj
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="pango-introspect"
+ ProjectGUID="{2FE2F832-D857-450E-99AF-549AC88422F2}"
+ Keyword="MakeFileProj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pango-build-defines.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
+ ReBuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
+ CleanCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
+ Output="$(PangoIntrospectBuiltFiles)"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pango-build-defines.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
+ ReBuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
+ CleanCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
+ Output="$(PangoIntrospectBuiltFiles)"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pango-build-defines.vsprops"
+ CharacterSet="2"
+ DeleteExtensionsOnClean=""
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParam) install-introspection"
+ ReBuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParam) clean install-introspection"
+ CleanCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
+ Output="$(PangoIntrospectBuiltFiles)"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ ConfigurationType="0"
+ InheritedPropertySheets=".\pango-build-defines.vsprops"
+ >
+ <Tool
+ Name="VCNMakeTool"
+ BuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParamX64) install-introspection"
+ ReBuildCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean install-introspection"
+ CleanCommandLine="$(PangoIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
+ Output="$(PangoIntrospectBuiltFiles)"
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioProject>
diff --git a/win32/vs9/pango-version-paths.vsprops.in b/win32/vs9/pango-version-paths.vsprops.in
index fc3b9e3f..f255ef7c 100644
--- a/win32/vs9/pango-version-paths.vsprops.in
+++ b/win32/vs9/pango-version-paths.vsprops.in
@@ -59,11 +59,19 @@
Value="$(PangoSeparateVSDllSuffix)"
/>
<UserMacro
- Name="PythonPath"
+ Name="PythonDir"
Value="c:\python27"
/>
<UserMacro
- Name="PythonPathX64"
- Value="$(PythonPath).x64"
+ Name="PythonDirX64"
+ Value="$(PythonDir).x64"
+ />
+ <UserMacro
+ Name="IntrospectPythonParam"
+ Value="PYTHON=$(PythonDir)\python.exe"
+ />
+ <UserMacro
+ Name="IntrospectPythonParamX64"
+ Value="PYTHON=$(PythonDirX64)\python.exe"
/>
</VisualStudioPropertySheet>
diff --git a/win32/vs9/pango.sln b/win32/vs9/pango.sln
index 4c945bc7..9131fa0f 100644
--- a/win32/vs9/pango.sln
+++ b/win32/vs9/pango.sln
@@ -27,6 +27,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pango-install", "pango-inst
{68CC80B9-7225-4FB5-B9AB-9C1DF50B6C76} = {68CC80B9-7225-4FB5-B9AB-9C1DF50B6C76}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pango-introspect", "pango-introspect.vcproj", "{2FE2F832-D857-450E-99AF-549AC88422F2}"
+ ProjectSection(ProjectDependencies) = postProject
+ {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -115,6 +120,10 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_FC|Win32.Build.0 = Release_FC|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_FC|x64.ActiveCfg = Release_FC|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Release_FC|x64.Build.0 = Release_FC|x64
+ {2FE2F832-D857-450E-99AF-549AC88422F2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2FE2F832-D857-450E-99AF-549AC88422F2}.Release|Win32.ActiveCfg = Release|Win32
+ {2FE2F832-D857-450E-99AF-549AC88422F2}.Debug|x64.ActiveCfg = Debug|x64
+ {2FE2F832-D857-450E-99AF-549AC88422F2}.Release|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE