aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Skec <skec@protonmail.ch>2021-02-07 10:42:27 +1100
committerFelix Queißner <felix@ib-queissner.de>2021-02-07 23:50:49 +0100
commitda23779d293581ab4ca795f31abf9b902575d137 (patch)
tree11d07d96cda1c0a490855841d69bbdea907f2565 /src
parenta6aecaaa63037023e027f1273f99375f5067638c (diff)
downloadkristall-da23779d293581ab4ca795f31abf9b902575d137.tar.gz
Add embedded icon for win32
Diffstat (limited to 'src')
-rw-r--r--src/icons/kristall.icobin0 -> 127318 bytes
-rw-r--r--src/icons/windows-icon.bat29
-rw-r--r--src/kristall.pro3
3 files changed, 32 insertions, 0 deletions
diff --git a/src/icons/kristall.ico b/src/icons/kristall.ico
new file mode 100644
index 0000000..c72b8fb
--- /dev/null
+++ b/src/icons/kristall.ico
Binary files differ
diff --git a/src/icons/windows-icon.bat b/src/icons/windows-icon.bat
new file mode 100644
index 0000000..b519069
--- /dev/null
+++ b/src/icons/windows-icon.bat
@@ -0,0 +1,29 @@
+@echo off
+
+REM This script generates .ico file for Windows platforms from the vector icon
+REM requires: imagemagick, pngquant
+
+SET OPTS=-density 3000 -depth 24 -background none
+
+MKDIR tmp_ico
+ECHO Creating PNGs...
+magick convert %OPTS% -resize 16x16 kristall.svg tmp_ico/16.png
+magick convert %OPTS% -resize 20x20 kristall.svg tmp_ico/20.png
+magick convert %OPTS% -resize 24x24 kristall.svg tmp_ico/24.png
+magick convert %OPTS% -resize 40x40 kristall.svg tmp_ico/40.png
+magick convert %OPTS% -resize 48x48 kristall.svg tmp_ico/48.png
+magick convert %OPTS% -resize 64x64 kristall.svg tmp_ico/64.png
+magick convert %OPTS% -resize 96x96 kristall.svg tmp_ico/96.png
+magick convert %OPTS% -resize 256x256 kristall.svg tmp_ico/256.png
+magick convert %OPTS% -resize 512x512 kristall.svg tmp_ico/512.png
+
+ECHO Compressing PNGs...
+CD tmp_ico
+pngquant --skip-if-larger --ext .new.png --strip 256 *
+DEl 16.png 20.png 24.png 40.png 48.png 64.png 96.png 256.png 512.png
+CD ..
+
+
+ECHO Packing into ico...
+magick convert -define png:compression-level=9 tmp_ico/* kristall.ico
+RMDIR /S /Q tmp_ico
diff --git a/src/kristall.pro b/src/kristall.pro
index 7746022..d118128 100644
--- a/src/kristall.pro
+++ b/src/kristall.pro
@@ -194,5 +194,8 @@ RESOURCES += \
builtins.qrc \
icons.qrc
+# Embed icon resource on Windows platforms
+win32:RC_ICONS += ./icons/kristall.ico
+
DISTFILES += \
gophertypes.txt