OLD | NEW |
| (Empty) |
1 #!/bin/sh | |
2 | |
3 # This script builds the webtry server; before compilation we need to create the
code template | |
4 # so that it contains all publicly available header files in skia/include. | |
5 # | |
6 # By default, the script expects to be run out of the skia/experimental/webtry d
irectory; | |
7 # if we move directories around this can be overridden by setting the SKIA_ROOT
and WEBTRY_ROOT | |
8 # environment variables to point to the skia source tree and the webtry source t
ree, | |
9 # respectively. | |
10 | |
11 [ -z "$SKIA_ROOT" ] && SKIA_ROOT="../.." | |
12 [ -z "$WEBTRY_ROOT" ] && WEBTRY_ROOT=`pwd` | |
13 | |
14 [ -z "$GOROOT" ] && export GOROOT=/home/webtry/go | |
15 [ -z "$GOPATH" ] && export GOPATH=/home/webtry/golib | |
16 | |
17 PATH=$PATH:$GOROOT/bin | |
18 | |
19 cd ${SKIA_ROOT}/include | |
20 echo "Creating compile template..." | |
21 find core effects pathops -maxdepth 1 -name "*.h" | sed "s/.*\///" | sed "s/\(.
*\)/#include \"\1\"/" | sort > ${WEBTRY_ROOT}/templates/template.cpp | |
22 echo '#include "sk_tool_utils.h"' >> ${WEBTRY_ROOT}/templates/template.cpp | |
23 echo '#include "SkCommandLineFlags.h"' >> ${WEBTRY_ROOT}/templates/template.cpp | |
24 echo '' >> ${WEBTRY_ROOT}/templates/template.cpp | |
25 echo "SkBitmap source;" >> ${WEBTRY_ROOT}/templates/template.cpp | |
26 echo "{{.Code}}" >> ${WEBTRY_ROOT}/templates/template.cpp | |
27 cd ${WEBTRY_ROOT} | |
28 echo "Building webtry..." | |
29 go build webtry.go | |
30 echo "Done!" | |
OLD | NEW |