[gtk/gtk-3-24] build/win32/generate-msvc.mak: Generate GResource sources for demos



commit 8200b08d826a0dc55a2070e680b6f94e25943991
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jul 31 18:41:24 2019 +0800

    build/win32/generate-msvc.mak: Generate GResource sources for demos
    
    ...for the demos we build in the MSVC projects, so those that are not
    built by the projects are not covered by this change.  This is so that
    we can reduce the files that we are actually dist'ing in a release
    tarball (see MR !1001).

 build/win32/create-lists-msvc.mak | 21 +++++++++++++++++++++
 build/win32/generate-msvc.mak     | 14 +++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/build/win32/create-lists-msvc.mak b/build/win32/create-lists-msvc.mak
index 4b2df561b3..8e2467ed44 100644
--- a/build/win32/create-lists-msvc.mak
+++ b/build/win32/create-lists-msvc.mak
@@ -74,6 +74,27 @@ NULL=
 !if [for %f in (..\..\gtk\inspector\*.ui ..\..\gtk\inspector\logo.png ..\..\gtk\emoji\emoji.data) do @call 
create-lists.bat file resources_sources.mak %f]
 !endif
 
+!if [call create-lists.bat footer resources_sources.mak]
+!endif
+
+!if [call create-lists.bat header resources_sources.mak GTK_DEMO_RESOURCES]
+!endif
+
+!if [for /f %f in ('$(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=..\..\demos\gtk-demo 
..\..\demos\gtk-demo\demo.gresource.xml') do @call create-lists.bat file resources_sources.mak %f]
+!endif
+
+!if [call create-lists.bat footer resources_sources.mak]
+!endif
+
+!if [call create-lists.bat header resources_sources.mak ICON_BROWSER_RESOURCES]
+!endif
+
+!if [for /f %f in ('$(GLIB_COMPILE_RESOURCES) --sourcedir=..\..\demos\icon-browser --generate-dependencies 
..\..\demos\icon-browser\iconbrowser.gresource.xml') do @call create-lists.bat file resources_sources.mak %f]
+!endif
+
+!if [call create-lists.bat footer resources_sources.mak]
+!endif
+
 !include resources_sources.mak
 
 !if [del /f /q resources_sources.mak]
diff --git a/build/win32/generate-msvc.mak b/build/win32/generate-msvc.mak
index 755a39a1c4..c58fc5f4e6 100644
--- a/build/win32/generate-msvc.mak
+++ b/build/win32/generate-msvc.mak
@@ -46,7 +46,9 @@ all:  \
        ..\..\gtk\gtkmarshalers.c       \
        ..\..\gtk\gtkresources.h        \
        ..\..\gtk\gtkresources.c        \
-       ..\..\demos\gtk-demo\demos.h
+       ..\..\demos\gtk-demo\demos.h    \
+       ..\..\demos\gtk-demo\demo_resources.c   \
+       ..\..\demos\icon-browser\resources.c
 
 # Copy the pre-defined config.h.win32 and demos.h.win32
 ..\..\config.h: ..\..\config.h.win32
@@ -183,8 +185,18 @@ all:       \
        @$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --body $** >> $@.tmp
        @move $@.tmp $@
 
+..\..\demos\gtk-demo\demo_resources.c: ..\..\demos\gtk-demo\demo.gresource.xml $(GTK_DEMO_RESOURCES)
+       @echo Generating $@...
+       @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\demo.gresource.xml
+
+..\..\demos\icon-browser\resources.c: ..\..\demos\icon-browser\iconbrowser.gresource.xml 
$(ICON_BROWSER_RESOURCES)
+       @echo Generating $@...
+       @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source 
$(@D)\iconbrowser.gresource.xml
+
 # Remove the generated files
 clean:
+       @-del /f /q ..\..\demos\icon-browser\resources.c
+       @-del /f /q ..\..\demos\gtk-demo\demo_resources.c
        @-del /f /q ..\..\demos\gtk-demo\demos.h
        @-del /f /q ..\..\gtk\gtkresources.c
        @-del /f /q ..\..\gtk\gtkresources.h


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]