From 4db774c1ec0c0b20611fea938d2603e6a3dfe4ca Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Thu, 25 Jul 2013 12:48:16 -0400 Subject: pre-gzip script.json as part of build process --- unrpyc/Makefile | 17 +++++++++++++---- unrpyc/README | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'unrpyc') diff --git a/unrpyc/Makefile b/unrpyc/Makefile index 6a94ca6..0463da9 100644 --- a/unrpyc/Makefile +++ b/unrpyc/Makefile @@ -1,10 +1,19 @@ -all: $(patsubst %.rpyc,%.json,$(wildcard *.rpyc)) +all: script.json.gz -%.json.o: %.rpyc *.py +script.json.gz: script.json + gzip -c script.json > script.json.gz + touch script.json script.json.gz + +script.json: $(patsubst %.rpyc,%.json,$(wildcard *.rpyc)) + cat script-*.json > script.json + sed -i -e 's/^/{/;s/,$$/}/' script.json + +script-%.json.o: script-%.rpyc *.py python unrpyc.py --clobber $< $@ -%.json: %.json.o +script-%.json: script-%.json.o node fix.js $< $@ + sed -i -e 's/^{//;s/}$$/,/' $@ clean: rm -f *.json.o *.json @@ -13,6 +22,6 @@ test: all jshint --show-non-errors *.json install: all - install -t ../www/scripts *.json + install -t ../www/scripts script.json script.json.gz .PHONY: all clean test install diff --git a/unrpyc/README b/unrpyc/README index ba1791f..9e4ef50 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". +5. Run "make install". Alternatively, move "script.json" into /www/scripts. If you're on Windows, sucks for you. Use a better OS. -- cgit v1.2.3-70-g09d2