Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e8d5a4e8a9
Fetching contributors…

Cannot retrieve contributors at this time

185 lines (161 sloc) 6.732 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, 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.release.summary" value="Release summary goes here" />
<property name="tarfilename" value="iui-${iui.version}.tar.gz" />
<property name="src.dir" location="iui" />
<property name="target.dir" location="target" />
<property name="release.dir" location="${target.dir}/release" />
<property name="tarfile" location="${target.dir}/${tarfilename}" />
<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" description="* - Create iuix.js by compressing iui.js">
<mkdir dir="${release.dir}" />
<compress-js file="${src.dir}/iui.js"
tofile="${release.dir}/iui/iuix.js"
stripCR="true" />
</target>
<!-- Compress CSS using Yahoo YUI Compressor -->
<target name="compress-css" 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="iui/iui.css" />
<arg value="-o"/>
<arg value="${release.dir}/iui/iuix.css"/>
</java>
</target>
<target name="docopy" description="* - Copy Files to release directory">
<mkdir dir="${release.dir}/iui"/>
<mkdir dir="${release.dir}/samples"/>
<!-- Copy subset of files of project root to release root -->
<copy todir="${release.dir}">
<fileset dir="${basedir}">
<include name="*.txt"/>
<include name="index.html"/>
</fileset>
</copy>
<!-- Copy iUI images, css, and js -->
<copy todir="${release.dir}/iui">
<fileset dir="${src.dir}"/>
</copy>
<!-- Copy samples -->
<copy todir="${release.dir}/samples">
<fileset dir="samples"/>
</copy>
<!-- Make second copy of sample.html in samplex.html that uses iuix.css and iuix.js -->
<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, docopy" 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="${release.dir}" tarfile="${tarfile}" compression="gzip" />
</target>
<target name="iui-release" depends="iui-tarball"
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="${tarfile}"
targetFileName="${tarfilename}"
summary="${iui.release.summary}"/>
</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}:~/iui">
<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.