javauis/eswt_qt/org.eclipse.swt.qt.linux.x86.se/build.xml
changeset 21 2a9601315dfc
child 23 98ccebc37403
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="org.eclipse.swt.qt.linux.x86.se" default="build" basedir=".">
       
     3 
       
     4     <target name="help">
       
     5         <echo level="info">
       
     6 Usage: ant [one of the following:]
       
     7 build              : Build debug + release
       
     8 build.jar          : Build all jars
       
     9 build.debug        : Build all debug binaries
       
    10 build.release      : Build all release binaries
       
    11 build.lib          : Build all native libraries
       
    12 build.lib.debug    : Build debug native libraries
       
    13 build.lib.release  : Build release native libraries
       
    14 build.tests        : Build JUnit and MT tests
       
    15 clean              : Clean everything
       
    16 clean.jar          : Clean all jars
       
    17 clean.lib          : Clean native libraries and object files
       
    18 clean.lib.debug    : Clean debug native libraries and object files
       
    19 clean.lib.release  : Clean release native libraries and object files
       
    20 export             : Export everything
       
    21 export.jar         : Export Java classes packed as jar
       
    22 export.debug       : Export all debug binaries
       
    23 export.release     : Export all release binaries
       
    24 export.lib         : Export native libraries
       
    25 export.lib.debug   : Export debug native libraries
       
    26 export.lib.release : Export release native libraries
       
    27 run.tests                  : Run JUnit and MT tests
       
    28         </echo>
       
    29     </target>
       
    30 
       
    31     <target name="init" depends="init.env, init.export.path">
       
    32         <property file="./build.properties"></property>
       
    33         <property name="full.name" value="${fragment}_${version.suffix}"/>
       
    34         <property name="temp.dir" value="${basedir}/temp"/>
       
    35         <property name="plugin.destination" value="${basedir}"/>
       
    36         <property name="build.result.dir" value="${basedir}"/>
       
    37         <property name="download.destination" value="${basedir}"/>
       
    38         <property name="lib.path" value = "${plugin.dir}/Eclipse_SWT_PI/qt/library"/>
       
    39         <property name="lib.gfx.path" value = "${plugin.dir}/Eclipse_SWT_PI/qt/library/graphics"/>
       
    40         <mkdir dir="${lib.path}/${generated.native.dir}"/>
       
    41         <!-- Platform Specific properties -->
       
    42    </target>
       
    43 
       
    44     <target name="init.env">
       
    45         <property environment = "env"/>
       
    46     </target>
       
    47 
       
    48     <target name="init.export.path" if="env.JAVA_BIN_ROOT">
       
    49         <property name="export.jar.debug.path" value = "${env.JAVA_BIN_ROOT}/jsr/classes"/>
       
    50         <property name="export.jar.release.path" value = "${env.JAVA_BIN_ROOT}/jsr/classes"/>
       
    51         <property name="export.lib.debug.path" value = "${env.JAVA_BIN_ROOT}/lib"/>
       
    52         <property name="export.lib.release.path" value = "${env.JAVA_BIN_ROOT}/lib"/>
       
    53     </target>
       
    54         
       
    55     <target name="download" depends="init">
       
    56         <delete dir="${temp.dir}"/>
       
    57         <mkdir dir="${temp.dir}/swtdownload/"/>
       
    58         <antcall target="build.jar"/>
       
    59         <jar jarfile="${build.result.dir}/${jar.filename}" basedir="${basedir}/release/" 
       
    60                 update="true" includes="eswt*.dll,libeswt*.so"/>
       
    61         <copy file="${build.result.dir}/${jar.filename}" todir="${temp.dir}/swtdownload"/>
       
    62         <antcall target="src.zip"/>
       
    63         <copy file="${build.result.dir}/src.zip" todir="${temp.dir}/swtdownload"/>
       
    64         <copy file="${plugin.dir}/build/.project" todir="${temp.dir}/swtdownload"/>
       
    65         <copy file="${plugin.dir}/build/.classpath" todir="${temp.dir}/swtdownload"/>
       
    66         <copy todir="${temp.dir}/swtdownload">
       
    67             <fileset dir="${basedir}" includes="about.html,about_files/"/>
       
    68         </copy>
       
    69         <zip zipfile="${download.destination}/eswt-${ws}-${os}-${arch}-${jsdk}.zip">
       
    70             <zipfileset dir="${temp.dir}/swtdownload/"/>
       
    71         </zip>
       
    72         <delete dir="${temp.dir}"/>
       
    73     </target>
       
    74 
       
    75     <target name="src.zip" depends="init">
       
    76         <mkdir dir="${build.result.dir}/"/>
       
    77         <zip zipfile="${build.result.dir}/src.zip">
       
    78             <fileset dir="${plugin.dir}/Eclipse SWT/common/" includes="**/*.java" excludes=""/>
       
    79             <fileset dir="${plugin.dir}/Eclipse SWT/common_j2${java.edition}/" includes="**/*.java" excludes=""/>
       
    80             <fileset dir="${plugin.dir}/Eclipse SWT/qt/" includes="**/*.java" excludes=""/>
       
    81             <fileset dir="${plugin.dir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes=""/>
       
    82             <fileset dir="${plugin.dir}/Eclipse SWT Browser/qt/" includes="**/*.java" excludes=""/>
       
    83             <fileset dir="${plugin.dir}/Eclipse SWT Drag and Drop/qt/" includes="**/*.java" excludes=""/>
       
    84             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/common_j2${java.edition}/" includes="**/*.java" excludes=""/>
       
    85             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/qt/library/"/>
       
    86             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/qt/graphics_library/"/>
       
    87             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/qt/" includes="**/*.java" excludes=""/>
       
    88         	<fileset dir="${plugin.dir}/../com.nokia.swt.extensions/extensions/" includes="**/*.java" excludes=""/>
       
    89             <fileset dir="${plugin.dir}/Eclipse SWT/common_j2${java.edition}/" includes="**/*.properties" excludes=""/>
       
    90             <fileset dir="${plugin.dir}/Eclipse SWT/common/" includes="**/version.txt" excludes=""/>
       
    91             <fileset dir="${basedir}" includes="about.html,about_files/" excludes=""/>
       
    92         </zip>
       
    93     </target>
       
    94         
       
    95     <target name="gather.sources" depends="init" if="destination.temp.folder">
       
    96         <mkdir dir="${destination.temp.folder}/${full.name}"/>
       
    97         <copy file="${build.result.dir}/src.zip" todir="${destination.temp.folder}/${full.name}/"/>
       
    98         <copy todir="${destination.temp.folder}/${full.name}">
       
    99             <fileset dir="${basedir}" includes="about.html,about_files/"/>
       
   100         </copy>
       
   101     </target>
       
   102 
       
   103     <target name="gather.individual.sources" depends="init">
       
   104         <copy todir="${destination.temp.folder}/" failonerror="true" overwrite="true">
       
   105             <fileset dir="${plugin.dir}/Eclipse SWT/common/" includes="**/*.java" excludes=""/>
       
   106             <fileset dir="${plugin.dir}/Eclipse SWT/common_j2${java.edition}/" includes="**/*.java" excludes=""/>
       
   107             <fileset dir="${plugin.dir}/Eclipse SWT/qt/" includes="**/*.java" excludes=""/>
       
   108             <fileset dir="${plugin.dir}/Eclipse SWT Browser/common/" includes="**/*.java" excludes=""/>
       
   109             <fileset dir="${plugin.dir}/Eclipse SWT Browser/qt/" includes="**/*.java" excludes=""/>
       
   110             <fileset dir="${plugin.dir}/Eclipse SWT Drag and Drop/qt/" includes="**/*.java" excludes=""/>
       
   111             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/common_j2${java.edition}/" includes="**/*.java" excludes=""/>
       
   112             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/qt/" includes="**/*.java" excludes=""/>
       
   113             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/qt/library/"/>
       
   114             <fileset dir="${plugin.dir}/Eclipse_SWT_PI/qt/graphics_library/"/>
       
   115             <fileset dir="${plugin.dir}/../com.nokia.swt.extensions/extensions/" includes="**/*.java" excludes=""/>
       
   116             <fileset dir="${plugin.dir}/Eclipse SWT/common_j2${java.edition}/" includes="**/*.properties" excludes=""/>
       
   117             <fileset dir="${plugin.dir}/Eclipse SWT/common/" includes="**/version.txt" excludes=""/>
       
   118         </copy>
       
   119     </target>
       
   120 
       
   121     <target name="gather.bin.parts" depends="init" if="destination.temp.folder">
       
   122         <mkdir dir="${destination.temp.folder}/${full.name}"/>
       
   123         <copy todir="${destination.temp.folder}/${full.name}" failonerror="true">
       
   124             <fileset dir="${plugin.dir}/bin" includes="*"/>
       
   125         </copy>
       
   126         <copy todir="${destination.temp.folder}/${full.name}">
       
   127             <fileset dir="${basedir}" includes="eswt*.dll,libeswt*.so,META-INF/"/>
       
   128         </copy>
       
   129         <chmod perm="755" dir="${destination.temp.folder}/${full.name}" includes="eswt*.dll,libeswt*.so" />
       
   130         <eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}"/>
       
   131     </target>
       
   132         
       
   133     <target name="jar.plugin" depends="init">
       
   134         <delete dir="${temp.dir}"/>
       
   135         <mkdir dir="${temp.dir}"/>
       
   136         <antcall target="build.jar"/>
       
   137         <antcall target="gather.bin.parts">
       
   138             <param name="destination.temp.folder" value="${temp.dir}/"/>
       
   139         </antcall>
       
   140         <jar jarfile="${plugin.destination}/${full.name}.jar" 
       
   141                 basedir="${temp.dir}/${full.name}" filesonly="true"/>
       
   142         <delete dir="${temp.dir}"/>
       
   143     </target>
       
   144         
       
   145     <target name="zip.plugin" depends="init">
       
   146         <delete dir="${temp.dir}"/>
       
   147         <mkdir dir="${temp.dir}"/>
       
   148         <antcall target="build.jar"/>
       
   149         <antcall target="src.zip"/>
       
   150         <antcall target="gather.bin.parts">
       
   151             <param name="destination.temp.folder" value="${temp.dir}/"/>
       
   152         </antcall>
       
   153         <antcall target="gather.sources">
       
   154             <param name="destination.temp.folder" value="${temp.dir}/"/>
       
   155         </antcall>
       
   156         <zip zipfile="${plugin.destination}/${full.name}.zip" 
       
   157                 basedir="${temp.dir}" filesonly="true"/>
       
   158         <delete dir="${temp.dir}"/>
       
   159     </target>
       
   160 
       
   161     <target name="build">
       
   162         <antcall target="export.jar"/>
       
   163         <antcall target="export.lib"/>
       
   164     </target>
       
   165         
       
   166     <target name="build.jar" depends="init" description="Produces eswt-qt.jar">
       
   167         <mkdir dir="${plugin.dir}/bin"/>
       
   168         <javac destdir="${plugin.dir}/bin" source="${javac.source}" target="${javac.target}"
       
   169             debug="${javac.debug}" debuglevel="lines,vars,source" verbose="true" failonerror="true">
       
   170             <src path="${plugin.dir}/Eclipse SWT/common/"/>
       
   171             <src path="${plugin.dir}/Eclipse SWT/common_j2${java.edition}/"/>
       
   172             <src path="${plugin.dir}/Eclipse SWT/qt/"/>
       
   173             <src path="${plugin.dir}/Eclipse SWT Browser/common/"/>
       
   174             <src path="${plugin.dir}/Eclipse SWT Browser/qt/"/>
       
   175             <src path="${plugin.dir}/Eclipse SWT Drag and Drop/qt/"/>
       
   176             <src path="${plugin.dir}/Eclipse_SWT_PI/common_j2${java.edition}/"/>
       
   177             <src path="${plugin.dir}/Eclipse_SWT_PI/qt/"/>
       
   178             <src path="${plugin.dir}/../com.nokia.swt.extensions/extensions/"/>
       
   179             <src path="${plugin.dir}/../com.nokia.swt.extensions/midp_common/"/>
       
   180         </javac>
       
   181         <jar jarfile="${build.result.dir}/${jar.filename}" basedir="${plugin.dir}/bin"/>
       
   182     </target>
       
   183 
       
   184     <target name="build.debug">
       
   185         <antcall target="export.jar.debug"/>
       
   186         <antcall target="export.lib.debug"/>
       
   187     </target>
       
   188 
       
   189     <target name="build.release">
       
   190         <antcall target="export.jar.release"/>
       
   191         <antcall target="export.lib.release"/>
       
   192     </target>
       
   193 
       
   194     <target name="build.lib">
       
   195         <antcall target="build.lib.debug"/>
       
   196         <antcall target="build.lib.release"/>
       
   197     </target>
       
   198 
       
   199     <target name="build.lib.debug" depends="init">
       
   200         <antcall target="build.lib.common">
       
   201             <param name="build.lib.common.config" value="debug"/>
       
   202         </antcall>
       
   203     </target>
       
   204 
       
   205     <target name="build.lib.release" depends="init">
       
   206         <antcall target="build.lib.common">
       
   207             <param name="build.lib.common.config" value="release"/>
       
   208         </antcall>
       
   209     </target>
       
   210 
       
   211     <target name="build.lib.common" depends="init" description="params: config">
       
   212         <javah destdir="${lib.path}/${generated.native.dir}/" classpath="${plugin.dir}/bin" verbose="yes">
       
   213             <class name="org.eclipse.swt.internal.qt.OS"/>
       
   214             <class name="org.eclipse.swt.internal.qt.graphics.OS"/>
       
   215         </javah>
       
   216         <antcall target="qmake">
       
   217             <param name="qmake.dir" value="${lib.path}"/>
       
   218             <param name="qmake.target" value="${build.lib.common.config}"/>
       
   219             <param name="qmake.spec" value="${lib.spec}"/>
       
   220             <param name="qmake.file" value="${lib.makefile}.${build.lib.common.config}"/>
       
   221         </antcall>
       
   222         <antcall target="make">
       
   223             <param name="make.dir" value="${lib.path}"/>
       
   224             <param name="make.file" value="${lib.makefile}.${build.lib.common.config}"/>
       
   225             <param name="make.target" value="all"/>
       
   226         </antcall>
       
   227         <mkdir dir="${build.result.dir}/${build.lib.common.config}/"/>
       
   228         <copy file="${lib.path}/${build.lib.common.config}/${lib.filename}" 
       
   229             tofile="${build.result.dir}/${build.lib.common.config}/${lib.filename}" overwrite="true" verbose="true"/>
       
   230     </target>
       
   231 
       
   232     <target name="clean">
       
   233         <antcall target="clean.jar"/>
       
   234         <antcall target="clean.lib"/>
       
   235     </target>
       
   236         
       
   237     <target name="clean.jar" depends="init" description="">
       
   238         <delete dir="${plugin.dir}/bin"/>
       
   239         <delete file="${build.result.dir}/${jar.filename}" verbose="true"/>
       
   240         <delete file="${export.jar.debug.path}/${jar.filename}" verbose="true"/>
       
   241         <delete file="${export.jar.release.path}/${jar.filename}" verbose="true"/>
       
   242     </target>
       
   243 
       
   244     <target name="clean.lib">
       
   245         <antcall target="clean.lib.debug"/>
       
   246         <antcall target="clean.lib.release"/>
       
   247     </target>
       
   248 
       
   249     <target name="clean.lib.debug" depends="init">
       
   250         <antcall target="clean.lib.common">
       
   251             <param name="clean.lib.common.config" value="debug"/>
       
   252         </antcall>
       
   253     </target>
       
   254 
       
   255     <target name="clean.lib.release" depends="init">
       
   256         <antcall target="clean.lib.common">
       
   257             <param name="clean.lib.common.config" value="release"/>
       
   258         </antcall>
       
   259     </target>
       
   260 
       
   261     <target name="clean.lib.common" depends="init" description="params: config">
       
   262         <antcall target="make">
       
   263             <param name="make.dir" value="${lib.path}"/>
       
   264             <param name="make.target" value="clean"/>
       
   265             <param name="make.file" value="${lib.makefile}.${clean.lib.common.config}"/>
       
   266             <param name="fail" value="false"/>
       
   267         </antcall>
       
   268         <delete file="${lib.path}/${lib.makefile}.${clean.lib.common.config}" verbose="true"/>
       
   269         <delete dir="${lib.path}/${generated.native.dir}" verbose="true"/>
       
   270     	<delete dir="${lib.path}/${clean.lib.common.config}" verbose="true"/>
       
   271         <delete file="${build.result.dir}/${clean.lib.common.config}/${lib.filename}" verbose="true"/>
       
   272         <condition property="clean.lib.common.export.path" value="${export.lib.debug.path}" else="${export.lib.release.path}">
       
   273             <equals arg1="${clean.lib.common.config}" arg2="debug"/>
       
   274         </condition>
       
   275         <delete file="${clean.lib.common.export.path}/${lib.filename}" verbose="true"/>
       
   276     </target>
       
   277 
       
   278     <target name="export">
       
   279         <antcall target="export.jar"/>
       
   280         <antcall target="export.lib"/>
       
   281     </target>
       
   282 
       
   283     <target name="export.debug">
       
   284         <antcall target="export.jar.debug"/>
       
   285         <antcall target="export.lib.debug"/>
       
   286     </target>
       
   287 
       
   288     <target name="export.release">
       
   289         <antcall target="export.jar.release"/>
       
   290         <antcall target="export.lib.release"/>
       
   291     </target>
       
   292 
       
   293         <target name="export.jar">
       
   294                 <antcall target="export.jar.debug"/>
       
   295                 <antcall target="export.jar.release"/>
       
   296         </target>
       
   297 
       
   298         <target name="export.jar.debug" depends="build.jar" if="export.jar.debug.path">
       
   299                 <mkdir dir="${export.jar.debug.path}"/>
       
   300                 <copy file="${build.result.dir}/${jar.filename}" 
       
   301             tofile="${export.jar.debug.path}/${jar.filename}" overwrite="true" verbose="true"/>
       
   302         </target>
       
   303 
       
   304         <target name="export.jar.release" depends="build.jar" if="export.jar.release.path">
       
   305                 <mkdir dir="${export.jar.release.path}"/>
       
   306                 <copy file="${build.result.dir}/${jar.filename}"
       
   307             tofile="${export.jar.release.path}/${jar.filename}" overwrite="true" verbose="true"/>
       
   308         </target>
       
   309 
       
   310     <target name="export.lib">
       
   311         <antcall target="export.lib.debug"/>
       
   312         <antcall target="export.lib.release"/>
       
   313     </target>
       
   314 
       
   315     <target name="export.lib.debug" depends="build.lib.debug" if="export.lib.debug.path">
       
   316         <mkdir dir="${export.lib.debug.path}"/>
       
   317         <copy file="${lib.path}/debug/${lib.filename}" 
       
   318             tofile="${export.lib.debug.path}/${lib.filename}" overwrite="true" verbose="true"/>
       
   319     </target>
       
   320 
       
   321     <target name="export.lib.release" depends="build.lib.release" if="export.lib.release.path">
       
   322         <mkdir dir="${export.lib.release.path}"/>
       
   323         <copy file="${lib.path}/release/${lib.filename}"
       
   324             tofile="${export.lib.release.path}/${lib.filename}" overwrite="true" verbose="true"/>
       
   325     </target>
       
   326 
       
   327     <target name="make" description="params: dir, file, target">
       
   328         <exec executable="make" dir="${make.dir}" failonerror="true">
       
   329             <arg line="-f ${make.file} ${make.target}"/>
       
   330         </exec>
       
   331     </target>
       
   332 
       
   333     <target name="qmake" description="params: dir, spec, target">
       
   334         <exec executable="qmake" dir="${qmake.dir}" failonerror="true">
       
   335             <arg line="-spec ${qmake.spec} -o ${qmake.file}"/>
       
   336             <arg value="CONFIG+=${qmake.target}"/>
       
   337             <arg value="DESTDIR=${qmake.target}"/>
       
   338             <arg value="OBJECTS_DIR=${qmake.target}/${qmake.spec}/build"/>
       
   339         </exec>
       
   340     </target>
       
   341 
       
   342     <target name="build.tests" depends="init,build.release">
       
   343         <mkdir dir="${tests.utils.dir}/java/bin"/>
       
   344         <mkdir dir="${tests.junit.dir}/bin"/>
       
   345         <mkdir dir="${tests.mt.dir}/bin"/>
       
   346         
       
   347         <javac destdir="${tests.utils.dir}/java/bin" source="${javac.source}" target="${javac.target}" 
       
   348                 debug="${javac.debug}" debuglevel="lines,vars,source" verbose="true" failonerror="true">
       
   349                 <src path="${tests.utils.dir}/java/src/"/>
       
   350             <classpath>
       
   351                 <pathelement path="${plugin.dir}/bin/"/>
       
   352             </classpath>
       
   353         </javac>
       
   354         <javah outputfile="${tests.utils.dir}/native/os.h" classpath="${tests.utils.dir}/java/bin" verbose="yes">
       
   355             <class name="com.nokia.mj.impl.uitestutils.XlibUtils"/>
       
   356         </javah>
       
   357         <antcall target="qmake">
       
   358             <param name="qmake.dir" value="${tests.utils.dir}/native"/>
       
   359             <param name="qmake.target" value="release"/>
       
   360             <param name="qmake.spec" value="${lib.spec}"/>
       
   361             <param name="qmake.file" value="${lib.makefile}.release"/>
       
   362         </antcall>
       
   363         <antcall target="make">
       
   364             <param name="make.dir" value="${tests.utils.dir}/native"/>
       
   365             <param name="make.file" value="${lib.makefile}.release"/>
       
   366             <param name="make.target" value="all"/>
       
   367         </antcall>
       
   368         <copy file="${tests.utils.dir}/native/release/libxlibevents.so" 
       
   369             tofile="${build.result.dir}/release/libxlibevents.so" overwrite="true" verbose="true"/>
       
   370         
       
   371         <javac destdir="${tests.junit.dir}/bin" source="${javac.source}" target="${javac.target}" 
       
   372                 debug="${javac.debug}" debuglevel="lines,vars,source" verbose="true" failonerror="true">
       
   373             <src path="${tests.junit.dir}/org.eclipse.ercp.swt.core.tests/src/"/>
       
   374             <src path="${tests.junit.dir}/org.eclipse.ercp.swt.expanded.tests/src/"/>
       
   375             <src path="${tests.junit.dir}/org.eclipse.ercp.swt.mobile.tests.tck/src/"/>
       
   376             <src path="${tests.junit.dir}/org.eclipse.ercp.swt.core.tests.qt/src/"/>
       
   377             <src path="${tests.junit.dir}/org.eclipse.ercp.swt.mobile.tests.qt/src/"/>
       
   378             <src path="${tests.junit.dir}/org.eclipse.ercp.swt.expanded.tests.qt/src/"/>
       
   379             <exclude name="**/Test_com_ibm_ugl_UGLCompatibility.java"/>
       
   380             <classpath>
       
   381                 <pathelement location="${tests.mt.dir}/junit-3.8.1.1.jar"/>
       
   382                 <pathelement path="${plugin.dir}/bin/"/>
       
   383             </classpath>
       
   384         </javac>
       
   385         
       
   386         <copy includeemptydirs="false" todir="${tests.mt.dir}/bin">
       
   387             <fileset dir="${tests.mt.dir}/res/"/>
       
   388         </copy>
       
   389         
       
   390         <mkdir dir="${tests.mt.dir}/bin/res"/>
       
   391         
       
   392         <copy includeemptydirs="false" todir="${tests.mt.dir}/bin/res">
       
   393         	<fileset dir="${tests.cgfx.dir}/resources/res/"/>
       
   394         </copy>
       
   395     	
       
   396         <javac destdir="${tests.mt.dir}/bin" source="${javac.source}" target="${javac.target}" 
       
   397                 debug="${javac.debug}" debuglevel="lines,vars,source" verbose="true" failonerror="true">
       
   398                 <src path="${tests.mt.dir}/src/"/>
       
   399                 <src path="${tests.mt.dir}/src_j2se/"/>
       
   400         		<src path="${tests.cgfx.dir}/src"/>
       
   401             <classpath>
       
   402                 <pathelement location="${tests.mt.dir}/junit-3.8.1.1.jar"/>
       
   403                 <pathelement path="${plugin.dir}/bin/"/>
       
   404                 <pathelement path="${tests.junit.dir}/bin/"/>
       
   405                 <pathelement path="${tests.utils.dir}/java/bin/"/>
       
   406             </classpath>
       
   407         </javac>
       
   408         
       
   409         <jar jarfile="${build.result.dir}/eswt-qt-tests.jar" excludes="**/*.java">
       
   410                 <fileset dir="${tests.utils.dir}/java/bin"/>
       
   411                 <fileset dir="${tests.junit.dir}/bin"/>
       
   412                 
       
   413                 <!-- JUnit test resources are in the source folders -->
       
   414                 <fileset dir="${tests.junit.dir}/org.eclipse.ercp.swt.core.tests/src"/> 
       
   415                 <fileset dir="${tests.junit.dir}/org.eclipse.ercp.swt.core.tests.qt/src"/> 
       
   416                 <fileset dir="${tests.junit.dir}/org.eclipse.ercp.swt.expanded.tests/src"/> 
       
   417                 <fileset dir="${tests.junit.dir}/org.eclipse.ercp.swt.mobile.tests.qt/src"/> 
       
   418                 <fileset dir="${tests.junit.dir}/org.eclipse.ercp.swt.mobile.tests.tck/src"/> 
       
   419                 
       
   420                 <fileset dir="${tests.mt.dir}/bin"/>
       
   421         </jar>
       
   422     </target>
       
   423         
       
   424     <target name="clean.tests" depends="init">
       
   425         <delete dir="${tests.utils.dir}/java/bin"/>
       
   426         <delete dir="${tests.utils.dir}/native/release"/>
       
   427         <delete dir="${tests.utils.dir}/native/debug"/>
       
   428         <delete dir="${tests.junit.dir}/bin"/>
       
   429         <delete dir="${tests.mt.dir}/bin"/>
       
   430         <delete file="${build.result.dir}/eswt-qt-tests.jar" verbose="true"/>
       
   431         <delete file="${build.result.dir}/release/libxlibevents.so" verbose="true"/>
       
   432         <delete file="${build.result.dir}/debug/libxlibevents.so" verbose="true"/>
       
   433     </target>
       
   434     
       
   435     <target name="run.tests" depends="init,build.tests">
       
   436         <java classname="com.nokia.eswt.mt.AllTests" fork="true">
       
   437             <classpath>
       
   438                 <pathelement location="${tests.mt.dir}/junit-3.8.1.1.jar"/>
       
   439                 <pathelement location="${build.result.dir}/eswt-qt-tests.jar"/>
       
   440                 <pathelement path="${plugin.dir}/bin/"/>
       
   441             </classpath>
       
   442             <sysproperty key="java.library.path" value="${build.result.dir}/release"/>
       
   443         </java>
       
   444     </target>
       
   445         
       
   446         <target name="run.tests.rtl" depends="init, build.tests">
       
   447                 <java classname="com.nokia.eswt.mt.AllTests" fork="true">
       
   448                 <classpath>
       
   449                         <pathelement location="${tests.mt.dir}/junit-3.8.1.1.jar"/>
       
   450                         <pathelement path="${tests.utils.dir}/java/bin/"/>
       
   451                         <pathelement path="${tests.junit.dir}/bin/"/>
       
   452                         <pathelement path="${tests.mt.dir}/bin/"/>
       
   453                     <pathelement path="${plugin.dir}/bin/"/>
       
   454                 </classpath>
       
   455                 <sysproperty key="java.library.path" value="${build.result.dir}/release"/>
       
   456                 <sysproperty key="org.eclipse.ercp.swt.defaultOrientation" value="rtl"/>
       
   457                 </java>
       
   458         </target>
       
   459         
       
   460         <target name="build.tests.cgfx" depends="init">
       
   461                         <mkdir dir="${tests.cgfx.dir}/bin"/>
       
   462                         <mkdir dir="${tests.cgfx.dir}/bin/res"/>
       
   463                         
       
   464                         <copy includeemptydirs="false" todir="${tests.cgfx.dir}/bin/res">
       
   465                         <fileset dir="${tests.cgfx.dir}/resources/res/"/>
       
   466                         </copy>
       
   467                         
       
   468                     <javac destdir="${tests.cgfx.dir}/bin" source="${javac.source}" target="${javac.target}" 
       
   469                         debug="${javac.debug}" debuglevel="lines,vars,source" verbose="true" failonerror="true">
       
   470                         <src path="${tests.cgfx.dir}/src/"/>
       
   471                         <classpath>
       
   472                             <pathelement location="${tests.mt.dir}/junit-3.8.1.1.jar"/>
       
   473                             <pathelement path="${plugin.dir}/bin/"/>
       
   474                             <pathelement path="${tests.utils.dir}/java/bin/"/>
       
   475                         </classpath>
       
   476                     </javac>
       
   477                         
       
   478                     <jar jarfile="${build.result.dir}/cgfxTestRunner.jar">
       
   479                         <fileset dir="${tests.utils.dir}/java/bin"/>
       
   480                         <fileset dir="${tests.cgfx.dir}/bin"/>
       
   481                     </jar>
       
   482                         
       
   483         </target>
       
   484         
       
   485         <target name="run.tests.cgfx" depends="init,build.tests.cgfx">
       
   486                 <java classname="com.nokia.cgfx.mt.AllTests" fork="true">
       
   487                         <classpath>
       
   488                                 <pathelement location="${tests.mt.dir}/junit-3.8.1.1.jar"/>
       
   489                             <pathelement path="${tests.utils.dir}/java/bin/"/>
       
   490                             <pathelement path="${tests.cgfx.dir}/bin/"/>
       
   491                             <pathelement path="${plugin.dir}/bin/"/>
       
   492                         </classpath>
       
   493                         <sysproperty key="java.library.path" value="${build.result.dir}/release"/>
       
   494                 <!--    <sysproperty key="org.eclipse.ercp.swt.defaultOrientation" value="rtl"/> -->
       
   495                 </java>
       
   496         </target>
       
   497 
       
   498 </project>
       
   499