sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/buildAT.xml
changeset 1 1050670c6980
child 6 f65f740e69f9
equal deleted inserted replaced
0:5ad7ad99af01 1:1050670c6980
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="com.nokia.s60tools.analyzetool" default="build.jars" basedir=".">
       
     3 
       
     4 	<property name="pluginVersion" value="1.8.0"/>
       
     5 	<property name="basews" value="${ws}"/>
       
     6 	<property name="baseos" value="${os}"/>
       
     7 	<property name="basearch" value="${arch}"/>
       
     8 	<property name="basenl" value="${nl}"/>
       
     9 	<property name="bundleId" value="com.nokia.s60tools.analyzetool"/>
       
    10 	<property name="bundleVersion" value="${pluginVersion}"/>
       
    11 
       
    12 	<!-- Compiler settings. -->
       
    13 	<property name="javacFailOnError" value="false"/>
       
    14 	<property name="javacDebugInfo" value="on"/>
       
    15 	<property name="javacVerbose" value="false"/>
       
    16 	<property name="logExtension" value=".log"/>
       
    17 	<property name="compilerArg" value=""/>
       
    18 	<property name="javacSource" value="1.5"/>
       
    19 	<property name="javacTarget" value="1.5"/>
       
    20 	<property name="carbide.plugins" location="e:/carbide_libs"/>
       
    21 	<condition property="dir_bootclasspath" value="${java.home}/../Classes">
       
    22 		<os family="mac"/>
       
    23 	</condition>
       
    24 	<property name="dir_bootclasspath" value="${java.home}/lib"/>
       
    25 	<path id="path_bootclasspath">
       
    26 		<fileset dir="${dir_bootclasspath}">
       
    27 			<include name="*.jar"/>
       
    28 		</fileset>
       
    29 	</path>
       
    30 
       
    31 	<path id="build_classpath">
       
    32 		<path refid="carbide_classpath"/>
       
    33 	</path>
       
    34 
       
    35 	<path id="carbide_classpath">
       
    36 		<fileset dir="${carbide.plugins}" includes="**/*.jar" />
       
    37 	</path>
       
    38 	<property name="bootclasspath" refid="path_bootclasspath"/>
       
    39 	<property name="bundleJavacSource" value="${javacSource}"/>
       
    40 	<property name="bundleJavacTarget" value="${javacTarget}"/>
       
    41 	<property name="bundleBootClasspath" value="${bootclasspath}"/>
       
    42 
       
    43 	<target name="init" depends="properties">
       
    44 		<condition property="pluginTemp" value="${buildTempFolder}/plugins">
       
    45 			<isset property="buildTempFolder"/>
       
    46 		</condition>
       
    47 		<property name="pluginTemp" value="${basedir}"/>
       
    48 		<condition property="build.result.folder" value="${pluginTemp}/com.nokia.s60tools.analyzetool_${pluginVersion}">
       
    49 			<isset property="buildTempFolder"/>
       
    50 		</condition>
       
    51 		<property name="build.result.folder" value="${basedir}"/>
       
    52 		<property name="temp.folder" value="${basedir}/temp.folder"/>
       
    53 		<property name="plugin.destination" value="${basedir}"/>
       
    54 	</target>
       
    55 
       
    56 	<target name="properties" if="eclipse.running">
       
    57 		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
       
    58 
       
    59 	</target>
       
    60 
       
    61 	<target name="build.update.jar" depends="init" description="Build the plug-in: com.nokia.s60tools.analyzetool for an update site.">
       
    62 		<delete dir="${temp.folder}"/>
       
    63 		<mkdir dir="${temp.folder}"/>
       
    64 		<antcall target="build.jars"/>
       
    65 		<antcall target="gather.bin.parts">
       
    66 			<param name="destination.temp.folder" value="${temp.folder}/"/>
       
    67 		</antcall>
       
    68 		<jar destfile="${plugin.destination}/com.nokia.s60tools.analyzetool_${pluginVersion}.jar" basedir="${temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}" filesetmanifest="merge"/>
       
    69 		<delete dir="${temp.folder}"/>
       
    70 	</target>
       
    71 
       
    72 	<target name="@dot" depends="init" unless="@dot" description="Create jar: com.nokia.s60tools.analyzetool @dot.">
       
    73 		<delete dir="${temp.folder}/@dot.bin"/>
       
    74 		<mkdir dir="${temp.folder}/@dot.bin"/>
       
    75 		<!-- compile the source code -->
       
    76 		<javac destdir="${temp.folder}/@dot.bin" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}" target="${bundleJavacTarget}"		>
       
    77 			<compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
       
    78 			<classpath refid="build_classpath" />
       
    79 			<src path="src/"			/>
       
    80 			<compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
       
    81 			<compilerarg line="-log '${temp.folder}/@dot.bin${logExtension}'" compiler="org.eclipse.jdt.core.JDTCompilerAdapter"/>
       
    82 		</javac>
       
    83 		<!-- Copy necessary resources -->
       
    84 		<copy todir="${temp.folder}/@dot.bin" failonerror="true" overwrite="false">
       
    85 			<fileset dir="src/">
       
    86 				<exclude name="**/*.java"/>
       
    87 				<exclude name="**/package.htm*"/>
       
    88 			</fileset>
       
    89 		</copy>
       
    90 		<mkdir dir="${build.result.folder}"/>
       
    91 		<copy todir="${build.result.folder}/@dot" failonerror="true" overwrite="false">
       
    92 			<fileset dir="${temp.folder}/@dot.bin">
       
    93 			</fileset>
       
    94 		</copy>
       
    95 		<delete dir="${temp.folder}/@dot.bin"/>
       
    96 	</target>
       
    97 
       
    98 	<target name="src.zip" depends="init" unless="src.zip">
       
    99 		<mkdir dir="${build.result.folder}"/>
       
   100 		<zip destfile="${build.result.folder}/src.zip" filesonly="false" whenempty="skip" update="false">
       
   101 			<fileset dir="src/">
       
   102 				<include name="**/*.java"/>
       
   103 			</fileset>
       
   104 		</zip>
       
   105 	</target>
       
   106 
       
   107 	<target name="build.jars" depends="init" description="Compile classes and build nested jars for the plug-in: com.nokia.s60tools.analyzetool.">
       
   108 		<available property="@dot" file="${build.result.folder}/@dot"/>
       
   109 		<antcall target="@dot"/>
       
   110 	</target>
       
   111 
       
   112 	<target name="build.sources" depends="init">
       
   113 		<available property="src.zip" file="${build.result.folder}/src.zip"/>
       
   114 		<antcall target="src.zip"/>
       
   115 	</target>
       
   116 
       
   117 	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
       
   118 		<mkdir dir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}"/>
       
   119 		<copy todir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}" failonerror="true" overwrite="false">
       
   120 			<fileset dir="${build.result.folder}/@dot">
       
   121 				<include name="**"/>
       
   122 			</fileset>
       
   123 		</copy>
       
   124 		<copy todir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}" failonerror="true" overwrite="false">
       
   125 			<fileset dir="${basedir}">
       
   126 				<include name="plugin.xml"/>
       
   127 				<include name="META-INF/"/>
       
   128 				<include name="icons/"/>
       
   129 				<include name="about.html"/>
       
   130 				<include name="about.ini"/>
       
   131 				<include name="about.properties"/>
       
   132 				<include name="plugin.properties"/>
       
   133 				<include name="license.txt"/>
       
   134 				<include name="about.mappings"/>
       
   135 				<include name="tools/" />
       
   136 			</fileset>
       
   137 		</copy>
       
   138 	</target>
       
   139 
       
   140 	<target name="build.zips" depends="init">
       
   141 	</target>
       
   142 
       
   143 	<target name="gather.sources" depends="init" if="destination.temp.folder">
       
   144 		<mkdir dir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}"/>
       
   145 		<copy file="${build.result.folder}/src.zip" todir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}" failonerror="false" overwrite="false"/>
       
   146 	</target>
       
   147 
       
   148 	<target name="gather.logs" depends="init" if="destination.temp.folder">
       
   149 		<mkdir dir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}"/>
       
   150 		<copy todir="${destination.temp.folder}/com.nokia.s60tools.analyzetool_${pluginVersion}" failonerror="false" overwrite="false">
       
   151 			<fileset dir="${temp.folder}">
       
   152 				<include name="@dot.bin${logExtension}"/>
       
   153 			</fileset>
       
   154 		</copy>
       
   155 	</target>
       
   156 
       
   157 	<target name="clean" depends="init" description="Clean the plug-in: com.nokia.s60tools.analyzetool of all the zips, jars and logs created.">
       
   158 		<delete dir="${build.result.folder}/@dot"/>
       
   159 		<delete file="${build.result.folder}/src.zip"/>
       
   160 		<delete file="${plugin.destination}/com.nokia.s60tools.analyzetool_${pluginVersion}.jar"/>
       
   161 		<delete file="${plugin.destination}/com.nokia.s60tools.analyzetool_${pluginVersion}.zip"/>
       
   162 		<delete dir="${temp.folder}"/>
       
   163 	</target>
       
   164 
       
   165 	<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
       
   166 		<eclipse.convertPath fileSystemPath="C:/PlatformRnDTools/Carbide_Extensions/AnalyzeTool/trunk/com.nokia.s60tools.analyzetool" property="resourcePath"/>
       
   167 		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
       
   168 	</target>
       
   169 
       
   170 	<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: com.nokia.s60tools.analyzetool.">
       
   171 		<delete dir="${temp.folder}"/>
       
   172 		<mkdir dir="${temp.folder}"/>
       
   173 		<antcall target="build.jars"/>
       
   174 		<antcall target="build.sources"/>
       
   175 		<antcall target="gather.bin.parts">
       
   176 			<param name="destination.temp.folder" value="${temp.folder}/"/>
       
   177 		</antcall>
       
   178 		<antcall target="gather.sources">
       
   179 			<param name="destination.temp.folder" value="${temp.folder}/"/>
       
   180 		</antcall>
       
   181 		<delete>
       
   182 			<fileset dir="${temp.folder}">
       
   183 				<include name="**/*.bin${logExtension}"/>
       
   184 			</fileset>
       
   185 		</delete>
       
   186 		<zip destfile="${plugin.destination}/com.nokia.s60tools.analyzetool_${pluginVersion}.zip" basedir="${temp.folder}" filesonly="true" whenempty="skip" update="false"/>
       
   187 		<delete dir="${temp.folder}"/>
       
   188 	</target>
       
   189 
       
   190 </project>