1 <project name="Potlatch2 über compile system" default="debug">
3 <!-- load properties from the environment -->
4 <property environment="env" />
6 <!-- load previously defined configuration properties file -->
7 <property file="build.properties" />
9 <!-- flexTasks comes with flex, but apparently it's good practice to put in the libs folder -->
10 <taskdef resource="flexTasks.tasks" classpath="${basedir}/lib/flexTasks.jar"/>
12 <!-- if you are running git-svn, you need to run "git tag -a 0.4 0ac0de" where 0ac0de corresponds to the commitid of
13 potlatch2 v0.4 . You need to do this for each point release while we're still in SVN.
14 If you don't, then expect "git describe" to fail miserably.
15 Produces a build number of the form 0.4-1-g9692243 which means 1 commit later than 0.4, latest commit was 9692243 -->
16 <available file=".git" type="dir" property="git.present"/>
17 <target name="git-buildnumber" description="Store output from git-describe in ${buildnumber}" if="git.present">
18 <exec outputproperty="build_number" executable="git" dir="${basedir}">
19 <arg value="describe" />
23 <!-- if you are running svn ("I pity the fool", etc) then svnversion will give the svn revision number, and the
24 build number will be of the form 24041 -->
25 <available file=".svn" type="dir" property="svn.present"/>
26 <target name="svn-buildnumber" description="Store output from svnversion in ${buildnumber}" if="svn.present">
27 <exec outputproperty="build_number" executable="svnversion" dir="${basedir}" />
30 <!-- delete and create the DEPLOY dir again -->
31 <target name="init" depends="git-buildnumber,svn-buildnumber">
32 <echo>Build Number ${build_number}</echo>
33 <copy file="version.as.template" tofile="version.as" overwrite="true" />
34 <replace file="version.as" token="@@@buildnumber@@@" value="${build_number}" />
37 <!-- Build and output potlatch2.swf in debug mode -->
38 <target name="debug" depends="init">
39 <mxmlc file="potlatch2.mxml">
40 <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
41 <load-config filename="debug-config.xml"/>
42 <source-path path-element="${FLEX_HOME}/frameworks"/>
43 <compiler.debug>true</compiler.debug>
47 <!-- Build and output potlatch2.swf in release mode -->
48 <target name="release" depends="init">
49 <mxmlc file="potlatch2.mxml">
50 <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
51 <source-path path-element="${FLEX_HOME}/frameworks"/>
52 <compiler.debug>false</compiler.debug>
56 <target name="halcyon">
57 <mxmlc file="halcyon_viewer.as" />