diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2024-10-14 17:44:12 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2024-10-14 17:44:12 +0200 |
| commit | 787db196ad3c4e945792997111d759f82110775a (patch) | |
| tree | 878943ae179709b77f411ce5c4857d28eb6d8fc2 /cpack/convert_images.sh | |
| parent | 9c792e636a7803f8003643b2f91f040257398b3f (diff) | |
| download | psn00bsdk-787db196ad3c4e945792997111d759f82110775a.tar.gz | |
Deprecate CPack packages and old changelog, fix ldscripts
Diffstat (limited to 'cpack/convert_images.sh')
| -rw-r--r-- | cpack/convert_images.sh | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/cpack/convert_images.sh b/cpack/convert_images.sh deleted file mode 100644 index 3816dec..0000000 --- a/cpack/convert_images.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# This script generates Windows bitmaps from the SVGs in this directory. The -# bitmaps are displayed by the NSIS installers generated using CPack. Inkscape -# and ImageMagick must be installed for this script to work. - -INDEXED_SIZES=(16 24 32 48) -RGB_ONLY_SIZES=(64 96 128 256) -DITHER_OPTIONS="-dither riemersma" -OUTPUT_OPTIONS="+compress -strip" - -svg_to_bitmap() { - inkscape -z -e rgb.png $1 - - # There seems to be no way to tell ImageMagick to generate an 8-bit indexed - # BMP directly, so the image has to be converted to indexed PNG first. NSIS - # seems to reject all BMP versions other than "bmp3". - convert $DITHER_OPTIONS -colors 256 +remap rgb.png png8:i8.png - convert i8.png $OUTPUT_OPTIONS bmp3:$2 - rm -f rgb.png i8.png -} - -# https://stackoverflow.com/a/52636645 -svg_to_icon() { - for size in ${INDEXED_SIZES[@]} ${RGB_ONLY_SIZES[@]}; do - inkscape -z -e $size.png -w $size -h $size $1 - done - - # Windows expects some of the smaller sizes to be available in 4- and 8-bit - # indexed color formats, as well as RGB. - for size in ${INDEXED_SIZES[@]}; do - convert $DITHER_OPTIONS -colors 256 +remap $size.png png8:$size-i8.png - convert $DITHER_OPTIONS -colors 16 +remap $size.png png8:$size-i4.png - done - - icons="${INDEXED_SIZES[@]/%/.png} ${INDEXED_SIZES[@]/%/-i8.png} ${INDEXED_SIZES[@]/%/-i4.png} ${RGB_ONLY_SIZES[@]/%/.png}" - convert $icons $OUTPUT_OPTIONS $2 - rm -f $icons -} - -rm -f *.ico *.bmp - -svg_to_icon icon.svg icon.ico -svg_to_icon uninstall.svg uninstall.ico -svg_to_bitmap nsis_banner.svg nsis_banner.bmp -svg_to_bitmap nsis_header.svg nsis_header.bmp |
