[gtk+/gtk-3-8] Visual C++ Projects: Add rules to generate GTK DBus sources
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-8] Visual C++ Projects: Add rules to generate GTK DBus sources
- Date: Fri, 29 Nov 2013 02:10:23 +0000 (UTC)
commit e071a0c117949382dfb394e107b551af8a32f823
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Nov 29 10:10:13 2013 +0800
Visual C++ Projects: Add rules to generate GTK DBus sources
Since commit c66f194d the gtkdbusgenerated.[c|h] are not included in the
dist tarball and thus have to be generated, which broke the Visual C++
builds.
This patch adds custom build rules for the Visual C++ projects so that
gtkdbusgenerated.[c|h] will be generated upon building the GTK+ DLL
sources, so that the build will be fixed.
This also tells people building GTK+ from the projects that they need
to have Python 2/3 installed and the Python interpretor needs to be in
their PATH before building GTK+ from the projects.
build/win32/vs10/README.txt | 5 +++++
build/win32/vs10/gtk+.props | 14 ++++++++++++--
build/win32/vs10/gtk.vcxproj.filtersin | 5 ++---
build/win32/vs10/gtk.vcxprojin | 14 ++++++++++++++
build/win32/vs9/README.txt | 5 +++++
build/win32/vs9/gtk+.vsprops | 12 ++++++++++--
build/win32/vs9/gtk.vcprojin | 30 ++++++++++++++++++++++++++++++
7 files changed, 78 insertions(+), 7 deletions(-)
---
diff --git a/build/win32/vs10/README.txt b/build/win32/vs10/README.txt
index 64c62dd..e00b083 100644
--- a/build/win32/vs10/README.txt
+++ b/build/win32/vs10/README.txt
@@ -20,6 +20,11 @@ ATK and GLib. External dependencies are at least Cairo
gettext-runtime, fontconfig*, freetype*, expat*. See the
build/win32/vs10/README.txt file in glib for details where to unpack them.
+You will also need a Python 2.x/3.x interpretor installed on your system,
+which can be obtained from the official installers available from
+http://www.python.org. Please note that the Python interpretor (python.exe)
+needs to be in your path before attempting the build of GTK+.
+
It is recommended that one builds the dependencies with VS10 as far as
possible, especially those from and using the GTK+ stack (i.e. GLib,
Cairo, ATK, Pango, GDK-Pixbuf), so that crashes caused by mixing calls
diff --git a/build/win32/vs10/gtk+.props b/build/win32/vs10/gtk+.props
index 376b779..e1373bd 100644
--- a/build/win32/vs10/gtk+.props
+++ b/build/win32/vs10/gtk+.props
@@ -2,9 +2,9 @@
<Project DefaultTargets="Build" ToolsVersion="4.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
<PropertyGroup Label="UserMacros">
<VSVer>10</VSVer>
- <GlibEtcInstallRoot>..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
+ <GlibEtcInstallRoot>$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
<GlibEtcInstallRootFromBuildWin32>..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRootFromBuildWin32>
- <CopyDir>$(GlibEtcInstallRoot)</CopyDir>
+ <CopyDir>..\..\..\..\vs$(VSVer)\$(Platform)</CopyDir>
<DefDir>$(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)</DefDir>
<ApiVersion>3.0</ApiVersion>
<GtkBinaryVersion>3.0.0</GtkBinaryVersion>
@@ -710,6 +710,13 @@ cd vs$(VSVer)
</DoGenGir>
<GtkGenerateGdkDef>echo EXPORTS >"$(DefDir)\gdk.def" && cl /EP -DGDK_WINDOWING_WIN32
-DALL_FILES -DG_GNUC_CONST= ..\..\..\gdk\gdk.symbols >>"$(DefDir)\gdk.def"</GtkGenerateGdkDef>
<GtkGenerateGtkDef>echo EXPORTS >"$(DefDir)\gtk.def" && cl /EP -DGDK_WINDOWING_WIN32
-DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED=
-DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(DefDir)\gtk.def"</GtkGenerateGtkDef>
+ <GenerateGtkDbusBuiltSources>
+cd ..\..\..\gtk
+
+python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk
--generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml
+
+cd $(SolutionDir)
+ </GenerateGtkDbusBuiltSources>
<GtkLibtoolCompatibleDllPrefix>lib</GtkLibtoolCompatibleDllPrefix>
<GtkLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</GtkLibtoolCompatibleDllSuffix>
<GtkSeparateVSDllPrefix />
@@ -795,6 +802,9 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
<BuildMacro Include="GtkGenerateGtkDef">
<Value>$(GtkGenerateGtkDef)</Value>
</BuildMacro>
+ <BuildMacro Include="GenerateGtkDbusBuiltSources">
+ <Value>$(GenerateGtkDbusBuiltSources)</Value>
+ </BuildMacro>
<BuildMacro Include="GtkLibtoolCompatibleDllPrefix">
<Value>$(GtkLibtoolCompatibleDllPrefix)</Value>
</BuildMacro>
diff --git a/build/win32/vs10/gtk.vcxproj.filtersin b/build/win32/vs10/gtk.vcxproj.filtersin
index 2be438c..27c685a 100644
--- a/build/win32/vs10/gtk.vcxproj.filtersin
+++ b/build/win32/vs10/gtk.vcxproj.filtersin
@@ -36,8 +36,7 @@
<ClCompile Include="..\..\..\modules\input\thai-charprop.c"><Filter>Source Files</Filter></ClCompile>
</ItemGroup>
<ItemGroup>
- <CustomBuild Include="..\..\..\gdk\gtk.symbols">
- <Filter>Resource Files</Filter>
- </CustomBuild>
+ <CustomBuild Include="..\..\..\gdk\gtk.symbols"><Filter>Resource Files</Filter></CustomBuild>
+ <CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/build/win32/vs10/gtk.vcxprojin b/build/win32/vs10/gtk.vcxprojin
index dd7bfc7..f40f12b 100644
--- a/build/win32/vs10/gtk.vcxprojin
+++ b/build/win32/vs10/gtk.vcxprojin
@@ -177,6 +177,20 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkGenerateGtkDef)</Command>
<Outputs
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)gtk.def;%(Outputs)</Outputs>
</CustomBuild>
+ <CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ DBus
Sources...</Message>
+ <Command
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus
Sources...</Message>
+ <Command
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSources)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus
Sources...</Message>
+ <Command
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus
Sources...</Message>
+ <Command
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSources)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h%(Outputs)</Outputs>
+ </CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc" />
diff --git a/build/win32/vs9/README.txt b/build/win32/vs9/README.txt
index 7f0c6ba..0cf37f4 100644
--- a/build/win32/vs9/README.txt
+++ b/build/win32/vs9/README.txt
@@ -19,6 +19,11 @@ ATK and GLib. External dependencies are at least Cairo
gettext-runtime, fontconfig*, freetype*, expat*. See the
build/win32/vs9/README.txt file in glib for details where to unpack them.
+You will also need a Python 2.x/3.x interpretor installed on your system,
+which can be obtained from the official installers available from
+http://www.python.org. Please note that the Python interpretor (python.exe)
+needs to be in your path before attempting the build of GTK+.
+
It is recommended that one builds the dependencies with VS9 as far as
possible, especially those from and using the GTK+ stack (i.e. GLib,
Cairo, ATK, Pango, GDK-Pixbuf), so that crashes caused by mixing calls
diff --git a/build/win32/vs9/gtk+.vsprops b/build/win32/vs9/gtk+.vsprops
index cbc87e0..3c91bf8 100644
--- a/build/win32/vs9/gtk+.vsprops
+++ b/build/win32/vs9/gtk+.vsprops
@@ -33,7 +33,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

/>
<UserMacro
Name="GlibEtcInstallRoot"
- Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
+ Value="$(SolutionDir)\..\..\..\..\vs$(VSVer)\$(PlatformName)"
/>
<UserMacro
Name="GlibEtcInstallRootFromBuildWin32"
@@ -41,7 +41,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h

/>
<UserMacro
Name="CopyDir"
- Value="$(GlibEtcInstallRoot)"
+ Value="..\..\..\..\vs$(VSVer)\$(PlatformName)"
/>
<UserMacro
Name="ApiVersion"
@@ -446,6 +446,14 @@ cd vs$(VSVer)

Value="echo EXPORTS >"$(IntDir)\gtk.def" && cl /EP -DGDK_WINDOWING_WIN32
-DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED=
-DG_GNUC_PRINTF=;G_GNUC_PRINTF ..\..\..\gtk\gtk.symbols >>"$(IntDir)\gtk.def""
/>
<UserMacro
+ Name="GenerateGtkDbusBuiltSources"
+ Value="
+cd ..\..\..\gtk

+python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk
--generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml

+cd $(SolutionDir)

+ "
+ />
+ <UserMacro
Name="GtkLibtoolCompatibleDllPrefix"
Value="lib"
/>
diff --git a/build/win32/vs9/gtk.vcprojin b/build/win32/vs9/gtk.vcprojin
index 2d4c289..c74de73 100644
--- a/build/win32/vs9/gtk.vcprojin
+++ b/build/win32/vs9/gtk.vcprojin
@@ -210,6 +210,36 @@
/>
</FileConfiguration>
</File>
+ <File RelativePath="..\..\..\gtk\gtkdbusinterfaces.xml">
+ <FileConfiguration Name="Debug|Win32">
+ <Tool Name="VCCustomBuildTool"
+ Description="Generating GTK+ DBus Sources..."
+ CommandLine="$(GenerateGtkDbusBuiltSources)"
+
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|Win32">
+ <Tool Name="VCCustomBuildTool"
+ Description="Generating GTK+ DBus Sources..."
+ CommandLine="$(GenerateGtkDbusBuiltSources)"
+
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Debug|x64">
+ <Tool Name="VCCustomBuildTool"
+ Description="Generating GTK+ DBus Sources..."
+ CommandLine="$(GenerateGtkDbusBuiltSources)"
+
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|x64">
+ <Tool Name="VCCustomBuildTool"
+ Description="Generating GTK+ DBus Sources..."
+ CommandLine="$(GenerateGtkDbusBuiltSources)"
+
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
+ />
+ </FileConfiguration>
+ </File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
</Filter>
<Filter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]