[adwaita-icon-theme] Visual Studio builds: Allow specifying tools' locations
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [adwaita-icon-theme] Visual Studio builds: Allow specifying tools' locations
- Date: Tue, 14 Jul 2020 10:04:24 +0000 (UTC)
commit 96c934a0c4194469c05e2f2673494985ac07b82d
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jul 14 17:57:53 2020 +0800
Visual Studio builds: Allow specifying tools' locations
This allows one to specifty the locations of gtk-update-icon-cache.exe and
gtk-encode-symbolic-svg.exe, so that builds can be a bit more flexible.
This will also help us to support cross-builds to other Windows architectures,
such as ARM64 Windows, in an easier way.
win32/adwaita-msvc.mak.in | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/win32/adwaita-msvc.mak.in b/win32/adwaita-msvc.mak.in
index 22b04fbe..53ec343c 100644
--- a/win32/adwaita-msvc.mak.in
+++ b/win32/adwaita-msvc.mak.in
@@ -23,6 +23,16 @@ PYTHON=python
PREFIX=$(SRCROOTDIR)\..\vs$(VSVER)\$(PLAT)
!ENDIF
+# Location of gtk-update-icon-cache.exe (default $(PREFIX)\bin\gtk-update-icon-cache.exe)
+!if "$(GTK_UPDATE_ICON_CACHE)" == ""
+GTK_UPDATE_ICON_CACHE=$(PREFIX)\bin\gtk-update-icon-cache.exe
+!endif
+
+# Location of gtk-encode-symbolic-svg.exe (default $(PREFIX)\bin\gtk-encode-symbolic-svg.exe)
+!if "$(GTK_ENCODE_SYMBOLIC_SVG)" == ""
+GTK_ENCODE_SYMBOLIC_SVG=$(PREFIX)\bin\gtk-encode-symbolic-svg.exe
+!endif
+
ERRNUL = 2>NUL
_HASH=^#
NULL=
@@ -157,21 +167,21 @@ install: index.theme $(ADWAITA_PC_FILES)
(mkdir $(PREFIX)\$(ICON_SUBDIR)\%d\%f) &
\
(copy /b $(SRCROOTDIR)\Adwaita\%d\%f\* $(PREFIX)\$(ICON_SUBDIR)\%d\%f))
\
else (copy /b $(SRCROOTDIR)\Adwaita\%d\* $(PREFIX)\$(ICON_SUBDIR)\%d))
- @if exist $(PREFIX)\bin\gtk-encode-symbolic-svg.exe
\
- if exist $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_MOD_VERSION)\loaders\libpixbufloader-svg.dll
\
- if exist $(PREFIX)\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_MOD_VERSION)\loaders.cache
\
+ @for %x in ($(GTK_ENCODE_SYMBOLIC_SVG) $(GTK_ENCODE_SYMBOLIC_SVG).exe) do if exist %x \
+ if exist %~dpx\..\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_MOD_VERSION)\loaders\libpixbufloader-svg.dll
\
+ if exist %~dpx\..\lib\gdk-pixbuf-2.0\$(GDK_PIXBUF_MOD_VERSION)\loaders.cache
\
@(echo Converting symbolic SVG icons to PNG...) &
\
@(for %z in (16x16 24x24 32x32 48x48 64x64 96x96) do
\
@(echo Converting symbolic SVG icons to %z PNG...) &
\
@(for /f %d in ('dir /b /on $(SRCROOTDIR)\Adwaita\scalable') do
\
@(for /f %f in ('dir /b /on $(SRCROOTDIR)\Adwaita\scalable\%d') do
\
- @($(PREFIX)\bin\gtk-encode-symbolic-svg
$(SRCROOTDIR)\Adwaita\scalable\%d\%f \
+ @($(GTK_ENCODE_SYMBOLIC_SVG) $(SRCROOTDIR)\Adwaita\scalable\%d\%f
\
%z -o $(PREFIX)\$(ICON_SUBDIR)\%z\%d))))
if not exist $(PREFIX)\share\pkgconfig mkdir $(PREFIX)\share\pkgconfig
copy adwaita-icon-theme.pc $(PREFIX)\share\pkgconfig
- @if exist $(PREFIX)\bin\gtk-update-icon-cache.exe
\
+ @for %x in ($(GTK_UPDATE_ICON_CACHE) $(GTK_UPDATE_ICON_CACHE).exe) do if exist %x \
@(echo Update icon cache...) &
\
- @($(PREFIX)\bin\gtk-update-icon-cache -q $(PREFIX)\$(ICON_SUBDIR))
+ @($(GTK_UPDATE_ICON_CACHE) -q $(PREFIX)\$(ICON_SUBDIR))
@echo Adwaita icon theme install complete.
clean:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]