From 69890d17a01426cf7de8b6aa1dc64b56dfb7449d Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 6 Mar 2014 17:02:37 -0500 Subject: meh --- Makefile | 254 +++++++++++++++++++++++++++++++----------------- Modernizr | 2 +- fastclick | 2 +- unrpyc/Makefile | 46 --------- unrpyc/find-gzip.sh | 3 +- www/js/api.js | 2 + www/js/lib/Modernizr | 1 - www/js/lib/fastclick | 1 - www/js/lib/fastclick.js | 1 + www/js/lib/spin.js | 2 +- www/js/lib/when | 1 - 11 files changed, 172 insertions(+), 143 deletions(-) delete mode 100644 unrpyc/Makefile delete mode 120000 www/js/lib/Modernizr delete mode 120000 www/js/lib/fastclick create mode 120000 www/js/lib/fastclick.js delete mode 120000 www/js/lib/when diff --git a/Makefile b/Makefile index 1501ded..4ce5698 100644 --- a/Makefile +++ b/Makefile @@ -21,16 +21,116 @@ DEFLOPT ?= wine DeflOpt DEFLUFF ?= defluff PNGQUANT ?= pngquant endif +GZIP := $(shell unrpyc/find-gzip.sh) -DUMP ?= www/dump +all: js json video audio images -all: video audio images js -# fails miserably, fix pls -# cd unrpyc && $(MAKE) install +# === JS === + +MYJS := www/js/html5ks.js www/js/menu.js www/js/api.js \ + www/js/characters.js www/js/imachine.js www/js/i18n.js +JSLIBS := www/js/lib/fastclick.js www/js/lib/modernizr-build.js \ + www/js/lib/when.js www/js/lib/spin.js +JSDATA := www/js/play.js www/js/images.js +JS := $(JSLIBS) $(MYJS) $(JSDATA) +JSOUT := www/js/all.min.js + +js: $(JSOUT) + +ifeq ($(JS_COMPRESSOR), uglifyjs) +$(JSOUT): $(JS) $(UGLIFYJS) + $(UGLIFYJS) $(JS) -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false +else +$(JSOUT): $(JS) +# note that packr doesn't actually work +ifeq ($(JS_COMPRESSOR), packr) + $(PACKR) $(JS) -o "$@" +else +ifeq ($(JS_COMPRESSOR), closure_compiler) + $(CLOSURE_COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --create_source_map "$@".map --js $(subst $(SPACE), --js ,$(JS)) --js_output_file "$@" +endif # ($(JS_COMPRESSOR), closure_compiler) +endif # ($(JS_COMPRESSOR), packr) +endif # ($(JS_COMPRESSOR), uglifyjs) + +$(LOCAL_UGLIFYJS): package.json + $(NPM) update + touch "$@" + +www/js/lib/modernizr-build.js: Modernizr config-all.json + ln -fs ../../config-all.json "$<"/lib/config-all.json + cd "$<" && $(NPM) update && node_modules/.bin/grunt build + +www/js/lib/when.js: when + export PYTHON=python2; cd when && $(NPM) update && $(NPM) run browserify-debug + +# === JSON === +JSON := www/json/script.json www/json/script.json.gz www/json/imachine.json \ + www/json/imachine.json.gz www/json/ui-strings.json \ + www/json/ui-strings.json.gz www/json/ui-strings_FR.json \ + www/json/ui-strings_FR.json.gz + +RPYC := unrpyc/script-a1-friday_FR.rpyc unrpyc/script-a1-friday.rpyc \ + unrpyc/script-a1-monday_FR.rpyc unrpyc/script-a1-monday.rpyc \ + unrpyc/script-a1-saturday_FR.rpyc unrpyc/script-a1-saturday.rpyc \ + unrpyc/script-a1-sunday_FR.rpyc unrpyc/script-a1-sunday.rpyc \ + unrpyc/script-a1-thursday_FR.rpyc unrpyc/script-a1-thursday.rpyc \ + unrpyc/script-a1-tuesday_FR.rpyc unrpyc/script-a1-tuesday.rpyc \ + unrpyc/script-a1-wednesday_FR.rpyc unrpyc/script-a1-wednesday.rpyc \ + unrpyc/script-a2-emi_FR.rpyc unrpyc/script-a2-emi.rpyc \ + unrpyc/script-a2-hanako_FR.rpyc unrpyc/script-a2-hanako.rpyc \ + unrpyc/script-a2-lilly_FR.rpyc unrpyc/script-a2-lilly.rpyc \ + unrpyc/script-a2-rin_FR.rpyc unrpyc/script-a2-rin.rpyc \ + unrpyc/script-a2-shizune_FR.rpyc unrpyc/script-a2-shizune.rpyc \ + unrpyc/script-a3-emi_FR.rpyc unrpyc/script-a3-emi.rpyc \ + unrpyc/script-a3-hanako_FR.rpyc unrpyc/script-a3-hanako.rpyc \ + unrpyc/script-a3-lilly_FR.rpyc unrpyc/script-a3-lilly.rpyc \ + unrpyc/script-a3-rin_FR.rpyc unrpyc/script-a3-rin.rpyc \ + unrpyc/script-a3-shizune_FR.rpyc unrpyc/script-a3-shizune.rpyc \ + unrpyc/script-a4-emi_FR.rpyc unrpyc/script-a4-emi.rpyc \ + unrpyc/script-a4-hanako_FR.rpyc unrpyc/script-a4-hanako.rpyc \ + unrpyc/script-a4-lilly_FR.rpyc unrpyc/script-a4-lilly.rpyc \ + unrpyc/script-a4-rin_FR.rpyc unrpyc/script-a4-rin.rpyc \ + unrpyc/script-a4-shizune_FR.rpyc unrpyc/script-a4-shizune.rpyc +SJSON := $(patsubst unrpyc/%.rpyc,www/json/%.json,$(RPYC)) +JSONO := $(patsubst unrpyc/%.rpyc,unrpyc/%.json.o,%(RPYC)) + +# FIXME +# json: $(JSON) +json: + +%.json.gz: %.json + $(GZIP) -c $< > $@ + touch $< $@ + +www/json/script.json: $(SJSON) + cat $^ > "$@" + sed -i -e 's/^/{/;s/,$$/}/' "$@" + +www/json/%.json: unrpyc/%.json.o + uglifyjs "$<" --expr > "$@" + +define unrpyc = + python3 unrpyc/unrpyc.py --clobber "$<" "$@" +endef + +unrpyc/ui-strings.json.o unrpyc/ui-strings_FR.json.o: unrpyc/ui-strings%.json.o: unrpyc/ui-strings%.rpyc unrpyc/*.py + $(unrpyc) + sed -i -e 's/ \["init_language", "[a-z]*", \],//;s/^\]}$$/}/' "$@" + +unrpyc/ui_settings.json.o: ui_settings.rpyc *.py + python3 unrpyc.py --clobber "$<" --ignore-python "$@" + sed -i -e 's/,,/,/g;/: *,$$/d' "$@" + +unrpyc/%.json.o: unrpyc/%.rpyc unrpyc/*.py + $(unrpyc) + +www/json/script-%.json: unrpyc/script-%.json.o + uglifyjs "$<" --expr > "$@" + sed -i -e 's/^{//;s/}$$/,/' "$@" # === VIDEO === -VIDEO := $(wildcard $(DUMP)/video/*.mkv) +VIDEO := $(wildcard www/dump/video/*.mkv) Y4M := $(patsubst %.mkv,%.y4m,$(VIDEO)) MP4 := $(patsubst %.mkv,%.mp4,$(VIDEO)) WEBM := $(patsubst %.mkv,%.webm,$(VIDEO)) @@ -43,37 +143,21 @@ video: $(CVIDEO) %.y4m: %.mkv $(FFMPEG) -i "$<" -c:a copy "$@" -ifdef NOTEMP -%.mp4: %.mkv -else -%.mp4: %.y4m -endif +$(if $(NOTEMP),%.mp4: %.mkv,%.mp4: %.y4m) $(FFMPEG) -i "$<" -c:v libx264 -preset slower -tune animation -movflags empty_moov -profile:v baseline -c:a libfdk_aac -b:a 60k "$@" -ifdef NOTEMP -%.webm: %.mkv -else -%.webm: %.y4m -endif +$(if $(NOTEMP),%.webm: %.mkv,%.webm: %.y4m) $(FFMPEG) -i "$<" -crf 10 -b:v 1M -c:a copy "$@" -ifdef NOTEMP -%.vp9.webm: %.mkv -else -%.vp9.webm: %.y4m -endif +$(if $(NOTEMP),%.vp9.webm: %.mkv,%.vp9.webm: %.y4m) $(FFMPEG) -i "$<" -strict -2 -c:v libvpx-vp9 -crf 8 -b:v 1M -c:a libopus -vbr on -b:a 64k "$@" -ifdef NOTEMP -%.ogv: %.mkv -else -%.ogv: %.y4m -endif +$(if $(NOTEMP),%.ogv: %.mkv,%.ogv: %.y4m) $(FFMPEG) -i "$<" -c:v libtheora -qscale:v 10 -c:a copy "$@" # === AUDIO === -AUDIO := $(wildcard $(DUMP)/bgm/*.ogg) $(wildcard $(DUMP)/sfx/*.ogg) +AUDIO := $(wildcard www/dump/bgm/*.ogg) $(wildcard www/dump/sfx/*.ogg) OPUS := $(patsubst %.ogg,%.opus,$(AUDIO)) M4A := $(patsubst %.ogg,%.m4a,$(AUDIO)) WAV := $(patsubst %.ogg,%.wav,$(AUDIO)) @@ -92,33 +176,58 @@ audio: $(CAUDIO) # === IMAGES === -PNG := $(shell find $(DUMP) -name '*.png' ! -name 'ctc_strip.png') -JPG := $(shell find $(DUMP) -name '*.jpg') +PNG := $(shell find www/dump -name '*.png' ! -name 'ctc_strip.png') +JPG := $(shell find www/dump -name '*.jpg') WEBP := $(patsubst %.png,%.webp,$(PNG)) \ $(patsubst %.jpg,%.webp,$(JPG)) -CTC_ANIM_SRC := $(DUMP)/ui/ctc_strip.png -CTC_ANIM_TMP := $(DUMP)/ui/ctc_strip-0.png $(DUMP)/ui/ctc_strip-1.png $(DUMP)/ui/ctc_strip-2.png $(DUMP)/ui/ctc_strip-3.png $(DUMP)/ui/ctc_strip-4.png $(DUMP)/ui/ctc_strip-5.png $(DUMP)/ui/ctc_strip-6.png $(DUMP)/ui/ctc_strip-7.png $(DUMP)/ui/ctc_strip-8.png $(DUMP)/ui/ctc_strip-9.png $(DUMP)/ui/ctc_strip-10.png $(DUMP)/ui/ctc_strip-11.png $(DUMP)/ui/ctc_strip-12.png $(DUMP)/ui/ctc_strip-13.png $(DUMP)/ui/ctc_strip-14.png $(DUMP)/ui/ctc_strip-15.png $(DUMP)/ui/ctc_strip-16.png $(DUMP)/ui/ctc_strip-17.png $(DUMP)/ui/ctc_strip-18.png $(DUMP)/ui/ctc_strip-19.png $(DUMP)/ui/ctc_strip-20.png $(DUMP)/ui/ctc_strip-21.png $(DUMP)/ui/ctc_strip-22.png $(DUMP)/ui/ctc_strip-23.png $(DUMP)/ui/ctc_strip-24.png $(DUMP)/ui/ctc_strip-25.png $(DUMP)/ui/ctc_strip-26.png $(DUMP)/ui/ctc_strip-27.png $(DUMP)/ui/ctc_strip-28.png $(DUMP)/ui/ctc_strip-29.png $(DUMP)/ui/ctc_strip-30.png $(DUMP)/ui/ctc_strip-31.png $(DUMP)/ui/ctc_strip-32.png $(DUMP)/ui/ctc_strip-33.png $(DUMP)/ui/ctc_strip-34.png $(DUMP)/ui/ctc_strip-35.png $(DUMP)/ui/ctc_strip-36.png $(DUMP)/ui/ctc_strip-37.png $(DUMP)/ui/ctc_strip-38.png $(DUMP)/ui/ctc_strip-39.png $(DUMP)/ui/ctc_strip-40.png $(DUMP)/ui/ctc_strip-41.png $(DUMP)/ui/ctc_strip-42.png $(DUMP)/ui/ctc_strip-43.png $(DUMP)/ui/ctc_strip-44.png $(DUMP)/ui/ctc_strip-45.png $(DUMP)/ui/ctc_strip-46.png $(DUMP)/ui/ctc_strip-47.png $(DUMP)/ui/ctc_strip-48.png $(DUMP)/ui/ctc_strip-49.png $(DUMP)/ui/ctc_strip-50.png $(DUMP)/ui/ctc_strip-51.png $(DUMP)/ui/ctc_strip-52.png $(DUMP)/ui/ctc_strip-53.png $(DUMP)/ui/ctc_strip-54.png $(DUMP)/ui/ctc_strip-55.png $(DUMP)/ui/ctc_strip-56.png $(DUMP)/ui/ctc_strip-57.png $(DUMP)/ui/ctc_strip-58.png $(DUMP)/ui/ctc_strip-59.png $(DUMP)/ui/ctc_strip-60.png $(DUMP)/ui/ctc_strip-61.png $(DUMP)/ui/ctc_strip-62.png $(DUMP)/ui/ctc_strip-63.png +CTC_ANIM_SRC := www/dump/ui/ctc_strip.png +CTC_ANIM_TMP := www/dump/ui/ctc_strip-0.png www/dump/ui/ctc_strip-1.png \ + www/dump/ui/ctc_strip-2.png www/dump/ui/ctc_strip-3.png \ + www/dump/ui/ctc_strip-4.png www/dump/ui/ctc_strip-5.png \ + www/dump/ui/ctc_strip-6.png www/dump/ui/ctc_strip-7.png \ + www/dump/ui/ctc_strip-8.png www/dump/ui/ctc_strip-9.png \ + www/dump/ui/ctc_strip-10.png www/dump/ui/ctc_strip-11.png \ + www/dump/ui/ctc_strip-12.png www/dump/ui/ctc_strip-13.png \ + www/dump/ui/ctc_strip-14.png www/dump/ui/ctc_strip-15.png \ + www/dump/ui/ctc_strip-16.png www/dump/ui/ctc_strip-17.png \ + www/dump/ui/ctc_strip-18.png www/dump/ui/ctc_strip-19.png \ + www/dump/ui/ctc_strip-20.png www/dump/ui/ctc_strip-21.png \ + www/dump/ui/ctc_strip-22.png www/dump/ui/ctc_strip-23.png \ + www/dump/ui/ctc_strip-24.png www/dump/ui/ctc_strip-25.png \ + www/dump/ui/ctc_strip-26.png www/dump/ui/ctc_strip-27.png \ + www/dump/ui/ctc_strip-28.png www/dump/ui/ctc_strip-29.png \ + www/dump/ui/ctc_strip-30.png www/dump/ui/ctc_strip-31.png \ + www/dump/ui/ctc_strip-32.png www/dump/ui/ctc_strip-33.png \ + www/dump/ui/ctc_strip-34.png www/dump/ui/ctc_strip-35.png \ + www/dump/ui/ctc_strip-36.png www/dump/ui/ctc_strip-37.png \ + www/dump/ui/ctc_strip-38.png www/dump/ui/ctc_strip-39.png \ + www/dump/ui/ctc_strip-40.png www/dump/ui/ctc_strip-41.png \ + www/dump/ui/ctc_strip-42.png www/dump/ui/ctc_strip-43.png \ + www/dump/ui/ctc_strip-44.png www/dump/ui/ctc_strip-45.png \ + www/dump/ui/ctc_strip-46.png www/dump/ui/ctc_strip-47.png \ + www/dump/ui/ctc_strip-48.png www/dump/ui/ctc_strip-49.png \ + www/dump/ui/ctc_strip-50.png www/dump/ui/ctc_strip-51.png \ + www/dump/ui/ctc_strip-52.png www/dump/ui/ctc_strip-53.png \ + www/dump/ui/ctc_strip-54.png www/dump/ui/ctc_strip-55.png \ + www/dump/ui/ctc_strip-56.png www/dump/ui/ctc_strip-57.png \ + www/dump/ui/ctc_strip-58.png www/dump/ui/ctc_strip-59.png \ + www/dump/ui/ctc_strip-60.png www/dump/ui/ctc_strip-61.png \ + www/dump/ui/ctc_strip-62.png www/dump/ui/ctc_strip-63.png CTC_ANIM_TMP_WEBP := $(patsubst %.png,%.webp,$(CTC_ANIM_TMP)) -CTC_ANIM := $(DUMP)/ui/ctc_anim.png $(DUMP)/ui/ctc_anim.webp +CTC_ANIM := www/dump/ui/ctc_anim.png www/dump/ui/ctc_anim.webp CIMAGE := $(WEBP) $(CTC_ANIM) www/favicon.ico images: $(CIMAGE) -$(DUMP)/ui/ctc_strip.webp: $(DUMP)/ui/ctc_strip.png +www/dump/ui/ctc_strip.webp: www/dump/ui/ctc_strip.png define png2webp = $(PNGQUANT) --force --speed 1 --ext .png "$<" -ifdef ZOPFLIPNG - $(ZOPFLIPNG) -m -y "$<" "$<" -endif -ifdef DEFLOPT - $(DEFLOPT) "$<" -endif -ifdef DEFLUFF - $(DEFLUFF) < "$<" > "$<".tmp - mv -f "$<".tmp "$<" -endif + $(if $(ZOPFLIPNG), $(ZOPFLIPNG) -m -y "$<" "$<") + $(if $(DEFLOPT), $(DEFLOPT) "$<") + $(if $(DEFLUFF), $(DEFLUFF) < "$<" > "$<".tmp + mv -f "$<".tmp "$<") endef %.webp: %.png @@ -128,68 +237,32 @@ endef %.webp: %.jpg $(CWEBP) -q 90 -m 6 "$<" -o "$@" -www/favicon.ico: $(DUMP)/ui/icon.png +www/favicon.ico: www/dump/ui/icon.png $(CONVERT) "$<" -resize 256x256 -transparent white "$@" -$(DUMP)/ui/bt-cf-unchecked.webp $(DUMP)/ui/bt-cf-checked.webp: %.webp: %.png +www/dump/ui/bt-cf-unchecked.webp www/dump/ui/bt-cf-checked.webp: %.webp: %.png $(CONVERT) -trim "$<" "$<" $(png2webp) -$(DUMP)/ui/ctc_strip-0.png: $(CTC_ANIM_SRC) - $(CONVERT) "$<" -crop 16x16 $(DUMP)/ui/ctc_strip-%d.png +www/dump/ui/ctc_strip-0.png: $(CTC_ANIM_SRC) + $(CONVERT) "$<" -crop 16x16 www/dump/ui/ctc_strip-%d.png -$(DUMP)/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) $(DUMP)/ui/ctc_strip-0.png +www/dump/ui/ctc_strip-%.png: $(CTC_ANIM_SRC) www/dump/ui/ctc_strip-0.png @ -$(DUMP)/ui/ctc_anim.png: $(CTC_ANIM_TMP) +www/dump/ui/ctc_anim.png: $(CTC_ANIM_TMP) $(APNGASM) "$@" $^ 3 100 -$(DUMP)/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) +www/dump/ui/ctc_anim.webp: $(CTC_ANIM_TMP_WEBP) $(WEBPMUX) -frame $(subst $(SPACE), +30 -frame ,$^) +30 -loop 0 -o "$@" -# === JS === - -MYJS := www/js/html5ks.js www/js/menu.js www/js/api.js www/js/characters.js www/js/imachine.js www/js/i18n.js -JSLIBS := fastclick/lib/fastclick.js Modernizr/dist/modernizr-build.js when/build/when.js spin.js/spin.js -JSDATA := www/js/play.js www/js/images.js -JS := $(JSLIBS) $(MYJS) $(JSDATA) -JSOUT := www/js/all.min.js - -Modernizr/dist/modernizr-build.js: Modernizr config-all.json - ln -fs ../../config-all.json "$<"/lib/config-all.json - cd "$<" && $(NPM) update && node_modules/.bin/grunt build - -when/build/when.js: when - export PYTHON=python2; cd when && $(NPM) update && $(NPM) run browserify-debug - -js: $(JSOUT) - -ifeq ($(JS_COMPRESSOR), uglifyjs) -$(JSOUT): $(JS) $(UGLIFYJS) - $(UGLIFYJS) $(JS) -o "$@" --source-map "$@".map --source-map-url ./all.min.js.map --screw-ie8 -p 2 -m -c unsafe=true,drop_debugger=false -else -$(JSOUT): $(JS) -# note that packr doesn't actually work -ifeq ($(JS_COMPRESSOR), packr) - $(PACKR) $(JS) -o "$@" -else -ifeq ($(JS_COMPRESSOR), closure_compiler) - $(CLOSURE_COMPILER) --compilation_level SIMPLE_OPTIMIZATIONS --create_source_map "$@".map --js $(subst $(SPACE), --js ,$(JS)) --js_output_file "$@" -endif # ($(JS_COMPRESSOR), closure_compiler) -endif # ($(JS_COMPRESSOR), packr) -endif # ($(JS_COMPRESSOR), uglifyjs) - -$(LOCAL_UGLIFYJS): package.json - $(NPM) update - touch "$@" - # === MISC === -jshint: $(MYJS) +test: $(MYJS) jshint --show-non-errors $^ space: - $(RM) -r $(DUMP)/font + $(RM) -r www/dump/font $(RM) $(WAV) $(VIDEO) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) $(JSOUT) $(JSOUT).map watch: @@ -199,8 +272,9 @@ watch: done # disable implicit rules, increases `make` speed by 3 seconds -MAKEFLAGS=-r +# also check symlink targets (for js) +MAKEFLAGS=-r -L .SUFFIXES: -.INTERMEDIATE: $(Y4M) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) -.PHONY: video audio images js jshint clean space watch +.INTERMEDIATE: $(JSONO) $(Y4M) $(CTC_ANIM_TMP) $(CTC_ANIM_TMP_WEBP) +.PHONY: video audio images js json jshint 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/fastclick b/fastclick index 2a044a3..96c956b 160000 --- a/fastclick +++ b/fastclick @@ -1 +1 @@ -Subproject commit 2a044a32484294ea94727769ba99819bffb007a2 +Subproject commit 96c956bbf5efd0f860cfc67499a44927ba5c9b75 diff --git a/unrpyc/Makefile b/unrpyc/Makefile deleted file mode 100644 index 3259d12..0000000 --- a/unrpyc/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -GZIP := $(shell ./find-gzip.sh) - -JSON := script.json script.json.gz imachine.json imachine.json.gz ui-strings.json ui-strings.json.gz ui-strings_FR.json ui-strings_FR.json.gz - -all: $(JSON) - -%.json.gz: %.json - $(GZIP) -c $< > $@ - touch $< $@ - -script.json: $(patsubst %.rpyc,%.json,$(wildcard script-*.rpyc)) - cat script-*.json > script.json - sed -i -e 's/^/{/;s/,$$/}/' script.json - -%.json: %.json.o - uglifyjs $< --expr > $@ - -ui-strings.json.o ui-strings_FR.json.o: ui-strings%.json.o: ui-strings%.rpyc *.py - python3 unrpyc.py --clobber $< $@ - sed -i -e 's/ \["init_language", "[a-z]*", \],//;s/^\]}$$/}/' $@ - -ui_settings.json.o: ui_settings.rpyc *.py - python3 unrpyc.py --clobber $< --ignore-python $@ - sed -i -e 's/,,/,/g;/: *,$$/d' $@ - -%.json.o: %.rpyc *.py - python3 unrpyc.py --clobber $< $@ - -script-%.json: script-%.json.o - uglifyjs $< --expr > $@ - sed -i -e 's/^{//;s/}$$/,/' $@ - -clean: - $(RM) *.json* - -test: all - jshint --show-non-errors *.json - -install: all - [ -d ../www/json ] || mkdir ../www/json - cp -f $(JSON) ../www/json - -uninstall: - $(RM) ../www/json/* - -.PHONY: all clean test install diff --git a/unrpyc/find-gzip.sh b/unrpyc/find-gzip.sh index 2c2e51d..c9e8e00 100755 --- a/unrpyc/find-gzip.sh +++ b/unrpyc/find-gzip.sh @@ -1,9 +1,10 @@ #!/bin/sh if command -v zopfli; then : -elif command -v gzip; then +elif G=$(command -v gzip); [[ "$G" ]]; then echo >&2 "Consider obtaining zopfli (https://github.com/Hello71/zopfli) for higher" echo >&2 "compression ratios (about 5% decrease in size of script.json.gz)." + echo "$G" -9 else echo >&2 "Could not find zopfli or gzip, aborting." exit 1 diff --git a/www/js/api.js b/www/js/api.js index 1452074..04d8c5a 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -465,6 +465,8 @@ window.html5ks.api = { } else { done = true; ctc.style.display = "block"; + ctc.class = ""; + ctc.class = "ctc"; } }; diff --git a/www/js/lib/Modernizr b/www/js/lib/Modernizr deleted file mode 120000 index 98543c7..0000000 --- a/www/js/lib/Modernizr +++ /dev/null @@ -1 +0,0 @@ -../../../Modernizr/lib \ No newline at end of file diff --git a/www/js/lib/fastclick b/www/js/lib/fastclick deleted file mode 120000 index 3b8df4c..0000000 --- a/www/js/lib/fastclick +++ /dev/null @@ -1 +0,0 @@ -../../../fastclick \ No newline at end of file diff --git a/www/js/lib/fastclick.js b/www/js/lib/fastclick.js new file mode 120000 index 0000000..fa8c8ea --- /dev/null +++ b/www/js/lib/fastclick.js @@ -0,0 +1 @@ +../../../fastclick/lib/fastclick.js \ No newline at end of file diff --git a/www/js/lib/spin.js b/www/js/lib/spin.js index 90c2d0f..2bcd5fa 120000 --- a/www/js/lib/spin.js +++ b/www/js/lib/spin.js @@ -1 +1 @@ -../../../spin.js \ No newline at end of file +../../../spin.js/spin.js \ No newline at end of file diff --git a/www/js/lib/when b/www/js/lib/when deleted file mode 120000 index 13d75d5..0000000 --- a/www/js/lib/when +++ /dev/null @@ -1 +0,0 @@ -../../../when/build \ No newline at end of file -- cgit v1.2.3-70-g09d2