summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-08-22 17:32:59 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-08-22 17:32:59 -0400
commit922245cf8843dd0b81d3b46aa0fa113de8a49e84 (patch)
tree33f679b1ce6bba894ef3821ad1e459b67bd2dc1e
parent6f96b4f9b19e54fba9e392347959e0e1ee68d876 (diff)
downloadhtml5ks-922245cf8843dd0b81d3b46aa0fa113de8a49e84.tar.xz
html5ks-922245cf8843dd0b81d3b46aa0fa113de8a49e84.zip
work on build chain
-rw-r--r--README10
-rwxr-xr-xiencode.sh2
-rwxr-xr-xreencode.sh7
-rwxr-xr-xsetup.sh15
-rw-r--r--unrpyc/README2
-rwxr-xr-xunrpyc/find-gzip.sh3
-rwxr-xr-xvencode.sh2
7 files changed, 24 insertions, 17 deletions
diff --git a/README b/README
index f3a05a3..9db2cdb 100644
--- a/README
+++ b/README
@@ -8,15 +8,15 @@ How to use:
0. Get Katawa Shoujo.
1. Follow steps in unrpyc/README
2. Extract files from data.rpa with an appropriate tool. Put files in www/dump.
-3. Modify www/dump/ui/bt-cf-{un,}checked.png to remove empty borders.
-4. Run reencode.sh to make .webm, .mp4, .ogg, .webp files. Use environment variable THREADS to control number of threads/processes spawned.
+3. Run setup.sh [2] to re-encode and fix up files. Use environment variable THREADS to control number of threads/processes spawned.
-4. Run nginx.sh to start nginx with appropriate options for development, then connect to localhost:8080.
+4. Run nginx.sh [2] to start nginx with appropriate options for development, then connect to localhost:8080.
-- or --
4. lighttpd -f lighttpd.conf should also work, but is not actively tested.
-Check Bugzilla for things that need to be done. [2]
+Check Bugzilla for things that need to be done. [3]
[0] http://www.katawa-shoujo.com/
[1] https://github.com/cujojs/when/
-[2] https://bugzilla.happinessforme.com/buglist.cgi?cmdtype=runnamed&namedcmd=Open+HTML5KS+bugs
+[2] If you're on Windoze, sucks for you. Use a better OS.
+[3] https://bugzilla.happinessforme.com/buglist.cgi?cmdtype=runnamed&namedcmd=Open+HTML5KS+bugs
diff --git a/iencode.sh b/iencode.sh
index 8e2fa81..990d027 100755
--- a/iencode.sh
+++ b/iencode.sh
@@ -12,7 +12,7 @@ iencode() {
QUAL="$2"
export EXT QUAL CWEBP CWEBP_FLAGS
set -x
- find . -name \*."${EXT}" -print0 | xargs -0 -n 1 bash -c '
+ find . -name \*."${EXT}" -print0 | xargs -0 -P ${THREADS} -n 1 bash -c '
IN="$0"
OUT="${IN%.${EXT}}.webp"
${CWEBP} -q "${QUAL}" ${CWEBP_FLAGS} ${IN} -o ${OUT}
diff --git a/reencode.sh b/reencode.sh
deleted file mode 100755
index 8aba8d8..0000000
--- a/reencode.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-export THREADS=${THREADS:-4}
-
-cd $(dirname $0)
-./vencode.sh
-./iencode.sh
diff --git a/setup.sh b/setup.sh
new file mode 100755
index 0000000..bd3afa8
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+export THREADS=${THREADS:-$(nproc)}
+
+cd $(dirname $0)
+./vencode.sh
+
+trim() {
+ convert -trim "$@" "$@"
+}
+
+trim www/dump/ui/bt-cf-unchecked.png
+trim www/dump/ui/bt-cf-checked.png
+
+./iencode.sh
diff --git a/unrpyc/README b/unrpyc/README
index 9e4ef50..ba1791f 100644
--- a/unrpyc/README
+++ b/unrpyc/README
@@ -8,7 +8,7 @@ How to use:
2. Execute "2to3 -w renpy/*.py".
3. Put the rpyc files from the official KS distribution in here.
4. Run "make" with appropriate -j options (yay auto-parallelization)
-5. Run "make install". Alternatively, move "script.json" into /www/scripts.
+5. Run "make install".
If you're on Windows, sucks for you. Use a better OS.
diff --git a/unrpyc/find-gzip.sh b/unrpyc/find-gzip.sh
index cb65dc9..de6d19e 100755
--- a/unrpyc/find-gzip.sh
+++ b/unrpyc/find-gzip.sh
@@ -1,11 +1,10 @@
#!/bin/sh
if command -v zopfli; then
- printf "%s" "$(command -v zopfli)"
+ :
elif command -v gzip; then
echo >&2 "Consider obtaining zopfli (https://code.google.com/p/zopfli/)"
echo >&2 "for higher compression ratios (about 5% decrease in size of"
echo >&2 "script.json.gz)."
- printf "%s" "$(command -v gzip) -9"
else
echo >&2 "Could not find zopfli or gzip, aborting."
exit 1
diff --git a/vencode.sh b/vencode.sh
index 23d20be..d29b52c 100755
--- a/vencode.sh
+++ b/vencode.sh
@@ -19,6 +19,6 @@ for f in *.mkv; do
vencode $f libx264 "-preset slower -tune animation" ${OUT}.mp4
vencode $f libvpx "-crf 15 -b:v 1M -an -f webm -y" /dev/null
vencode $f libvpx "-crf 15 -b:v 1M -c:a copy" ${OUT}.webm
- vencode $f libtheora "-qscale:v 6 -c:a copy" ${OUT}.ogg
+ vencode $f libtheora "-qscale:v 6 -c:a copy" ${OUT}.ogv
done