summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 2 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index 4ee3e9b704..3ab86245c5 100644
--- a/Makefile
+++ b/Makefile
@@ -648,34 +648,8 @@ update-translations:
.PHONY: generate-images
generate-images:
- $(eval TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp'))
- mkdir -p $(TMPDIR)/images
- inkscape -f $(PWD)/assets/logo.svg -w 880 -h 880 -e $(PWD)/public/img/gitea-lg.png
- inkscape -f $(PWD)/assets/logo.svg -w 512 -h 512 -e $(PWD)/public/img/gitea-512.png
- inkscape -f $(PWD)/assets/logo.svg -w 192 -h 192 -e $(PWD)/public/img/gitea-192.png
- inkscape -f $(PWD)/assets/logo.svg -w 120 -h 120 -jC -i layer1 -e $(TMPDIR)/images/sm-1.png
- inkscape -f $(PWD)/assets/logo.svg -w 120 -h 120 -jC -i layer2 -e $(TMPDIR)/images/sm-2.png
- composite -compose atop $(TMPDIR)/images/sm-2.png $(TMPDIR)/images/sm-1.png $(PWD)/public/img/gitea-sm.png
- inkscape -f $(PWD)/assets/logo.svg -w 200 -h 200 -e $(PWD)/public/img/avatar_default.png
- inkscape -f $(PWD)/assets/logo.svg -w 180 -h 180 -e $(PWD)/public/img/favicon.png
- inkscape -f $(PWD)/assets/logo.svg -w 128 -h 128 -e $(TMPDIR)/images/128-raw.png
- inkscape -f $(PWD)/assets/logo.svg -w 64 -h 64 -e $(TMPDIR)/images/64-raw.png
- inkscape -f $(PWD)/assets/logo.svg -w 32 -h 32 -jC -i layer1 -e $(TMPDIR)/images/32-1.png
- inkscape -f $(PWD)/assets/logo.svg -w 32 -h 32 -jC -i layer2 -e $(TMPDIR)/images/32-2.png
- composite -compose atop $(TMPDIR)/images/32-2.png $(TMPDIR)/images/32-1.png $(TMPDIR)/images/32-raw.png
- inkscape -f $(PWD)/assets/logo.svg -w 16 -h 16 -jC -i layer1 -e $(TMPDIR)/images/16-raw.png
- zopflipng -m -y $(TMPDIR)/images/128-raw.png $(TMPDIR)/images/128.png
- zopflipng -m -y $(TMPDIR)/images/64-raw.png $(TMPDIR)/images/64.png
- zopflipng -m -y $(TMPDIR)/images/32-raw.png $(TMPDIR)/images/32.png
- zopflipng -m -y $(TMPDIR)/images/16-raw.png $(TMPDIR)/images/16.png
- rm -f $(TMPDIR)/images/*-*.png
- convert $(TMPDIR)/images/16.png $(TMPDIR)/images/32.png \
- $(TMPDIR)/images/64.png $(TMPDIR)/images/128.png \
- $(PWD)/public/img/favicon.ico
- convert -flatten $(PWD)/public/img/favicon.png $(PWD)/public/img/apple-touch-icon.png
-
- rm -rf $(TMPDIR)/images
- $(foreach file, $(shell find public/img -type f -name '*.png' ! -name 'loading.png'),zopflipng -m -y $(file) $(file);)
+ npm install --no-save --no-package-lock xmldom fabric imagemin-zopfli
+ node build/generate-images.js
.PHONY: pr\#%
pr\#%: clean-all