summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.tools/Preprocessor/preprocess.xml
blob: cf6ff747d6c93ab2c2f8cc2ff135690255eaed4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8"?>

<!-- This file defines tasks for preprocessing the SWT java source files  -->

<project name="org.eclipse.swt.tools" default="swt.64" basedir="..">

	<target name="init" depends="properties">
		<property name="plugindir" value="../org.eclipse.swt"/>
		<property name="bootclasspath" value=""/>
		<taskdef name="swt.replace" classname="org.eclipse.swt.tools.internal.SwtReplace" classpath="./bin"/>
		<taskdef name="swt.jnigen" classname="org.eclipse.swt.tools.internal.SwtJniGen" classpath="./bin;${plugindir}/bin"/>
		
	</target>

	<target name="properties" if="eclipse.running">
		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
	</target>
		
	<!-- Convert SWT 32 bit java source to 64 bit  -->
	<target name="swt.64" depends="init">
		<swt.replace from="int /*long*/" to="long /*int*/">
			<fileset dir="${plugindir}" includes="**/*.java"/>
		</swt.replace>
	</target>
	
	<!-- Convert SWT 64 bit java source to 32 bit  -->
	<target name="swt.32" depends="init">
		<swt.replace from="long /*int*/" to="int /*long*/">
			<fileset dir="${plugindir}" includes="**/*.java"/>
		</swt.replace>
	</target>

	<!-- Output the C source code from the org.eclipse.swt project  -->
	<target name="swt.jnigen" depends="init">
		<!-- generate the C code from the (64 bit) SWT PI java classes -->
		<!-- assumes the org.eclipse.swt project has been built and contain the 64 bit java classes  -->
		<swt.jnigen mainclass="org.eclipse.swt.internal.gtk.OS" classpath="${basedir}/${plugindir}/bin" outputdir="${basedir}/${plugindir}/Eclipse SWT PI/gtk/library/"/>
		<swt.jnigen mainclass="org.eclipse.swt.internal.accessibility.gtk.ATK" classpath="${basedir}/${plugindir}/bin" outputdir="${basedir}/${plugindir}/Eclipse SWT PI/gtk/library/"/>
	</target>

</project>