Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

208 lines (181 sloc) 8.079 kb
<?xml version="1.0"?>
<!--+
+ iUI Ant Buildfile
+ http://code.google.com/p/iui
+
+ For help, open a command-line window and set yoru current directory to
+ the iui project root. Then type "ant -p" for help...
+
+ Copyright (c) 2007-2012, iUI Project Members
+ See LICENSE.txt for licensing terms
+
+-->
<project name="iui" default="releasedir" basedir=".">
<description>
Build file for iUI distributions
Targets marked with an "*" (asterisk) are useful when you have local modifications to iUI
Targets marked with an "r" are typically used only by the iUI team for building releases
To run a target type "ant [targetname]"
</description>
<!-- If you wish to override build settings, create a file called local.build.properties in
The project root. SVN is configured to ignore this file, so it won't accidentally be
checked in. Note that in Ant, whatever sets a property first "wins". -->
<property file="local.build.properties" />
<loadproperties srcFile="build.properties" /> <!-- Required -->
<!-- If version undefined at this point, use a timestamp -->
<tstamp />
<!-- <property name="iui.version" value="v${DSTAMP}-${TSTAMP}" /> -->
<property name="iui.version" value="v${DSTAMP}" />
<property name="iui.release.summary" value="Release summary goes here" />
<property name="iui.dash.vers" value="iui-${iui.version}" />
<property name="tarfilename" value="${iui.dash.vers}.tar.gz" />
<property name="zipfilename" value="${iui.dash.vers}.zip" />
<property name="src.dir.webapp" location="web-app" />
<property name="src.dir.iui" location="${src.dir.webapp}/iui" />
<property name="target.dir" location="target" />
<property name="release.dir" location="${target.dir}/${iui.dash.vers}" />
<property name="release.dir.webapp" location="${target.dir}/${iui.dash.vers}/web-app" />
<property name="tarfile" location="${target.dir}/${tarfilename}" />
<property name="zipfile" location="${target.dir}/${zipfilename}" />
<path id="compress-js.path">
<fileset dir="releasetools/lib">
<include name="compress-js.jar"/>
<include name="custom_rhino_from_lcasoft.jar"/>
</fileset>
</path>
<path id="yui-compressor.path">
<fileset dir="releasetools/lib">
<include name="yuicompressor-2.2.5.jar"/>
<include name="yui-rhino-1.6R7.jar"/>
<include name="yui-jargs-1.0.jar"/>
</fileset>
</path>
<path id="ant-googlecode.path">
<fileset dir="releasetools/lib">
<include name="ant-googlecode-0.0.0test.jar"/>
</fileset>
</path>
<!-- Define extension Ant tasks that aren't part of the standard Ant distro -->
<taskdef name="compress-js" classname="com.webpanes.tools.ant.taskdefs.CompressJS"
classpathref="compress-js.path" />
<taskdef name="GoogleCodeUploadTask" classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask"
classpathref="ant-googlecode.path" />
<!-- Ant targets, use "ant -p" for easier reading of the "description" attributes -->
<target name="compress-js" depends="docopy" description="* - Create iuix.js by compressing iui.js">
<mkdir dir="${release.dir}" />
<compress-js file="${src.dir.iui}/iui.js"
tofile="${release.dir.webapp}/iui/iuix.js"
stripCR="true" />
<!-- TODO: Compress/Concat extensions & optional files -->
</target>
<!-- Compress CSS using Yahoo YUI Compressor -->
<target name="compress-css" depends="docopy" description="* - Create iuix.css by compressing iui.css">
<java jar="releasetools/lib/yuicompressor-2.2.5.jar" fork="true" classpathref="yui-compressor.path">
<arg value="--type"/>
<arg value="css"/>
<arg value="${src.dir.iui}/iui.css" />
<arg value="-o"/>
<arg value="${release.dir.webapp}/iui/iuix.css"/>
</java>
<!-- TODO: Compress/Concat themes & extensions -->
</target>
<target name="docopy" description="* - Copy Files to release directory">
<mkdir dir="${release.dir.webapp}/iui"/>
<!-- Copy subset of files of project root to release root -->
<copy todir="${release.dir}">
<fileset dir="${basedir}">
<include name="*.txt"/>
</fileset>
</copy>
<!-- Copy iUI images, css, and js -->
<copy todir="${release.dir.webapp}">
<fileset dir="${src.dir.webapp}">
<exclude name="**/*.jar"/>
</fileset>
<filterset>
<filter token="VERSION" value="${iui.version}"/>
</filterset>
</copy>
<!-- Make second copy of sample.html in samplex.html that uses iuix.css and iuix.js -->
<!-- Disable for now...
<copy todir="${release.dir}/samples">
<fileset dir="samples">
<include name="*.html"/>
</fileset>
<globmapper from="*.html" to="*x.html"/>
<filterchain>
<tokenfilter>
<replaceregex pattern="../iui/iui.css" replace="../iui/iuix.css" flags="g"/>
<replaceregex pattern="../iui/iui.js" replace="../iui/iuix.js" flags="g"/>
</tokenfilter>
</filterchain>
</copy>
-->
</target>
<target name="releasedir" depends="compress-js, compress-css" description="* - Build releasedir (all tasks)">
</target>
<target name="clean" description="* - Remove all generated files">
<echo message="Deleting ${target.dir}" />
<delete dir="${target.dir}" />
</target>
<target name="iui-tarball" depends="releasedir" description="r - Make the tarball">
<mkdir dir="${release.dir}"/>
<tar basedir="${target.dir}" includes="${iui.dash.vers}/**" destfile="${tarfile}" compression="gzip" longfile="gnu" />
</target>
<target name="iui-zipfile" depends="releasedir" description="r - Make the zipfile">
<mkdir dir="${release.dir}"/>
<zip basedir="${target.dir}" includes="${iui.dash.vers}/**" destfile="${zipfile}" />
</target>
<target name="iui-release" depends="iui-zipfile"
description="r - Upload to download area of project site, requires Ant 1.7">
<echo message="Uploading using username ${gc.username}..." />
<GoogleCodeUploadTask
userName="${gc.username}"
password="${gc.password}"
projectName="iui"
filename="${zipfile}"
targetFileName="${zipfilename}"
summary="${iui.release.summary}"/>
</target>
<target name="update-codedoc" description="r - update doc from in-code comments">
<exec executable="python">
<arg value="docs-src/refresh_docs.py"/>
</exec>
</target>
<!--
<target name="publish-samples" depends="releasedir" description="r - publish sample apps via SSH">
<scp verbose="true" todir="${sample-server.ssh.user}:${sample-server.ssh.password}@${sample-server.ssh.host}:${sample-server.ssh.path}">
<fileset dir="${release.dir}"/>
</scp>
</target>
<target name="install-myproj" depends="releasedir" description="* - Install iUI into YOUR local project">
<mkdir dir="${myproj.dir.scripts}"/>
<mkdir dir="${myproj.dir.styles}"/>
<mkdir dir="${myproj.dir.images}"/>
<copy todir="${myproj.dir.styles}">
<fileset dir="${release.dir}/iui">
<include name="iui.css" if="myproj.copy-uncompressed"/>
<include name="iuix.css" if="myproj.copy-compressed"/>
</fileset>
<filterchain>
<tokenfilter>
<!-+- Adjust image urls in the CSS file to use ${myproj.image.path} -+->
<replaceregex pattern="url\(([^.]*)\.(png|gif)\)" replace="url\(${myproj.image.path}\1.\2\)" flags="g"/>
</tokenfilter>
</filterchain>
</copy>
<copy todir="${myproj.dir.scripts}">
<fileset dir="${release.dir}/iui">
<include name="iui.js" if="myproj.copy-uncompressed"/>
<include name="iuix.js" if="myproj.copy-compressed"/>
</fileset>
</copy>
<copy todir="${myproj.dir.images}">
<fileset dir="${release.dir}/iui">
<include name="*.png"/>
<include name="*.gif"/>
</fileset>
</copy>
</target>
-->
</project>
Jump to Line
Something went wrong with that request. Please try again.