[gtk/more-vs-proj-updates: 12/13] MSVC Projects: Generate widget factory GResource sources




commit b07ccec9f4894a8923a06bbc26fc44c333761279
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri May 27 18:47:35 2022 +0800

    MSVC Projects: Generate widget factory GResource sources
    
    Add rules in the helper NMake Makefiles to generate the GResource
    sources for gtk3-widget-factory.  This prepares for us to add project
    files to build that demo program.

 win32/create-lists-msvc.mak |  9 +++++++++
 win32/generate-msvc.mak     | 10 +++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/win32/create-lists-msvc.mak b/win32/create-lists-msvc.mak
index bc2705eab4..a4ba131660 100644
--- a/win32/create-lists-msvc.mak
+++ b/win32/create-lists-msvc.mak
@@ -211,6 +211,15 @@ NULL=
 !if [call create-lists.bat footer resource_sources_msvc$(VSVER)_$(PLAT).mak]
 !endif
 
+!if [call create-lists.bat header resource_sources_msvc$(VSVER)_$(PLAT).mak WIDGET_FACTORY_RESOURCES]
+!endif
+
+!if [for /f %f in ('$(GLIB_COMPILE_RESOURCES) --sourcedir=..\demos\widget-factory --generate-dependencies 
..\demos\widget-factory\widget-factory.gresource.xml') do @call create-lists.bat file 
resource_sources_msvc$(VSVER)_$(PLAT).mak %f]
+!endif
+
+!if [call create-lists.bat footer resource_sources_msvc$(VSVER)_$(PLAT).mak]
+!endif
+
 !include resource_sources_msvc$(VSVER)_$(PLAT).mak
 
 !if [del /f /q resource_sources_msvc$(VSVER)_$(PLAT).mak]
diff --git a/win32/generate-msvc.mak b/win32/generate-msvc.mak
index d7c715d8e9..98a17dd703 100644
--- a/win32/generate-msvc.mak
+++ b/win32/generate-msvc.mak
@@ -90,7 +90,8 @@ generate-base-sources:        \
        .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk-3\gtk\gtk.gresource.xml     \
        .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demos.h       \
        .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-demo\demo_resources.c      \
-       .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c
+       .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-icon-browser\resources.c   \
+       .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-widget-factory\widget_factory_resources.c
 
 # Copy the pre-defined config.h.win32 and demos.h.win32
 .\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gdk-3\config.h: ..\config.h.win32
@@ -289,6 +290,13 @@ generate-base-sources:     \
        @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=..\demos\icon-browser        \
        --generate-source ..\demos\icon-browser\iconbrowser.gresource.xml
 
+.\vs$(VSVER)\$(CFG)\$(PLAT)\obj\gtk3-widget-factory\widget_factory_resources.c:        \
+..\demos\icon-browser\iconbrowser.gresource.xml $(WIDGET_FACTORY_RESOURCES)
+       @echo Generating $@...
+       @if not exist $(@D)\ md $(@D)
+       @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=..\demos\widget-factory      \
+       --generate-source ..\demos\widget-factory\widget-factory.gresource.xml
+
 gtk3-demo.sourcefiles: $(demo_actual_sources)
        @-del vs9\$(DEMO_VS9_PROJ)
        @for %%s in ($**) do @echo.   ^<File RelativePath^="..\%%s" /^>>>$@


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