blob: 8536dbce16d03ab8ceb0a919f3aeffc8f244a574 (
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
|
#!/bin/sh
# This script builds the webtry server; before compilation we need to create the code template
# so that it contains all publicly available header files in skia/include.
#
# By default, the script expects to be run out of the skia/experimental/webtry directory;
# if we move directories around this can be overridden by setting the SKIA_ROOT and WEBTRY_ROOT
# environment variables to point to the skia source tree and the webtry source tree,
# respectively.
[ -z "$SKIA_ROOT" ] && SKIA_ROOT="../.."
[ -z "$WEBTRY_ROOT" ] && WEBTRY_ROOT=`pwd`
[ -z "$GOROOT" ] && export GOROOT=/home/webtry/go
[ -z "$GOPATH" ] && export GOPATH=/home/webtry/golib
PATH=$PATH:$GOROOT/bin
cd ${SKIA_ROOT}/include
echo "Creating compile template..."
find core effects pathops -maxdepth 1 -name "*.h" | sed "s#^[^\/]*\/##g" | sed "s/\(.*\)/#include \"\1\"/" | sort > ${WEBTRY_ROOT}/templates/template.cpp
echo "SkBitmap source;" >> ${WEBTRY_ROOT}/templates/template.cpp
echo "{{.Code}}" >> ${WEBTRY_ROOT}/templates/template.cpp
cd ${WEBTRY_ROOT}
echo "Building webtry..."
go build webtry.go
echo "Done!"
|