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