scripts/build.xml
author Eugene Ostroukhov <eugeneo@symbian.org>
Tue, 16 Feb 2010 17:20:28 -0800
changeset 162 e01adc30c935
parent 157 c68f6790ea55
child 159 137ed78712d1
permissions -rw-r--r--
Launcher settings were updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
157
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     1
<!--
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     2
    This program and the accompanying materials are made available
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     3
    under the terms of the Eclipse Public License v1.0 which
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     4
    accompanies this distribution, and is available at
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     5
      http://www.eclipse.org/legal/epl-v10.html
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     6
    
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     7
    This build script creates a build directory containing the plugins
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     8
    and features to be built, and then kicks off the PDE build process.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
     9
    You could just as easily do this from a shell script or cron job.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    10
    
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    11
    Also, the script can be run inside the Eclipse IDE by choosing 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    12
    Run As -> Ant Build from the context menu. It could obviously be
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    13
    run outside of the IDE if you have ANT installed on your path.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    14
    
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    15
    If you have any questions about this build, feel free to contact me
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    16
    at patrick@rcpquickstart.com.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    17
    
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    18
    Modified by Lukas Zapletal <lzapletal@pikeelectronic.com>.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    19
    
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    20
	Retrieved from an article on Google Knol (http://knol.google.com/k/automating-eclipse-pde-build#). 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    21
	Customized from the Symbian Foundation by John Kern (johnk@symbian.org). 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    22
-->
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    23
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    24
<project name="org.symbian.tools.wrttools" default="build">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    25
    <property file="build.properties" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    26
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    27
    <!--
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    28
        PDE Build expects that the build directory contains a "plugins" 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    29
        directory and a "features" directory. These directories should contain
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    30
        the various plug-ins and features to be built.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    31
        
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    32
        It's possible to use the CVS checkout process that is built into 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    33
        PDE Build. This is done with map files and is beyond the scope of 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    34
        this tutorial. 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    35
        
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    36
        This tutorial simply copies the projects directly from your workspace
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    37
        into the appropriate build directory folders.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    38
    -->
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    39
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    40
   <property name="sourceDirectory" location="/home/symbian/wrttools/" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    41
   <target name="init">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    42
        <mkdir dir="${buildDirectory}" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    43
        <mkdir dir="${buildDirectory}/plugins" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    44
	<echo message="${sourceDirectory}" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    45
        <copy todir="${buildDirectory}/plugins">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    46
            <fileset dir="${sourceDirectory}">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    47
                <include name="org.chromium**/**/*" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    48
            </fileset>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    49
           <fileset dir="${sourceDirectory}">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    50
                <include name="org.symbian**/**/*" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    51
		<exclude name="org.symbian.tools.wrttools.feature/**/*" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    52
            </fileset>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    53
        </copy>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    54
	<mkdir dir="${buildDirectory}/features" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    55
        <copy todir="${buildDirectory}/features">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    56
            <fileset dir="${sourceDirectory}">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    57
                <include name="org.symbian.tools.wrttools.feature/**" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    58
            </fileset>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    59
        </copy>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    60
    </target>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    61
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    62
    <!--
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    63
        This target actually executes the PDE Build process by launching the 
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    64
        Eclipse antRunner application.
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    65
    -->
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    66
    <target name="pde-build">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    67
        <echo message="Executing ${eclipseLocation}/plugins/org.eclipse.equinox.launcher_${equinoxLauncherPluginVersion}.jar"/>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    68
        <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    69
            <arg value="-application" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    70
            <arg value="org.eclipse.ant.core.antRunner" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    71
            <arg value="-buildfile" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    72
            <arg value="${eclipseLocation}/plugins/org.eclipse.pde.build_${pdeBuildPluginVersion}/scripts/productBuild/productBuild.xml" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    73
            <arg value="-Dtimestamp=${timestamp}" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    74
            <classpath>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    75
                <pathelement location="${eclipseLocation}/plugins/org.eclipse.equinox.launcher_${equinoxLauncherPluginVersion}.jar" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    76
            </classpath>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    77
        </java>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    78
    </target>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    79
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    80
    <target name="clean">
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    81
        <delete dir="${buildDirectory}" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    82
    </target>
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    83
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    84
    <target name="build" depends="init, pde-build" />
c68f6790ea55 ant build scripts
John Kern <johnk@symbian.org>
parents:
diff changeset
    85
</project>