1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Build/Windows: Update the Windows icon as svg and build derivatives from it

Co-Authored-By: Nurudin Imsirovic <realnurudinimsirovic@gmail.com>

Closes GH-14964.
This commit is contained in:
Ayesh Karunaratne
2024-07-16 01:03:48 +07:00
committed by Christoph M. Becker
parent aa006f1cf6
commit e7c16d2a6a
6 changed files with 64 additions and 0 deletions

4
NEWS
View File

@@ -26,6 +26,10 @@ PHP NEWS
- Standard:
. Change highlight_string() and print_r() return type to string|true. (Ayesh)
- Windows:
. Update the icon of the Windows executables, e.g. php.exe. (Ayesh,
Nurudin Imširović)
- XML:
. Fixed bug #81481 (xml_get_current_byte_index limited to 32-bit numbers on
64-bit builds). (nielsdos)

8
win32/build/mkico.bat Normal file
View File

@@ -0,0 +1,8 @@
@echo off
magick php.svg -size 512x512 php.bmp
for %%i in (16,24,32,48,64,128,256) do magick php.bmp -scale %%ix%%i php-ico-%%i.png
magick -adjoin php-ico-* php.ico
del /f /q php-ico-*.png php.bmp

12
win32/build/mkico.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
convert php.svg -size 512x512 php.bmp
for I in 16 24 32 48 64 128 256;
do
convert php.bmp -scale ${I}x${I} php-ico-${I}.png;
done
convert -adjoin php-ico-* php.ico
rm -f php-ico-*.png php.bmp

View File

@@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<defs>
<style>
.a {
fill: #777bb3;
}
.b {
fill: #fff;
}
.c {
fill: #231f20;
}
</style>
</defs>
<rect class="a" width="512" height="512"/>
<path class="b" d="M41.51,158.74l147.75,0,8.83-49.46,92.61.33-6.47,49.49,188.26-.47c69.26,11.14,42.66,193.53-30.28,195.31-1.13,0-2.27.18-3.42.12l-45.62.17-10.38,50.27-94.81,0,9.87-50.22H100.06l-9.75,50.27L0,404.36V372.74Z"/>
<g>
<path class="c" d="M131.86,187.37q28.74.25,41.82,17.59t8.84,47.35a102.34,102.34,0,0,1-7.33,26.91A79.56,79.56,0,0,1,159.64,303q-12.21,13.46-26,17.07a112.62,112.62,0,0,1-28.71,3.63H75.61l-8.94,49.16H32.75L66.47,187.37ZM95,216.87l-14.1,77.62a21.34,21.34,0,0,0,3.25.26h3.29q23.37.25,39-5.05t20.75-37.65q4.2-27.17-8.95-31.3t-32.72-3.88c-1.83.17-3.59.26-5.3.26H95Z"/>
<path class="c" d="M258,138l-9,49.42h30.25q24.79.52,37.19,10.87t7.37,39.33l-15.66,86.16H274l15-82.28q2.34-12.94-1.54-18.37t-16.83-5.44l-27-.26L224.2,323.73H190.53L224.29,138Z"/>
<path class="c" d="M427.83,187.37q28.74.25,41.82,17.59t8.84,47.35a102.73,102.73,0,0,1-7.33,26.91A79.94,79.94,0,0,1,455.61,303q-12.21,13.46-26,17.07a112.7,112.7,0,0,1-28.72,3.63H371.57l-8.93,49.16H328.72l33.72-185.52ZM391,216.87l-14.11,77.62a21.44,21.44,0,0,0,3.25.26h3.3q23.37.25,39-5.05t20.75-37.65q4.2-27.17-9-31.3t-32.73-3.88c-1.82.17-3.58.26-5.29.26h-5.25Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 40 KiB

16
win32/build/php.svg Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<rect width="512" height="512" fill="#777BB3"/>
<g>
<path fill="#FFFFFF" d="M62.5,190.5h68c20,0.2,34.5,5.8,43.4,17c9,11.2,11.9,26.4,8.9,45.7c-1.2,8.8-3.8,17.5-7.9,26
c-3.9,8.5-9.3,16.2-16.3,23c-8.5,8.7-17.5,14.2-27.2,16.5c-9.7,2.3-19.6,3.5-30,3.5H70.9l-9.7,47.6H25.9l36.4-179.7l0,0
M92.2,219.2L77,294c1,0.2,2,0.2,3,0.2c1.2,0,2.4,0,3.5,0c16.2,0.2,29.7-1.4,40.5-4.7c10.8-3.5,18.1-15.6,21.8-36.4
c3-17.4,0-27.5-9.1-30.1c-8.9-2.7-20.2-3.9-33.7-3.7c-2,0.2-4,0.2-5.8,0.2c-1.7,0-3.5,0-5.3,0L92.2,219.2"/>
<path fill="#FFFFFF" d="M222.9,142.9h35.4l-9.9,47.6h31.6c17.3,0.3,30.1,3.8,38.6,10.5c8.6,6.7,11.2,19.3,7.6,38l-17,83.2h-35.6
l16.3-79.7c1.7-8.4,1.2-14.3-1.5-17.8c-2.7-3.5-8.6-5.3-17.6-5.3l-28.3-0.3l-20.9,103h-35.1l36.7-179.9l0,0"/>
<path fill="#FFFFFF" d="M364.4,190.5h68c20,0.2,34.5,5.8,43.4,17c9,11.2,11.9,26.4,8.9,45.7c-1.2,8.8-3.8,17.5-7.9,26
c-3.9,8.5-9.3,16.2-16.3,23c-8.5,8.7-17.5,14.2-27.2,16.5c-9.7,2.3-19.6,3.5-30,3.5h-30.6l-9.7,47.6h-35.4l36.4-179.7l0,0
M394,219.2L378.8,294c1,0.2,2,0.2,3,0.2c1.2,0,2.4,0,3.5,0c16.2,0.2,29.7-1.4,40.5-4.7c10.8-3.5,18.1-15.6,21.8-36.4
c3-17.4,0-27.5-9.1-30.1c-8.9-2.7-20.2-3.9-33.7-3.7c-2,0.2-4,0.2-5.8,0.2c-1.7,0-3.5,0-5.3,0L394,219.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB