mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-17 01:09:36 -06:00
Update to Windows Icon Generation script
Update script `src/tools/create_windows_icon.sh`. Script uses Imagemagick `convert` command and requires attention to ordering of arguments. Script update for use w/ Bash 5
This commit is contained in:
BIN
src/iconwin.ico
BIN
src/iconwin.ico
Binary file not shown.
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
@@ -2,11 +2,18 @@
|
||||
|
||||
# This script depends on ImageMagick being installed
|
||||
|
||||
FILES=() # array accumulating names of converted images
|
||||
# commands to give to convert for each iteration
|
||||
MAGICK_CMDS="+antialias -units PixelsPerInch -alpha set -background transparent"
|
||||
SRC_FILE="../../images/logo.svg" # conversion source
|
||||
ICO_FILE="../iconwin.ico" # ouput icon file
|
||||
for imgsize in 16 32 64 128
|
||||
do
|
||||
convert ../../images/logo.svg -resize "$imgsize"x"$imgsize" -background transparent icon"$imgsize".png
|
||||
files="$files icon$imgsize.png"
|
||||
RESIZE="${imgsize}x${imgsize}"
|
||||
DEST_FILE="icon${imgsize}.png"
|
||||
# NOTE: explicitly not using quotes - outpput raw contents to convert command
|
||||
convert ${MAGICK_CMDS} ${SRC_FILE} -resize ${RESIZE} ${DEST_FILE}
|
||||
FILES+=("${DEST_FILE}")
|
||||
done
|
||||
|
||||
convert $files ../iconwin.ico
|
||||
rm $files
|
||||
convert "${FILES[@]}" "${ICO_FILE}"
|
||||
rm "${FILES[@]}"
|
||||
|
||||
Reference in New Issue
Block a user