blob: b8ae5d0b5bb9f1732a0df6a41f8501c7a291638e [file] [log] [blame]
<?xml version="1.0"?>
<!--
/***********************************************************************************************************************
* Copyright (c) 2008, 2014 Empolis Information Management GmbH and brox IT Solutions GmbH. All rights reserved. This program and
* the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies
* this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: Ralf Rausch (brox IT Solutions GmbH) - initial creator
* Juergen Schumacher (Empolis Information Management GmbH) - maintenance
**********************************************************************************************************************/
-->
<project name="Eclipse build" default="all" basedir=".">
<property name="build.dir" location="/opt/public/rt/smila" />
<property name="workspace.dir" location="${build.dir}/git/org.eclipse.smila.core" />
<property name="core.dir" location="${workspace.dir}/core" />
<property name="examples.dir" location="${workspace.dir}/examples" />
<property name="smila.build.dir" location="${build.dir}/smila.build" />
<property name="lib.dir" location="${build.dir}/libs" />
<property name="publish.dir" location="${build.dir}/nightly" />
<property name="javadoc.publish.dir" location="${build.dir}/javadoc" />
<property name="source.zip" value="${workspace.dir}/SMILA-core-source.zip" />
<property name="examples.zip" value="${workspace.dir}/SMILA-integrator-examples.zip" />
<!-- =================================================================== -->
<!-- TASK DEFS -->
<!-- =================================================================== -->
<path id="ant-contrib.lib">
<fileset dir="${lib.dir}/ant-contrib">
<include name="*.jar" />
</fileset>
</path>
<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="ant-contrib.lib" />
<target name="clean">
</target>
<target name="all" depends="pack-sources, build, javadoc, publish" />
<target name="pack-sources">
<if>
<available file="${core.dir}" />
<then>
<zip destfile="${source.zip}" basedir="${core.dir}" />
</then>
</if>
<if>
<available file="${examples.dir}" />
<then>
<zip destfile="${examples.zip}" basedir="${examples.dir}" />
</then>
</if>
</target>
<target name="build">
<!-- =================================================================== -->
<!-- Build SMILA application without testing -->
<!-- =================================================================== -->
<copy file="${core.dir}/SMILA.builder/build.properties.template" tofile="${core.dir}/SMILA.builder/build.properties" />
<antcall target="run-builder">
<param name="target" value="clean" />
</antcall>
<antcall target="run-builder">
<param name="target" value="final-application" />
</antcall>
</target>
<target name="javadoc">
<antcall target="run-builder">
<param name="target" value="javadoc" />
</antcall>
</target>
<target name="run-builder">
<ant antfile="${core.dir}/SMILA.builder/make.xml" target="${target}" dir="${core.dir}/SMILA.builder" inheritAll="false">
<property name="buildDirectory" value="${smila.build.dir}" />
<property name="eclipse.home" value="${build.dir}/platform/eclipse-SDK-4.4.2-linux-gtk-x86_64" />
<property name="eclipse.running" value="true" />
<property name="os" value="linux" />
<property name="ws" value="gtk" />
<property name="arch" value="x86_64" />
<property name="builder" value="${core.dir}/SMILA.builder" />
<property name="lib.dir" value="${lib.dir}" />
<property name="basedir" value="${core.dir}/SMILA.builder" />
</ant>
</target>
<target name="publish">
<property name="release" value="1.4-SNAPSHOT" />
<tstamp>
<format property="TODAY" pattern="yyyyMMdd" />
</tstamp>
<property name="version" value="${release}-${TODAY}" />
<!-- =================================================================== -->
<!-- Copy binaries to download folder -->
<!-- =================================================================== -->
<property name="BINARY.WIN" value="${smila.build.dir}/Application/SMILA-win32.win32.x86.zip" />
<property name="BINARY.WIN64" value="${smila.build.dir}/Application/SMILA-win32.win32.x86_64.zip" />
<property name="BINARY.LNX" value="${smila.build.dir}/Application/SMILA-linux.gtk.x86.zip" />
<property name="BINARY.LNX64" value="${smila.build.dir}/Application/SMILA-linux.gtk.x86_64.zip" />
<property name="BINARY.MOX" value="${smila.build.dir}/Application/SMILA-macosx.cocoa.x86_64.zip" />
<if>
<and>
<available file="${BINARY.WIN}" />
<available file="${BINARY.WIN64}" />
<available file="${BINARY.LNX}" />
<available file="${BINARY.LNX64}" />
<available file="${BINARY.MOX}" />
</and>
<then>
<echo> Binaries are available.</echo>
<delete>
<fileset dir="${publish.dir}" includes="**/*.zip" />
</delete>
<copy verbose="true" file="${BINARY.WIN}" tofile="${publish.dir}/SMILA-${version}-win32.win32.x86.zip" />
<copy verbose="true" file="${BINARY.WIN64}" tofile="${publish.dir}/SMILA-${version}-win32.win32.x86_64.zip" />
<copy verbose="true" file="${BINARY.LNX}" tofile="${publish.dir}/SMILA-${version}-linux.gtk.x86.zip" />
<copy verbose="true" file="${BINARY.LNX64}" tofile="${publish.dir}/SMILA-${version}-linux.gtk.x86_64.zip" />
<copy verbose="true" file="${BINARY.MOX}" tofile="${publish.dir}/SMILA-${version}-macosx.cocoa.x86_64.zip" />
</then>
<else>
<echo> Binaries are not available!</echo>
</else>
</if>
<if>
<available file="${smila.build.dir}/javadoc/index.html" />
<then>
<echo> Javadocs are available.</echo>
<delete dir="${javadoc.publish.dir}/current" failonerror="false" />
<copy verbose="false" todir="${javadoc.publish.dir}/current">
<fileset dir="${smila.build.dir}/javadoc" />
</copy>
</then>
<else>
<echo> Javadocs are not available!</echo>
</else>
</if>
<if>
<available file="${source.zip}" />
<then>
<echo> Sources are available.</echo>
<copy verbose="true" file="${source.zip}" tofile="${publish.dir}/SMILA-${version}-core-source.zip" />
</then>
<else>
<echo> Sources are not available!</echo>
</else>
</if>
<if>
<available file="${examples.zip}" />
<then>
<echo> Examples are available.</echo>
<copy verbose="true" file="${examples.zip}" tofile="${publish.dir}/SMILA-${version}-integrator-examples.zip" />
</then>
<else>
<echo> Examples are not available!</echo>
</else>
</if>
</target>
</project>