scripts/build.xml
author Eugene Ostroukhov <eugeneo@symbian.org>
Thu, 04 Nov 2010 15:22:02 -0700
changeset 495 0008ebdc0ec0
parent 195 f02192d5e8f8
permissions -rw-r--r--
Launch configurations were updated

<!--
    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
    
    This build script creates a build directory containing the plugins
    and features to be built, and then kicks off the PDE build process.
    You could just as easily do this from a shell script or cron job.
    
    Also, the script can be run inside the Eclipse IDE by choosing 
    Run As -> Ant Build from the context menu. It could obviously be
    run outside of the IDE if you have ANT installed on your path.
    
    If you have any questions about this build, feel free to contact me
    at patrick@rcpquickstart.com.
    
    Modified by Lukas Zapletal <lzapletal@pikeelectronic.com>.
    
	Retrieved from an article on Google Knol (http://knol.google.com/k/automating-eclipse-pde-build#). 
	Customized from the Symbian Foundation by John Kern (johnk@symbian.org). 
-->

<project name="org.symbian.tools.wrttools" default="build">
    <property file="build.properties" />

    <!--
        PDE Build expects that the build directory contains a "plugins" 
        directory and a "features" directory. These directories should contain
        the various plug-ins and features to be built.
        
        It's possible to use the CVS checkout process that is built into 
        PDE Build. This is done with map files and is beyond the scope of 
        this tutorial. 
        
        This tutorial simply copies the projects directly from your workspace
        into the appropriate build directory folders.
    -->


   <target name="init">
        <mkdir dir="${buildDirectory}" />
        <mkdir dir="${buildDirectory}/plugins" />
	<echo message="source dir: ${sourceDirectory}" />
	<echo message="build dir: ${buildDirectory} " />
        <copy todir="${buildDirectory}/plugins">
            <fileset dir="${sourceDirectory}">
                <include name="org.chromium**/**/*" />
                <include name="org.symbian**/**/*" />
                <include name="org.w3c.css**/**/*" />
		<exclude name="org.symbian.tools.wrttools.feature/**/*" />
            </fileset>
        </copy>
	<mkdir dir="${buildDirectory}/features" />
        <copy todir="${buildDirectory}/features">
            <fileset dir="${sourceDirectory}">
                <include name="org.symbian.tools.wrttools.feature/**" />
            </fileset>
        </copy>
    </target>

    <!--
        This target actually executes the PDE Build process by launching the 
        Eclipse antRunner application.
    -->
    <target name="pde-build">
        <echo message="Executing ${eclipseLocation}/plugins/org.eclipse.equinox.launcher_${equinoxLauncherPluginVersion}.jar"/>
	<echo message="source dir: ${sourceDirectory}" />
	<echo message="build dir: ${buildDirectory} " />
        <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
            <arg value="-application" />
            <arg value="org.eclipse.ant.core.antRunner" />
            <arg value="-buildfile" />
            <arg value="${eclipseLocation}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/productBuild/productBuild.xml" />
            <arg value="-Dtimestamp=${timestamp}" />
	    <arg value="-DbuildDirectory=${buildDirectory}" />
            <arg value="-DsourceDirectory=${sourceDirectory}" />
            <classpath>
                <pathelement location="${eclipseLocation}/plugins/org.eclipse.equinox.launcher_${equinoxLauncherPluginVersion}.jar" />
            </classpath>
        </java>
    </target>

    <target name="clean">
        <delete dir="${buildDirectory}" />
    </target>

    <target name="build" depends="init, pde-build" />
</project>