summaryrefslogtreecommitdiff
path: root/README.rst
blob: bfd538bac458ded51ddfefdc9ba99f7f9de26d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
=======
HTML5KS
=======

.. image:: https://travis-ci.org/Hello71/html5ks.png
   :target: https://travis-ci.org/Hello71/html5ks

This is a WIP HTML5 implementation of the game `Katawa Shoujo`_.

How to use
==========
1. Navigate to http://html5ks.happinessforme.com/

How to build
============

Requirements
------------
- Katawa Shoujo (obviously)
- Firefox/Chrome/a sensible browser (i.e. not IE)
- a shell (Bash, dash, zsh, etc)
- GNU make 3.82 or greater (see `Makefile`_ section)
- ffmpeg (preferably git HEAD) with fdk-aac, libopus, libtheora, libvpx-vp9, libx264 - for full list, see ``configure`` or ``.travis.sh``
- cwebp and webpmux from libwebp
- convert from ImageMagick
- apngasm
- Node.js, npm for uglifyjs
- Python 3

Recommended
'''''''''''
- DeflOpt
- defluff
- inotify-tools (for ``make dev``)
- jpegmini
- jpegrescan
- jpegtran
- nginx
- pngquant
- zopfli and zopflipng

Build steps
-----------

0. Get Katawa Shoujo, install prerequisites. For guidance on Ubuntu, see .travis.sh.
1. Copy \*.rpyc from Katawa Shoujo/game into ast2json/ directory.
2. Extract files from Katawa Shoujo/game/data.rpa to www/dump/ with an rpa extractor, like rpatool or unrpa.
3. Install prerequisites.
4. Run ./configure.
5. Run make.
6. Run nginx.sh to start nginx, then navigate to localhost:8080 in your browser.
   -- OR --
6. Open www/index.html in a browser.

Disabling unused conversions
----------------------------

To reduce programs and build time required, some conversions can be disabled by passing ``CONVERSION=`` on the command line, e.g. ``ZOPFLIPNG= ./configure``.

Alternatively, just don't install those programs. Conversions that are safe to disable are labeled as such in ``configure``. If a required conversion is disabled, configure will print a big error.

Reducing disk usage
===================
Run ``make space``. Warning: This will remove source files from dump.

``make`` will continue to work (i.e. make new files as appropriate) but will not re-make converted files.

Contributing
============

See ``CONTRIBUTING.rst``.

Makefile
========

Run ``make dev`` to automatically start nginx and re-make when changes are made.

GNU make is required since I do not really want to write a script to output a Makefile.
I refuse to use autoconf; moreover, it isn't even relevant to this program, being designed for use with C/C++ projects.

Make 3.82 is required since this version sorts rules differently; versions of make prior to this one will not properly build www/dump/ctc_strip-0.png, resulting in errors building ctc_anim.png and ctc_anim-*.webp.
If you must use a version before that one (e.g. you are stuck on Ubuntu 12.04), manually building that file according to the Makefile should resolve the error.
Patches to fix this are welcome.

.. _`Katawa Shoujo`: http://www.katawa-shoujo.com/