build: drop the rendered icon stuff

This is broken in multiple ways, does not exist in 0.14, appears in an
unreviewed mega-PR "porting" from a version of liquid-qt that I cannot
track down, and apparently has caused a fair bit of follow-on trouble
with icon integration.

Just put the icons in the repo like upstream does.

The committed icons were built using the Makefile prior to this
commit, starting from ./share/pixmaps/nsis-wizard.svg and
./src/qt/res/src/bitcoin.svg. They should be recreated manually
if they need to be changed in the future.
This commit is contained in:
Andrew Poelstra 2020-12-08 23:29:59 +00:00
parent ee5d4e3256
commit a1bac6d8a6
13 changed files with 43 additions and 84 deletions

View file

@ -39,7 +39,7 @@ OSX_BACKGROUND_IMAGE_DPIS=36 72
OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_INSTALLER_ICONS=src/qt/res/rendered_icons/bitcoin.icns
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
OSX_QT_TRANSLATIONS = ar,bg,ca,cs,da,de,es,fa,fi,fr,gd,gl,he,hu,it,ja,ko,lt,lv,pl,pt,ru,sk,sl,sv,uk,zh_CN,zh_TW
@ -54,9 +54,9 @@ DIST_SHARE = \
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
$(top_srcdir)/contrib/devtools/security-check.py
WINDOWS_PACKAGING = src/qt/res/rendered_icons/bitcoin.ico \
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
src/qt/res/rendered_icons/nsis-wizard.bmp \
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
$(top_srcdir)/doc/README_windows.txt
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
@ -96,9 +96,6 @@ $(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@
src/qt/res/rendered_icons/%: FORCE
$(MAKE) -C src $(patsubst src/%,%,$@)
$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

View file

@ -598,17 +598,6 @@ AC_ARG_WITH([daemon],
[build_bitcoind=$withval],
[build_bitcoind=yes])
can_render_icons=yes
AC_PATH_PROGS([RSVG_CONVERT],[rsvg-convert rsvg],no)
AC_PATH_PROGS([IMAGEMAGICK_CONVERT],[convert],no)
AC_PATH_PROGS([PNG2ICNS],[png2icns],no)
if test x$RSVG_CONVERT = xno; then
can_render_icons='rsvg-convert'
elif test x$IMAGEMAGICK_CONVERT = xno; then
can_render_icons='(ImageMagick) convert'
fi
case $host in
*mingw*)
TARGET_OS=windows
@ -655,10 +644,6 @@ case $host in
AX_CHECK_LINK_FLAG([[-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1]],[LDFLAGS="$LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"],,[[$LDFLAG_WERROR]])
;;
*darwin*)
if test x$PNG2ICNS = xno; then
can_render_icons='png2icns'
fi
TARGET_OS=darwin
if test x$cross_compiling != xyes; then
BUILD_OS=darwin
@ -693,6 +678,8 @@ case $host in
AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
AC_PATH_TOOL([OTOOL], [otool], otool)
AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
AC_PATH_PROGS([IMAGEMAGICK_CONVERT], [convert],convert)
AC_PATH_PROGS([TIFFCP], [tiffcp],tiffcp)
dnl libtool will try to strip the static lib, which is a problem for
@ -717,8 +704,6 @@ case $host in
;;
esac
AM_CONDITIONAL([CAN_RENDER_ICONS], [test x$can_render_icons = xyes])
if test x$use_extended_functional_tests != xno; then
AC_SUBST(EXTENDED_FUNCTIONAL_TESTS, --extended)
fi

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 380 KiB

Before After
Before After

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 24.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 200.75 100.85"
width="1in"
height="1in">
<g
id="g10"
transform="matrix(0.44627788,0,0,0.44786611,-85.879878,-173.08986)"><polygon
points="330.67,458.41 502.53,359.29 386.19,292.03 216.3,390.04 "
id="polygon2"
fill="#5caadd" /><polygon
points="330.67,458.41 330.61,649.68 216.23,583.58 216.3,390.04 "
id="polygon4"
fill="#6d8ac5" /><polygon
points="503.04,551.1 331.18,650.25 447.52,717.48 617.39,619.5 "
id="polygon6"
fill="#7a4596" /><polygon
points="503.04,551.1 503.1,359.86 617.48,425.95 617.39,619.5 "
id="polygon8"
fill="#5f53a2" /></g></svg>

After

Width:  |  Height:  |  Size: 887 B

View file

@ -14,8 +14,8 @@ SetDateSave off
!define URL @PACKAGE_URL@
# MUI Symbol Definitions
!define MUI_ICON "@abs_top_srcdir@/src/qt/res/rendered_icons/bitcoin.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "@abs_top_builddir@/src/qt/res/rendered_icons/nsis-wizard.bmp"
!define MUI_ICON "@abs_top_srcdir@/src/qt/res/icons/bitcoin.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "@abs_top_builddir@/share/pixmaps/nsis-wizard.bmp"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE_BITMAP "@abs_top_srcdir@/share/pixmaps/nsis-header.bmp"
@ -27,7 +27,7 @@ SetDateSave off
!define MUI_FINISHPAGE_RUN "$WINDIR\explorer.exe"
!define MUI_FINISHPAGE_RUN_PARAMETERS $INSTDIR\@BITCOIN_GUI_NAME@@EXEEXT@
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_builddir@/src/qt/res/rendered_icons/nsis-wizard.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@abs_top_builddir@/share/pixmaps/nsis-wizard.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
# Included files

View file

@ -798,60 +798,6 @@ include Makefile.crc32c.include
include Makefile.leveldb.include
endif
# Rendered icons must be here, not in Makefile.qt.include, since they are distributed with the source tarball
RES_RENDERED_ICON_SRC = qt/res/src/bitcoin.svg
RES_RENDERED_ICONS = \
qt/res/rendered_icons/about.png \
qt/res/rendered_icons/bitcoin.ico \
qt/res/rendered_icons/bitcoin_testnet.ico \
qt/res/rendered_icons/bitcoin1024.png
RES_ALL_RENDERED_ICONS = $(RES_RENDERED_ICONS) \
qt/res/rendered_icons/about.svg \
$(patsubst %,qt/res/rendered_icons/bitcoin%.png,16 32 48 256 512 1024) \
qt/res/rendered_icons/bitcoin.icns \
qt/res/rendered_icons/nsis-wizard.svg \
qt/res/rendered_icons/nsis-wizard.bmp
EXTRA_DIST += $(RES_RENDERED_ICON_SRC) $(RES_ALL_RENDERED_ICONS)
if CAN_RENDER_ICONS
qt/res/rendered_icons/about.png: qt/res/rendered_icons/about.svg
$(RSVG_CONVERT) -f png -d 142 -p 142 < $< | $(IMAGEMAGICK_CONVERT) - -bordercolor transparent -colorspace Gray -strip $@
qt/res/rendered_icons/about.svg: qt/res/src/bitcoin.svg
@$(MKDIR_P) $(@D)
sed '/fill="#000"/d;s/fill="[^"]*"//g' < $< > $@
qt/res/rendered_icons/bitcoin%.png: qt/res/src/bitcoin.svg
@$(MKDIR_P) $(@D)
$(RSVG_CONVERT) -f png -d $* -p $* < $< > $@
# NOTE: ImageMagick will never convert transparent PNGs to 8-bit ICOs, but GIF is fine
qt/res/rendered_icons/bitcoin%d8.gif: qt/res/rendered_icons/bitcoin%.png
$(IMAGEMAGICK_CONVERT) $^ -colors 256 -channel A -threshold '50%' $@
qt/res/rendered_icons/bitcoin.icns: $(patsubst %,qt/res/rendered_icons/bitcoin%.png,256 512 1024 32 16)
$(PNG2ICNS) $@ $^
qt/res/rendered_icons/bitcoin.ico: qt/res/rendered_icons/bitcoin32d8.gif $(patsubst %,qt/res/rendered_icons/bitcoin%.png,256 64 48 32 20 16)
$(IMAGEMAGICK_CONVERT) $^ $@
qt/res/rendered_icons/bitcoin_testnet.ico: qt/res/rendered_icons/bitcoin.ico
$(IMAGEMAGICK_CONVERT) $^ $@
qt/res/rendered_icons/nsis-wizard.svg: qt/res/src/bitcoin.svg
@$(MKDIR_P) $(@D)
sed '/fill="#000"/d' < $< > $@
qt/res/rendered_icons/nsis-wizard.bmp: qt/res/rendered_icons/nsis-wizard.svg
$(RSVG_CONVERT) -f png -d 360 -p 360 < $< | $(IMAGEMAGICK_CONVERT) - -strip BMP3:$@
endif
include Makefile.test_util.include
include Makefile.test_fuzz.include

View file

@ -161,9 +161,12 @@ BITCOIN_QT_H = \
qt/walletview.h \
qt/winshutdownmonitor.h
RES_ICONS = $(RES_RENDERED_ICONS) \
RES_ICONS = \
qt/res/icons/add.png \
qt/res/icons/address-book.png \
qt/res/icons/bitcoin.ico \
qt/res/icons/bitcoin_testnet.ico \
qt/res/icons/bitcoin.png \
qt/res/icons/chevron.png \
qt/res/icons/clock1.png \
qt/res/icons/clock2.png \

View file

@ -1,6 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/icons">
<file alias="bitcoin">res/rendered_icons/bitcoin1024.png</file>
<file alias="bitcoin">res/icons/bitcoin.png</file>
<file alias="address-book">res/icons/address-book.png</file>
<file alias="send">res/icons/send.png</file>
<file alias="connect_0">res/icons/connect0.png</file>

View file

@ -1,5 +1,5 @@
IDI_ICON1 ICON DISCARDABLE "rendered_icons/bitcoin.ico"
IDI_ICON2 ICON DISCARDABLE "rendered_icons/bitcoin_testnet.ico"
IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico"
IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico"
#include <windows.h> // needed for VERSIONINFO
#include "../../clientversion.h" // holds the needed client version information

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Before After
Before After