From 6f4c832e1f581addb9590535266a4b78999345ae Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 5 Mar 2014 18:41:35 -0500 Subject: adjust makefile --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 14372c2..cb7c1ec 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SPACE := $(null) $(null) FFMPEG ?= ffmpeg FFMPEG += -v warning -y CWEBP ?= cwebp -CWEBP += -quiet -alpha_cleanup +CWEBP += -quiet -alpha_cleanup -m 6 WEBPMUX ?= webpmux CONVERT ?= convert APNGASM ?= apngasm @@ -107,6 +107,7 @@ images: $(CIMAGE) $(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png define png2webp = + $(CWEBP) -q 99 "$<" -o "$@" $(PNGQUANT) --force --speed 1 --ext .png "$<" ifdef ZOPFLIPNG $(ZOPFLIPNG) -m -y "$<" "$<" @@ -121,11 +122,10 @@ endif endef %.webp: %.png - $(CWEBP) -q 99 -m 6 "$<" -o "$@" $(png2webp) %.webp: %.jpg - $(CWEBP) -q 90 -m 6 "$<" -o "$@" + $(CWEBP) -q 90 "$<" -o "$@" www/favicon.ico: $(DUMP)/ui/icon.png $(CONVERT) "$<" -resize 256x256 -transparent white "$@" @@ -140,7 +140,8 @@ $(DUMP)/ui/ctc_strip-0.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-0.png @ -$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP) +# depend on webp to wait for recompression +$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP_WEBP) $(APNGASM) "$@" $^ 3 100 $(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) -- cgit v1.2.3-54-g00ecf From d0d86adcdb3a00fc44b68627b0b571de5e454a1f Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 5 Mar 2014 18:46:55 -0500 Subject: apparently you can't use ifdef inside define --- Makefile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index cb7c1ec..5d6f5e1 100644 --- a/Makefile +++ b/Makefile @@ -109,16 +109,10 @@ $(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png define png2webp = $(CWEBP) -q 99 "$<" -o "$@" $(PNGQUANT) --force --speed 1 --ext .png "$<" -ifdef ZOPFLIPNG - $(ZOPFLIPNG) -m -y "$<" "$<" -endif -ifdef DEFLOPT - $(DEFLOPT) "$<" -endif -ifdef DEFLUFF - $(DEFLUFF) < "$<" > "$<".tmp + $(if $(ZOPFLIPNG), $(ZOPFLIPNG) -m -y "$<" "$<") + $(if $(DEFLOPT),$(DEFLOPT) "$<") + $(if $(DEFLUFF),$(DEFLUFF) < "$<" > "$<".tmp) mv -f "$<".tmp "$<" -endif endef %.webp: %.png -- cgit v1.2.3-54-g00ecf From 5b2a9a221ed74fbf10f229f665d05af3a12184c9 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Wed, 5 Mar 2014 19:00:25 -0500 Subject: duh --- Makefile | 5 +++-- Modernizr | 2 +- README.rst | 2 +- fastclick | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5d6f5e1..b5f6edc 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ CWEBP += -quiet -alpha_cleanup -m 6 WEBPMUX ?= webpmux CONVERT ?= convert APNGASM ?= apngasm -NPM ?= npm +NPM ?= npm --quiet JS_COMPRESSOR ?= uglifyjs LOCAL_UGLIFYJS := node_modules/.bin/uglifyjs UGLIFYJS ?= $(LOCAL_UGLIFYJS) @@ -16,7 +16,7 @@ PACKR ?= packr CLOSURE_COMPILER ?= java -jar compiler.jar ifndef MINIMAL ZOPFLIPNG ?= zopflipng -DEFLOPT ?= wine DeflOpt +#DEFLOPT ?= wine DeflOpt DEFLUFF ?= defluff PNGQUANT ?= pngquant endif @@ -196,5 +196,6 @@ watch: MAKEFLAGS=-r .SUFFIXES: +.SECONDARY: $(WAV) .INTERMEDIATE: $(Y4M) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) .PHONY: video audio images js jshint clean space watch diff --git a/Modernizr b/Modernizr index 22a9cac..6714aa7 160000 --- a/Modernizr +++ b/Modernizr @@ -1 +1 @@ -Subproject commit 22a9cacbc8dbb0db50d78171e122fdaf5a0bcd16 +Subproject commit 6714aa7c635316101c1b85df08b757771a826514 diff --git a/README.rst b/README.rst index d73258a..7ad7699 100644 --- a/README.rst +++ b/README.rst @@ -41,7 +41,7 @@ Recommended Build steps ----------- -0. Get Katawa Shoujo. +0. Get Katawa Shoujo, install prerequisites. For guidance on Ubuntu, see .travis.sh. 1. Copy \*.rpyc from Katawa Shoujo/game into unrpyc/ directory. 2. Extract files from Katawa Shoujo/game/data.rpa with an rpa extractor, e.g. unrpa. Put files in www/dump. 3. Install prerequisites, download DeflOpt and defluff and place exes in this directory. diff --git a/fastclick b/fastclick index 2a044a3..96c956b 160000 --- a/fastclick +++ b/fastclick @@ -1 +1 @@ -Subproject commit 2a044a32484294ea94727769ba99819bffb007a2 +Subproject commit 96c956bbf5efd0f860cfc67499a44927ba5c9b75 -- cgit v1.2.3-54-g00ecf From e1d07bb81e160d5cbcfd221406f40f16a2fa5c30 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sat, 8 Mar 2014 15:09:07 -0500 Subject: stuff --- Makefile | 10 ++++++---- README.rst | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0a344e4..f1af3b1 100644 --- a/Makefile +++ b/Makefile @@ -105,8 +105,6 @@ CIMAGE := $(WEBP) $(CTC_ANIM) www/favicon.ico images: $(CIMAGE) -$(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png - define png2webp = $(CWEBP) -q 99 "$<" -o "$@" $(PNGQUANT) --force --speed 1 --ext .png "$<" @@ -132,12 +130,15 @@ $(DUMP)/ui/bt-cf-unchecked.webp $(DUMP)/ui/bt-cf-checked.webp: %.webp: %.png $(DUMP)/ui/ctc_strip-0.png: $(CTC_ANIM_SRC) $(CONVERT) "$<" -crop 16x16 $(DUMP)/ui/ctc_strip-%d.png +$(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png + @ + $(DUMP)/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-0.png @ # depend on webp to wait for recompression $(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP_WEBP) - $(APNGASM) "$@" $^ 3 100 + $(APNGASM) "$@" $(CTC_ANIM_TMP) 3 100 $(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) $(WEBPMUX) -frame $(subst $(SPACE), +30 -frame ,$^) +30 -loop 0 -o "$@" @@ -187,8 +188,9 @@ space: $(RM) -r $(DUMP)/font $(RM) $(WAV) $(VIDEO) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) $(JSOUT) $(JSOUT).map -watch: +dev: $(MAKE) + ./nginx.sh while inotifywait -r -e modify,delete,move --exclude="^\./\.git" --exclude="\.swp.?$$" .; do \ $(MAKE); \ done diff --git a/README.rst b/README.rst index 7ad7699..71601fc 100644 --- a/README.rst +++ b/README.rst @@ -72,6 +72,6 @@ Check Bugzilla for things that need to be done. https://bugzilla.happinessforme. See docs/ for the obvious. -Run ``make watch`` to automatically re-make when changes are made. +Run ``make dev`` to automatically start nginx and re-make when changes are made. .. _`Katawa Shoujo`: http://www.katawa-shoujo.com/ -- cgit v1.2.3-54-g00ecf From 6c7ec4995dc309715c0cfc769d523afb173cd983 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Sun, 9 Mar 2014 20:52:54 -0400 Subject: update Modernizr --- Modernizr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modernizr b/Modernizr index 6714aa7..d6e1d6f 160000 --- a/Modernizr +++ b/Modernizr @@ -1 +1 @@ -Subproject commit 6714aa7c635316101c1b85df08b757771a826514 +Subproject commit d6e1d6f09e1f8250eca9116bcffe2f846616afa7 -- cgit v1.2.3-54-g00ecf