summaryrefslogtreecommitdiffstats
path: root/build/bin/compile-gwt-components
blob: 2e72d3fb3642a915e1830f80fb94a16a30279893 (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
#!/bin/bash

# Check that the script is only run in build/bin
if [ ! -e compile-gwt-components ]; then
echo compile-gwt-components must only be run from build/bin directory
exit
fi

# Parameters
JVMVARS="-Xmx512M"

# Detect platform
PLATFORM=""
if [ -d "/Users" ]
then
    echo "MAC OS"
    PLATFORM="mac"
    # TODO isolate next command on macos10.5
    JVMVARS="$JVMVARS -XstartOnFirstThread"
else
	PLATFORM="linux"
fi


OUTDIR=../../WebContent/ITMILL/widgetsets
GWTDIR=../gwt/gwt
SRCDIR=../../src
STYLE=OBF

# Clean anything that could be wrong
#rm -r $OUTDIR/*
#rm -r .gwt-cache

# Build the widgetsets
java $JVMVARS -cp "$SRCDIR:$GWTDIR/gwt-user.jar:$GWTDIR/gwt-dev-$PLATFORM.jar" com.google.gwt.dev.GWTCompiler -out $OUTDIR com.itmill.toolkit.terminal.gwt.DefaultWidgetSet -style $STYLE
java $JVMVARS -cp "$SRCDIR:$GWTDIR/gwt-user.jar:$GWTDIR/gwt-dev-$PLATFORM.jar" com.google.gwt.dev.GWTCompiler -out "../../WebContent/ITMILL/widgetsets" com.itmill.toolkit.demo.colorpicker.gwt.WidgetSet -style $STYLE
java $JVMVARS -cp "$SRCDIR:$GWTDIR/gwt-user.jar:../../lib/reservr/googlemaps_gwt.jar:$GWTDIR/gwt-dev-$PLATFORM.jar" com.google.gwt.dev.GWTCompiler -out "../../WebContent/ITMILL/widgetsets" com.itmill.toolkit.demo.reservation.gwt.WidgetSet -style $STYLE