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
This commit is contained in:
Chun-wei Fan 2015-05-20 17:31:02 +08:00
parent c207b8d363
commit 28b8541847
5 changed files with 105 additions and 6 deletions

View File

@ -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>

View File

@ -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>

View File

@ -66,4 +66,8 @@ cd $(SolutionDir)&#x0D;&#x0A;
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>

View File

@ -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>

View File

@ -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