diff --git a/configure.ac b/configure.ac index 33630f9d9e..b4a42fc772 100644 --- a/configure.ac +++ b/configure.ac @@ -596,9 +596,6 @@ case $host in esac AM_CONDITIONAL([CAN_RENDER_ICONS], [test x$can_render_icons = xyes]) -if test x$can_render_icons != xyes; then - AC_MSG_WARN([Couldn't find ${can_render_icons}; you won't get the Knots-branded Bitcoin icon]) -fi if test x$use_pkgconfig = xyes; then m4_ifndef([PKG_PROG_PKG_CONFIG], [AC_MSG_ERROR(PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh.)]) diff --git a/src/Makefile.am b/src/Makefile.am index a1f4620f41..4c520a173a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -626,6 +626,51 @@ if EMBEDDED_LEVELDB 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/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 290 512 1024) \ + qt/res/rendered_icons/bitcoin.icns \ + 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) - -crop 128x128+7+7 -colorspace Gray -strip $@ + +qt/res/rendered_icons/about.svg: qt/res/src/bitcoin.svg + @$(MKDIR_P) $(@D) + sed '/fill="white"/d;s/\(stop-color:\)#....../\1black/' < $< > $@ + +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/nsis-wizard.bmp: qt/res/rendered_icons/bitcoin290.png + $(IMAGEMAGICK_CONVERT) $^ -crop 164x290+62+0 -border 0x12 -strip BMP3:$@ + +endif + if ENABLE_TESTS include Makefile.test.include endif diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index a4b7aa1f18..3141ebc0e9 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -238,19 +238,6 @@ BITCOIN_QT_H = \ qt/walletview.h \ qt/winshutdownmonitor.h -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/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 290 512 1024) \ - qt/res/rendered_icons/bitcoin.icns \ - qt/res/rendered_icons/nsis-wizard.bmp - RES_ICONS = $(RES_RENDERED_ICONS) \ qt/res/icons/add.png \ qt/res/icons/address-book.png \ @@ -453,7 +440,7 @@ $(QT_QRC_CPP): $(QT_QRC_BUILD) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MO $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \ $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@ -CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno qt/temp_bitcoin_locale.qrc $(QT_QRC_BUILD) $(RES_ALL_RENDERED_ICONS) +CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno qt/temp_bitcoin_locale.qrc $(QT_QRC_BUILD) CLEANFILES += $(CLEAN_QT) @@ -479,39 +466,3 @@ moc_%.cpp: %.h @test -f $(LRELEASE) @$(MKDIR_P) $(@D) $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@ - -EXTRA_DIST += $(RES_RENDERED_ICON_SRC) - -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) - -crop 128x128+7+7 -colorspace Gray -strip $@ - -qt/res/rendered_icons/about.svg: qt/res/src/bitcoin.svg - @$(MKDIR_P) $(@D) - sed '/fill="white"/d;s/\(stop-color:\)#....../\1black/' < $< > $@ - -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/nsis-wizard.bmp: qt/res/rendered_icons/bitcoin290.png - $(IMAGEMAGICK_CONVERT) $^ -crop 164x290+62+0 -border 0x12 -strip BMP3:$@ - -else - -qt/res/rendered_icons/%: qt/res/icons/% - @$(MKDIR_P) $(@D) - cp $< $@ - -endif