imakerplugin/com.nokia.carbide.extensions.imaker/build.xml
changeset 0 61163b28edca
equal deleted inserted replaced
-1:000000000000 0:61163b28edca
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="com.nokia.carbide.extensions.imaker" default="build.update.jar" basedir=".">
       
     3 	<property file="../common.properties" />
       
     4 	<property file="build.properties" />
       
     5 	
       
     6 	<target name="init">
       
     7 		<property name="feature.temp.folder" value="${basedir}/feature.temp.folder"/>
       
     8 		<property name="feature.destination" value="../${plugin.dist.dir}"/>
       
     9 		<mkdir dir="${feature.destination}"/>
       
    10 	</target>
       
    11 
       
    12 	<target name="all.plugins" depends="init">
       
    13 		<ant antfile="build.xml" dir="../com.nokia.s60tools.imaker.doc.user" target="${target}">
       
    14 			<property name="arch" value="x86"/>
       
    15 			<property name="ws" value="win32"/>
       
    16 			<property name="os" value="win32"/>
       
    17 		</ant>
       
    18 		<ant antfile="build.xml" dir="../com.nokia.s60tools.imaker" target="${target}">
       
    19 			<property name="arch" value="x86"/>
       
    20 			<property name="ws" value="win32"/>
       
    21 			<property name="os" value="win32"/>
       
    22 		</ant>
       
    23 	</target>
       
    24 	<target name="all.features" depends="init">
       
    25 	</target>
       
    26 	<target name="update.feature" depends="init">
       
    27 	</target>
       
    28 
       
    29 	<target name="all.children" depends="init,all.features,all.plugins,update.feature">
       
    30 	</target>
       
    31 
       
    32 	<target name="children" if="include.children">
       
    33 		<antcall target="all.children"/>
       
    34 	</target>
       
    35 
       
    36 	<target name="build.jars" depends="init" description="Build all the jars for the feature: com.nokia.carbide.extensions.imaker.">
       
    37 		<antcall target="all.children">
       
    38 			<param name="target" value="build.jars"/>
       
    39 		</antcall>
       
    40 	</target>
       
    41 
       
    42 	<target name="build.sources" depends="init">
       
    43 		<antcall target="all.children">
       
    44 			<param name="target" value="build.sources"/>
       
    45 		</antcall>
       
    46 	</target>
       
    47 
       
    48 	<target name="build.zips" depends="init">
       
    49 		<antcall target="all.children">
       
    50 			<param name="target" value="build.zips"/>
       
    51 		</antcall>
       
    52 	</target>
       
    53 
       
    54 	<target name="build.update.jar" depends="init" description="Build the feature jar of: com.nokia.carbide.extensions.imaker for an update site.">
       
    55 		<antcall target="all.children">
       
    56 			<param name="target" value="build.update.jar"/>
       
    57 		</antcall>
       
    58 		<property name="feature.base" value="${feature.temp.folder}"/>
       
    59 		<delete dir="${feature.temp.folder}"/>
       
    60 		<mkdir dir="${feature.temp.folder}"/>
       
    61 		<mkdir dir="${feature.temp.folder}/features/com.nokia.carbide.extensions.imaker_${plugin.version}"/>
       
    62 		<antcall target="gather.bin.parts" inheritAll="false">
       
    63 			<param name="os" value="*"/>
       
    64 			<param name="feature.base" value="${feature.temp.folder}"/>
       
    65 			<param name="updateJar.omitRootfiles" value="true"/>
       
    66 			<param name="ws" value="*"/>
       
    67 			<param name="arch" value="*"/>
       
    68 			<param name="nl" value="*"/>
       
    69 		</antcall>
       
    70 		<mkdir dir="${feature.destination}"/>
       
    71 		<jar destfile="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.jar" basedir="${feature.temp.folder}/features/com.nokia.carbide.extensions.imaker_${plugin.version}"/>
       
    72 		<!-- <delete dir="${feature.temp.folder}"/> -->
       
    73 	</target>
       
    74 
       
    75 	<target name="gather.bin.parts" depends="init" if="feature.base">
       
    76 		<mkdir dir="${feature.base}/features/com.nokia.carbide.extensions.imaker_${plugin.version}"/>
       
    77 		<antcall target="all.plugins">
       
    78 			<param name="target" value="collect.jar"/>
       
    79 			<param name="destination.temp.folder" value="${feature.base}/plugins"/>
       
    80 		</antcall>
       
    81 		<copy todir="${feature.base}/features/com.nokia.carbide.extensions.imaker_${plugin.version}" failonerror="true" overwrite="false">
       
    82 			<fileset dir="${basedir}">
       
    83 				<include name="feature.xml"/>
       
    84 				<include name="license.txt"/>
       
    85 			</fileset>
       
    86 		</copy>
       
    87 		<antcall target="rootFiles">
       
    88 			<param name="rootTarget" value="rootFiles${os}_${ws}_${arch}"/>
       
    89 		</antcall>
       
    90 	</target>
       
    91 	<target name="rootFiles" unless="updateJar.omitRootfiles">
       
    92 		<!-- <antcall target="${rootTarget}"/> -->
       
    93 	</target>
       
    94 
       
    95 	<target name="rootFileswin32_win32_x86">
       
    96 	</target>
       
    97 	<target name="rootFilesgroup_group_group">
       
    98 		<antcall target="rootFileswin32_win32_x86"/>
       
    99 	</target>
       
   100 
       
   101 	<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: com.nokia.carbide.extensions.imaker.">
       
   102 		<delete dir="${feature.temp.folder}"/>
       
   103 		<mkdir dir="${feature.temp.folder}"/>
       
   104 		<antcall target="gather.bin.parts">
       
   105 			<param name="feature.base" value="${feature.temp.folder}"/>
       
   106 			<param name="os" value="*"/>
       
   107 			<param name="arch" value="*"/>
       
   108 			<param name="ws" value="*"/>
       
   109 			<param name="nl" value="*"/>
       
   110 			<param name="include.children" value="true"/>
       
   111 		</antcall>
       
   112 		<zip destfile="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.zip" basedir="${feature.temp.folder}" filesonly="false" whenempty="skip" update="false"/>
       
   113 		<delete dir="${feature.temp.folder}"/>
       
   114 	</target>
       
   115 
       
   116 	<target name="zip.sources" depends="init">
       
   117 		<delete dir="${feature.temp.folder}"/>
       
   118 		<mkdir dir="${feature.temp.folder}"/>
       
   119 		<antcall target="all.children">
       
   120 			<param name="target" value="gather.sources"/>
       
   121 			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/null/src"/>
       
   122 			<param name="include.children" value="true"/>
       
   123 		</antcall>
       
   124 		<zip destfile="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.src.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
       
   125 		<delete dir="${feature.temp.folder}"/>
       
   126 	</target>
       
   127 
       
   128 	<target name="zip.logs" depends="init">
       
   129 		<delete dir="${feature.temp.folder}"/>
       
   130 		<mkdir dir="${feature.temp.folder}"/>
       
   131 		<antcall target="all.children" inheritAll="false">
       
   132 			<param name="target" value="gather.logs"/>
       
   133 			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
       
   134 			<param name="include.children" value="true"/>
       
   135 		</antcall>
       
   136 		<zip destfile="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.log.zip" basedir="${feature.temp.folder}" filesonly="true" whenempty="skip" update="false"/>
       
   137 		<delete dir="${feature.temp.folder}"/>
       
   138 	</target>
       
   139 
       
   140 	<target name="clean" depends="init" description="Clean the feature: com.nokia.carbide.extensions.imaker of all the zips, jars and logs created.">
       
   141 		<delete file="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.jar"/>
       
   142 		<delete file="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.bin.dist.zip"/>
       
   143 		<delete file="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.log.zip"/>
       
   144 		<delete file="${feature.destination}/com.nokia.carbide.extensions.imaker_${plugin.version}.src.zip"/>
       
   145 		<delete dir="${feature.temp.folder}"/>
       
   146 		<antcall target="all.children">
       
   147 			<param name="target" value="clean"/>
       
   148 		</antcall>
       
   149 	</target>
       
   150 
       
   151 	<target name="refresh" depends="init" if="eclipse.running" description="Refresh this folder.">
       
   152 		<eclipse.convertPath fileSystemPath="E:/workspaces/imaker/imaker_plugin/com.nokia.carbide.extensions.imaker/" property="resourcePath"/>
       
   153 		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
       
   154 		<antcall target="all.children">
       
   155 			<param name="target" value="refresh"/>
       
   156 		</antcall>
       
   157 	</target>
       
   158 	<target name="gather.sources">
       
   159 		<antcall target="children">
       
   160 			<param name="target" value="gather.sources"/>
       
   161 			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/null/src"/>
       
   162 		</antcall>
       
   163 	</target>
       
   164 
       
   165 	<target name="gather.logs" depends="init">
       
   166 		<mkdir dir="${feature.temp.folder}"/>
       
   167 		<antcall target="all.children" inheritAll="false">
       
   168 			<param name="target" value="gather.logs"/>
       
   169 			<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
       
   170 		</antcall>
       
   171 	</target>
       
   172 </project>