From a86b3c453a0a823d7b9b1dc8e0725f3c3f62e49f Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 29 Jul 2019 17:48:50 +0800 Subject: [PATCH] generate-msvc.mak: Generate gtk/gtkresources.[c|h] This makes the MSVC project files generate gtk/gtkresources.[c|h], along with gtk/gtk.gresource.xml. --- build/win32/generate-msvc.mak | 47 ++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/build/win32/generate-msvc.mak b/build/win32/generate-msvc.mak index e7351104e3..4fb0b43b4c 100644 --- a/build/win32/generate-msvc.mak +++ b/build/win32/generate-msvc.mak @@ -36,6 +36,7 @@ GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32 GDK_MARSHALERS_FLAGS = --prefix=_gdk_marshal --valist-marshallers GDK_RESOURCES_ARGS = $** --target=$@ --sourcedir=..\..\gdk --c-name _gdk --manual-register +GTK_RESOURCES_ARGS = $** --target=$@ --sourcedir=..\..\gtk --c-name _gtk --manual-register all: \ ..\..\config.h \ @@ -50,6 +51,9 @@ all: \ ..\..\gtk\gtkdbusgenerated.h \ ..\..\gtk\gtkdbusgenerated.c \ ..\..\gtk\gtktypefuncs.inc \ + ..\..\gtk\gtk.gresource.xml \ + ..\..\gtk\gtkresources.h \ + ..\..\gtk\gtkresources.c \ ..\..\demos\gtk-demo\demos.h # Copy the pre-defined config.h.win32 and demos.h.win32 @@ -126,12 +130,53 @@ all: \ @$(PYTHON) $** $@ $(@R).combined.c @del $(@R).preproc.c $(@R).combined.c +..\..\gtk\gtk.gresource.xml: + @echo Generating $@... + @echo ^> $@ + @echo ^>> $@ + @echo ^>> $@ + @echo ^theme/Adwaita/gtk.css^>> $@ + @echo ^theme/Adwaita/gtk-dark.css^>> $@ + @echo ^theme/Adwaita/gtk-contained.css^>> $@ + @echo ^theme/Adwaita/gtk-contained-dark.css^>> $@ + @for %%f in (..\..\gtk\theme\Adwaita\assets\*.png) do @echo ^theme/Adwaita/assets/%%~nxf^>> $@ + @for %%f in (..\..\gtk\theme\Adwaita\assets\*.svg) do @echo ^theme/Adwaita/assets/%%~nxf^>> $@ + @echo ^theme/HighContrast/gtk.css^>> $@ + @echo ^theme/HighContrast/gtk-inverse.css^>> $@ + @echo ^theme/HighContrast/gtk-contained.css^>> $@ + @echo ^theme/HighContrast/gtk-contained-inverse.css^>> $@ + @for %%f in (..\..\gtk\theme\HighContrast\assets\*.png) do @echo ^theme/HighContrast/assets/%%~nxf^>> $@ + @for %%f in (..\..\gtk\theme\HighContrast\assets\*.svg) do @echo ^theme/HighContrast/assets/%%~nxf^>> $@ + @echo ^theme/win32/gtk-win32-base.css^>> $@ + @echo ^theme/win32/gtk.css^>> $@ + @for %%f in (..\..\gtk\cursor\*.png) do @echo ^cursor/%%~nxf^>> $@ + @for %%f in (..\..\gtk\gesture\*.symbolic.png) do @echo ^gesture/%%~nxf^>> $@ + @for %%f in (..\..\gtk\ui\*.ui) do @echo ^ui/%%~nxf^>> $@ + @for %%s in (16 22 24 32 48) do @(for %%c in (actions status categories) do @(for %%f in (..\..\gtk\icons\%%sx%%s\%%c\*.png) do @echo ^icons/%%sx%%s/%%c/%%~nxf^>> $@)) + @for %%s in (scalable) do @(for %%c in (status) do @(for %%f in (..\..\gtk\icons\%%s\%%c\*.svg) do @echo ^icons/%%s/%%c/%%~nxf^>> $@)) + @for %%f in (..\..\gtk\inspector\*.ui) do @echo ^inspector/%%~nxf^>> $@ + @echo ^inspector/logo.png^>> $@ + @echo ^emoji/emoji.data^>> $@ + @echo ^>> $@ + @echo ^>> $@ + +..\..\gtk\gtkresources.h: ..\..\gtk\gtk.gresource.xml + @echo Generating $@... + @$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-header + +..\..\gtk\gtkresources.c: ..\..\gtk\gtk.gresource.xml + @echo Generating $@... + @$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-source + # Remove the generated files clean: + @-del /f /q ..\..\demos\gtk-demo\demos.h + @-del /f /q ..\..\gtk\gtkresources.c + @-del /f /q ..\..\gtk\gtkresources.h + @-del /f /q ..\..\gtk\gtk.gresource.xml @-del /f /q ..\..\gtk\gtktypefuncs.inc @-del /f /q ..\..\gtk\gtkdbusgenerated.c @-del /f /q ..\..\gtk\gtkdbusgenerated.h - @-del /f /q ..\..\demos\gtk-demo\demos.h @-del /f /q ..\..\gtk\libgtk3.manifest @-del /f /q ..\..\gtk\gtk-win32.rc @-del /f /q ..\..\gdk\gdkresources.c