aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarko Grönroos <magi@iki.fi>2008-06-13 13:38:09 +0000
committerMarko Grönroos <magi@iki.fi>2008-06-13 13:38:09 +0000
commitf75c2ac44fbbc229e24ac6d66959417a417746f2 (patch)
treebf514c52f755ca10252ebadc66da580e994fc2d0
parentb01214831bf46d7a654d177edf2e7a8089463a4e (diff)
downloadvaadin-framework-f75c2ac44fbbc229e24ac6d66959417a417746f2.tar.gz
vaadin-framework-f75c2ac44fbbc229e24ac6d66959417a417746f2.zip
Added build targets for widgetsets to build.xml. Largely fixes #1608.
svn changeset:4869/svn branch:trunk
-rw-r--r--WebContent/ITMILL/readme.txt39
-rw-r--r--build/build.xml209
2 files changed, 164 insertions, 84 deletions
diff --git a/WebContent/ITMILL/readme.txt b/WebContent/ITMILL/readme.txt
index 9544540610..aa7a826a66 100644
--- a/WebContent/ITMILL/readme.txt
+++ b/WebContent/ITMILL/readme.txt
@@ -1,11 +1,36 @@
-WebContent/ITMILL contains Themes and Widgetsets.
+======================
+Themes and Widget Sets
+======================
-Themes may be edited freely, it contains static images, CSS
+The WebContent/ITMILL directory contains Themes and Widgetsets.
+
+------
+Themes
+------
+
+Themes may be edited freely. They contain static images, CSS,
and layouts for Toolkit applications.
-Widgetsets is generated directory, we suggest that you do not edit it.
-You can re-create widgetsets directory by running below command on top directory.
-ant -f build-widgetsets.xml
+---------------------------
+Building Custom Widget Sets
+---------------------------
+The 'widgetsets' directory is generated automatically, so we suggest that you
+do not edit it. You can rebuild the widgetsets directory by running the
+command below in the top project directory:
+
+ ant -f build-widgetsets.xml
+
+See build-widgetsets.xml, com.itmill.toolkit.demo.colorpicker package, and the
+Reference Manual for more information regarding widget sets.
+
+---------------------------
+IT Mill Toolkit Development
+---------------------------
+When developing the IT Mill Toolkit Library itself, change to "build" directory and
+run "ant widgetsets" to compile all widgetsets or "ant widgetset-default",
+"ant-widgetset-reserver", or "ant widgetset-colorpicker" to compile individual
+widgetsets. You must have GWT installed under build/gwt, under the proper
+platform directory.
-See build-widgetsets.xml and com.itmill.toolkit.demo.colorpicker package for
-more information regarding widgetsets. \ No newline at end of file
+See http://dev.itmill.com/wiki/DevDocs/StartingDevelopment for instructions for
+installing GWT and compiling widgetsets for Toolkit development.
diff --git a/build/build.xml b/build/build.xml
index 1ecc247777..91df4d7de1 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -82,6 +82,28 @@
</delete>
</target>
+ <!-- Find out which platform we are in -->
+ <target name="init-platform">
+ <if>
+ <contains string="${os.name}" substring="Windows" />
+ <then>
+ <property name="platform" value="windows" />
+ </then>
+ </if>
+ <if>
+ <equals arg1="${os.name}" arg2="Linux" />
+ <then>
+ <property name="platform" value="linux" />
+ </then>
+ </if>
+ <if>
+ <equals arg1="${os.name}" arg2="Mac OS X" />
+ <then>
+ <property name="platform" value="mac" />
+ </then>
+ </if>
+ </target>
+
<!-- Initialization - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="init">
@@ -94,25 +116,7 @@
<!-- Create result dir unless already exists -->
<mkdir dir="${result-path}" />
- <!-- Find out which platform we are in -->
- <if>
- <contains string="${os.name}" substring="Windows" />
- <then>
- <property name="platform" value="windows" />
- </then>
- </if>
- <if>
- <equals arg1="${os.name}" arg2="Linux" />
- <then>
- <property name="platform" value="linux" />
- </then>
- </if>
- <if>
- <equals arg1="${os.name}" arg2="Mac OS X" />
- <then>
- <property name="platform" value="mac" />
- </then>
- </if>
+
<!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) -->
<property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" />
@@ -614,66 +618,117 @@
</java>
</target>
- <target name="compile-client-side" depends="webcontent">
- <parallel>
- <sequential>
- <echo>Compiling src (client-side)</echo>
- <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo>
- <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
- <arg value="-out" />
- <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
- <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" />
- <arg value="-style" />
- <arg value="OBF" />
- <classpath>
- <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" />
- <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" />
- <pathelement location="${result-path}/src" />
- </classpath>
- </java>
- </sequential>
-
- <sequential>
- <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo>
- <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
- <arg value="-out" />
- <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
- <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" />
- <arg value="-style" />
- <arg value="OBF" />
- <classpath>
- <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" />
- <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" />
- <pathelement location="${result-path}/src" />
- <!-- demo jars -->
- <pathelement location="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar" />
- <!-- demo widgetset sources -->
- <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
- </classpath>
- </java>
- </sequential>
-
- <sequential>
- <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo>
- <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
- <arg value="-out" />
- <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
- <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" />
- <arg value="-style" />
- <arg value="OBF" />
- <classpath>
- <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" />
- <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" />
- <pathelement location="${result-path}/src" />
- <!-- demo widgetset sources -->
- <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
- </classpath>
- </java>
- </sequential>
+ <target name="testtarget">
+ <echo>TEST TARGET CALLED</echo>
+ </target>
+
+ <target name="compile-widgetset-default">
+ <echo>Compiling src (client-side)</echo>
+ <echo>com.itmill.toolkit.terminal.gwt.DefaultWidgetSet</echo>
+ <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
+ <arg value="-out" />
+ <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
+ <arg value="com.itmill.toolkit.terminal.gwt.DefaultWidgetSet" />
+ <arg value="-style" />
+ <arg value="OBF" />
+ <classpath>
+ <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" />
+ <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" />
+ <pathelement location="${result-path}/src" />
+ </classpath>
+ </java>
+ <echo>Compiled DefaultWidgetSet</echo>
+ </target>
+
+ <target name="compile-widgetset-reserver">
+ <condition property="googlemaps-jar" value="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar">
+ <available file="${output-dir}/WebContent/demo/lib/reservr/googlemaps_gwt.jar"/>
+ </condition>
+ <condition property="googlemaps-jar" value="lib/reservr/googlemaps_gwt.jar">
+ <available file="lib/reservr/googlemaps_gwt.jar"/>
+ </condition>
+ <echo>com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet</echo>
+ <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
+ <arg value="-out" />
+ <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
+ <arg value="com.itmill.toolkit.demo.reservation.gwt.ReservationWidgetSet" />
+ <arg value="-style" />
+ <arg value="OBF" />
+ <classpath>
+ <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" />
+ <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" />
+ <pathelement location="${result-path}/src" />
+ <!-- demo jars -->
+ <pathelement location="${googlemaps-jar}" />
+ <!-- demo widgetset sources -->
+ <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
+ </classpath>
+ </java>
+ <echo>Compiled ReservationWidgetSet</echo>
+ </target>
+
+ <target name="compile-widgetset-colorpicker">
+ <echo>com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet</echo>
+ <java classname="com.google.gwt.dev.GWTCompiler" failonerror="yes" fork="yes" maxmemory="512m">
+ <arg value="-out" />
+ <arg value="${output-dir}/WebContent/ITMILL/widgetsets" />
+ <arg value="com.itmill.toolkit.demo.colorpicker.gwt.ColorPickerWidgetSet" />
+ <arg value="-style" />
+ <arg value="OBF" />
+ <classpath>
+ <pathelement location="${gwt-dir}/${platform}/gwt-user.jar" />
+ <pathelement location="${gwt-dir}/${platform}/${lib-gwt-dev}" />
+ <pathelement location="${result-path}/src" />
+ <!-- demo widgetset sources -->
+ <pathelement path="${output-dir}/WebContent/WEB-INF/src" />
+ </classpath>
+ </java>
+ <echo>Compiled ColorPickerWidgetSet</echo>
+ </target>
+
+ <!-- Builds the client-side engine, i.e., the widgetsets in parallel. -->
+ <target name="compile-client-side">
+ <parallel threadsperprocessor="1">
+ <subant antfile="build.xml" target="compile-widgetset-default" inheritall="true" buildpath="build"/>
+ <subant antfile="build.xml" target="compile-widgetset-reserver" inheritall="true" buildpath="build"/>
+ <subant antfile="build.xml" target="compile-widgetset-colorpicker" inheritall="true" buildpath="build"/>
</parallel>
</target>
- <target name="libs" depends="compile-java, compile-client-side">
+ <!-- Definitions for building local components, i.e., not for an installation package. -->
+ <target name="init-nonpackage" depends="init-platform">
+ <property file="build/build.properties" />
+ <property file="build/VERSION.properties" />
+
+ <!-- Definitions for building the client-side. -->
+ <property name="output-dir" value="."/>
+
+ <!-- Override the result path defined in build.properties. -->
+ <property name="result-path" value="."/>
+
+ <!-- required when compiling WebContent/ITMILL/widgetsets (and also Java server-side classes) -->
+ <property name="lib-gwt-dev" value="gwt-dev-${platform}.jar" />
+
+ <echo>We are on ${platform} platform, using ${gwt-dir}/${platform}/${lib-gwt-dev}.</echo>
+ </target>
+
+ <!-- Builds all widgetsets locally, i.e., not for an installation package. -->
+ <target name="widgetsets" depends="init-nonpackage, compile-client-side">
+ </target>
+
+ <!-- Builds the default widgetset locally, i.e., not for an installation package. -->
+ <target name="widgetset-default" depends="init-nonpackage, compile-widgetset-default">
+ </target>
+
+ <!-- Builds the reservation widgetset locally, i.e., not for an installation package. -->
+ <target name="widgetset-reserver" depends="init-nonpackage, compile-widgetset-reserver">
+ </target>
+
+ <!-- Builds the colorpicker widgetset locally, i.e., not for an installation package. -->
+ <target name="widgetset-colorpicker" depends="init-nonpackage, compile-widgetset-colorpicker">
+ </target>
+
+ <target name="libs" depends="compile-java, webcontent, compile-client-side">
<echo>Creating libs (server-side) ${lib-jar-name}</echo>
<!-- Create Toolkit JAR -->
<jar jarfile="${output-dir}/WebContent/WEB-INF/lib/${lib-jar-name}" compress="true">
@@ -854,7 +909,7 @@
</java>
</target>
- <target name="manual-html">
+ <target name="manual-html" depends="init, preprocess-src">
<echo>Manual: HTML</echo>
<delete file="build/docbook/conf/temp.xsl" />
<copy file="build/docbook/conf/custom-html-docbook.xsl" tofile="build/docbook/conf/temp.xsl">