diff --git a/.drone.jsonnet b/.drone.jsonnet index d41e7797b..74a4fbcd6 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -147,7 +147,7 @@ local windows_cross_pipeline(name, 'echo "man-db man-db/auto-update boolean false" | debconf-set-selections', apt_get_quiet + ' update', apt_get_quiet + ' install -y eatmydata', - 'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y p7zip-full build-essential cmake git pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip icoutils automake libtool', + 'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y p7zip-full build-essential cmake git pkg-config ccache g++-mingw-w64-x86-64-posix nsis zip icoutils automake libtool librsvg2-bin', 'update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix', 'update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix', 'JOBS=' + jobs + ' VERBOSE=1 ./contrib/windows.sh -DSTRIP_SYMBOLS=ON ' + diff --git a/contrib/make-ico.sh b/contrib/make-ico.sh index 9a0413a67..cdc74183d 100755 --- a/contrib/make-ico.sh +++ b/contrib/make-ico.sh @@ -14,13 +14,16 @@ mkdir -p "${outdir}" for size in "${sizes[@]}"; do outf="${outdir}/${size}x${size}.png" if [ $size -lt 32 ]; then - # For 16x16 and 24x24 we crop the image to 3/4 of its regular size before resizing and make - # it all white (instead of transparent) which effectively zooms in on it a bit because if we - # resize the full icon it ends up a fuzzy mess, while the crop and resize lets us retain - # some detail of the logo. - convert -background white -resize 512x512 "$svg" -gravity Center -extent 320x320 -resize ${size}x${size} -strip "png32:$outf" + # For 16x16 and 24x24 we crop the image to 2/3 of its regular size make it all white + # (instead of transparent) to zoom in on it a bit because if we resize the full icon to the + # target size it ends up a fuzzy mess, while the crop and resize lets us retain some detail + # of the logo. + rsvg-convert -b white \ + --page-height $size --page-width $size \ + -w $(($size*3/2)) -h $(($size*3/2)) --left " -$(($size/4))" --top " -$(($size/4))" \ + "$svg" >"$outf" else - convert -background transparent -resize ${size}x${size} "$svg" -strip "png32:$outf" + rsvg-convert -b transparent -w $size -h $size "$svg" >"$outf" fi outs="-r $outf $outs" done