scripts/build.xml
changeset 157 c68f6790ea55
child 159 137ed78712d1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/build.xml	Tue Feb 16 13:04:55 2010 -0800
@@ -0,0 +1,85 @@
+<!--
+    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.
+    -->
+
+   <property name="sourceDirectory" location="/home/symbian/wrttools/" />
+   <target name="init">
+        <mkdir dir="${buildDirectory}" />
+        <mkdir dir="${buildDirectory}/plugins" />
+	<echo message="${sourceDirectory}" />
+        <copy todir="${buildDirectory}/plugins">
+            <fileset dir="${sourceDirectory}">
+                <include name="org.chromium**/**/*" />
+            </fileset>
+           <fileset dir="${sourceDirectory}">
+                <include name="org.symbian**/**/*" />
+		<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"/>
+        <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}" />
+            <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>