Switched to graphicsmagick to generate favicon. It doesn't support Microsoft ICO so generate PNG instead. v0.17
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 09 May 2020 00:39:45 +0300
changeset 1209 eacf1b282688
parent 1208 365d3dd9eae5
child 1210 2bd765e16581
Switched to graphicsmagick to generate favicon. It doesn't support Microsoft ICO so generate PNG instead.
Makefile
www/tmpl/rst.tmpl.in
--- a/Makefile	Sat May 09 00:09:12 2020 +0300
+++ b/Makefile	Sat May 09 00:39:45 2020 +0300
@@ -175,7 +175,7 @@
 LOGO_FILE := www/logo.svg
 LOGO_DIM := 32x32 48x48 64x64
 LOGO_PNG_FILES := $(patsubst %,dist/misc/logo-%.png,$(LOGO_DIM))
-FAVICON := dist/www/favicon.ico
+FAVICON := dist/www/favicon.png
 
 EL_FILES := $(wildcard contrib/*.el)
 
@@ -212,6 +212,16 @@
 ################################################################
 # Deploy/release targets.
 
+SF_USER ?= gavenkoa
+
+# Release require Anki Python modules, dictd utilities and graphicsmagick (for icon):
+#   $ sudo apt install anki dictfmt dictzip graphicsmagick
+
+# First time you deploy to SourceForge (sf) you need manually login to:
+#   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
+#   $ hg push ssh://$(SF_USER)@hg.code.sf.net/p/gadict/cod
+# as it asks for accepting server public key.
+
 .PHONY: deploy
 deploy: deploy2defun deploy2sf
 
@@ -285,13 +295,6 @@
 echo 'quit'; \
 ) | sftp -b - $(DEFUN_USER)@$(DEFUN_WWW_SRV)
 
-SF_USER ?= gavenkoa
-
-# First time you deploy to SourceForge (sf) you need manually login to:
-#   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
-# as it may require interactive input for accepting server public key.
-# Next time any action fully automated.
-
 .PHONY: deploy2sf-full
 deploy2sf-full: deploy2sf deploy2sf-voa
 
@@ -625,7 +628,7 @@
 	dictzip -c $< >$@
 
 dist/dictd/%.png: %.xpm | dist/dictd/
-	convert $< $@
+	gm convert $< $@
 
 GADICT_SUFFIXES := en-ru+uk en-ru en-uk voa
 .SECONDARY: $(patsubst %,dist/dictd/gadict_%.c5.name,$(GADICT_SUFFIXES))
@@ -790,7 +793,7 @@
 favicon: $(FAVICON)
 
 $(FAVICON): $(LOGO_FILE) $(MAKEFILE_LIST) | $(dir $(FAVICON))
-	convert +antialias $< -resize 16x16 $@
+	gm convert +antialias $< -resize 16x16 $@
 
 .PHONY: logo
 logo: logo-png
--- a/www/tmpl/rst.tmpl.in	Sat May 09 00:09:12 2020 +0300
+++ b/www/tmpl/rst.tmpl.in	Sat May 09 00:39:45 2020 +0300
@@ -3,7 +3,7 @@
 <head>
 <meta name=viewport content="width=device-width, initial-scale=1">
 <meta charset="utf-8">
-<link href="favicon.ico" rel="shortcut icon"/>
+<link href="favicon.png" rel="shortcut icon" type="image/png"/>
 %(head)s
 %(stylesheet)s
 %(body_prefix)s