mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-29 13:17:58 +03:00
24 lines
835 B
Bash
Executable file
24 lines
835 B
Bash
Executable file
#!/bin/bash
|
|
# regenerate the .ICO file from .PSD.
|
|
set -ex
|
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
rm -f resources/icon.ico resources/icon*.png resources/icon*.bmp
|
|
|
|
# PNG compression for Windows 10+
|
|
for size in 256 128 64 48 32 16; do
|
|
convert 'resources/icon.psd[0]' -filter lanczos -resize ${size}x${size} resources/icon${size}.png
|
|
pngquant resources/icon${size}.png
|
|
zopflipng -y resources/icon${size}-fs8.png resources/icon${size}-fs8.png
|
|
done
|
|
|
|
# BMP for Windows 7
|
|
for size in 32 16; do
|
|
convert resources/icon${size}-fs8.png resources/icon${size}.bmp
|
|
done
|
|
|
|
# NOTE: image order is important for certain software.
|
|
convert `ls resources/icon*.bmp|sort -rV` `ls resources/icon*-fs8.png|sort -rV` resources/icon.ico
|
|
|
|
rm -f resources/icon*.png resources/icon*.bmp
|