[gtk+] gtk-demo: Don't Distribute demos.h
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-demo: Don't Distribute demos.h
- Date: Fri, 19 Jun 2015 15:46:23 +0000 (UTC)
commit 28b8541847eeb0a0e05562946a41ed52770fd816
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed May 20 17:31:02 2015 +0800
gtk-demo: Don't Distribute demos.h
Since demos.h is now generated according to the platform for which GTK+ is
built, don't distribute it. Generate a Windows-specific demos.h.win32 and
distribute that instead, in which the Visual Studio build files will copy
it to demos.h, so that the build will proceed normally.
https://bugzilla.gnome.org/show_bug.cgi?id=749622
build/win32/vs10/gtk-gen-srcs.props | 4 ++
build/win32/vs10/gtk-prebuild.vcxproj | 26 +++++++++++++++
build/win32/vs9/gtk-gen-srcs.vsprops | 4 ++
build/win32/vs9/gtk-prebuild.vcproj | 58 +++++++++++++++++++++++++++++++++
demos/gtk-demo/Makefile.am | 19 +++++++---
5 files changed, 105 insertions(+), 6 deletions(-)
---
diff --git a/build/win32/vs10/gtk-gen-srcs.props b/build/win32/vs10/gtk-gen-srcs.props
index f74aaa5..da22573 100644
--- a/build/win32/vs10/gtk-gen-srcs.props
+++ b/build/win32/vs10/gtk-gen-srcs.props
@@ -65,6 +65,7 @@ $(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix
cd $(SolutionDir)
</GenerateGtkDbusBuiltSources>
<GenerateGtkWin32RC>$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc
--gtk3manifest</GenerateGtkWin32RC>
+ <CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtkgensrcsprops</_PropertySheetDisplayName>
@@ -85,5 +86,8 @@ cd $(SolutionDir)
<BuildMacro Include="GenerateGtkWin32RC">
<Value>$(GenerateGtkWin32RC)</Value>
</BuildMacro>
+ <BuildMacro Include="CopyDemosH">
+ <Value>$(CopyDemosH)</Value>
+ </BuildMacro>
</ItemGroup>
</Project>
diff --git a/build/win32/vs10/gtk-prebuild.vcxproj b/build/win32/vs10/gtk-prebuild.vcxproj
index b5031b4..5a5df1d 100644
--- a/build/win32/vs10/gtk-prebuild.vcxproj
+++ b/build/win32/vs10/gtk-prebuild.vcxproj
@@ -209,6 +209,32 @@
<Command
Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenGdkConfigHBroadway)</Command>
<Outputs
Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(Configuration)_Broadway;%(Outputs)</Outputs>
</CustomBuild>
+ <CustomBuild Include="..\..\..\demos\gtk-demo\demos.h.win32">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Copying demos.h from
demos.h.win32...</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(CopyDemosH)</Command>
+ <Outputs
Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
+ </CustomBuild>
</ItemGroup>
<ItemGroup>
</ItemGroup>
diff --git a/build/win32/vs9/gtk-gen-srcs.vsprops b/build/win32/vs9/gtk-gen-srcs.vsprops
index ba483ef..6402232 100644
--- a/build/win32/vs9/gtk-gen-srcs.vsprops
+++ b/build/win32/vs9/gtk-gen-srcs.vsprops
@@ -66,4 +66,8 @@ cd $(SolutionDir)

Name="GenerateGtkWin32RC"
Value="$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest"
/>
+ <UserMacro
+ Name="CopyDemosH"
+ Value="copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h"
+ />
</VisualStudioPropertySheet>
diff --git a/build/win32/vs9/gtk-prebuild.vcproj b/build/win32/vs9/gtk-prebuild.vcproj
index 1c43f72..8f31a4b 100644
--- a/build/win32/vs9/gtk-prebuild.vcproj
+++ b/build/win32/vs9/gtk-prebuild.vcproj
@@ -217,6 +217,64 @@
/>
</FileConfiguration>
</File>
+ <File RelativePath="..\..\..\demos\gtk-demo\demos.h.win32">
+ <FileConfiguration Name="Debug|Win32">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Debug_Broadway|Win32">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|Win32">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release_Broadway|Win32">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Debug|x64">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Debug_Broadway|x64">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release|x64">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ <FileConfiguration Name="Release_Broadway|x64">
+ <Tool Name="VCCustomBuildTool"
+ Description="Copying demos.h from demos.h.win32..."
+ CommandLine="$(CopyDemosH)"
+ Outputs="..\..\..\demos\gtk-demo\demos.h"
+ />
+ </FileConfiguration>
+ </File>
</Filter>
</Files>
<Globals>
diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am
index 6fcfa31..91a59d7 100644
--- a/demos/gtk-demo/Makefile.am
+++ b/demos/gtk-demo/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
## These should be in the order you want them to appear in the
## demo app, which means alphabetized by demo title, not filename
-demos = \
+demos_base = \
application.c \
assistant.c \
builder.c \
@@ -63,7 +63,9 @@ demos = \
tree_store.c
if OS_UNIX
-demos += pagesetup.c
+demos = $(demos_base) pagesetup.c
+else
+demos = $(demos_base)
endif
AM_CPPFLAGS = \
@@ -96,7 +98,8 @@ EXTRA_DIST += \
data/symbolic-source.svg \
demo.gresource.xml \
$(RESOURCES) \
- org.gtk.Demo.gschema.xml
+ org.gtk.Demo.gschema.xml \
+ demos.h.win32
gsettings_SCHEMAS = \
org.gtk.Demo.gschema.xml
@@ -106,11 +109,15 @@ gsettings_SCHEMAS = \
demos.h: $(demos) geninclude.pl
$(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h
+demos.h.win32: $(demos_base) geninclude.pl
+ $(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos_base)) > demos.h.win32
+
+nodist_gtk3_demo_SOURCES = demos.h
+
gtk3_demo_SOURCES = \
$(demos) \
demo_resources.c \
- main.c \
- demos.h
+ main.c
gtk3_demo_DEPENDENCIES = $(DEPS)
gtk3_demo_LDADD = $(LDADDS)
@@ -228,6 +235,6 @@ uninstall-update-icon-cache:
$(AM_V_at)$(POST_UNINSTALL)
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
-DISTCLEANFILES = demos.h
+DISTCLEANFILES = demos.h demos.h.win32
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]