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 42 43 44 45 46 47 48 49 50 51 52 53 54
|
<?xml version="1.0" encoding="UTF-8"?>
<project name="foxyproxy" default="build-xpi">
<!-- version property is appended to XPI filename; e.g., foxyproxy-1.0.xpi -->
<property name="version" value="2.7.5" />
<property name="temp-path" value="../temp" />
<property name="src-base" value="."/>
<property name="target-path" value="../targets"/>
<!-- guid of your extension -->
<property name="guid" value="{foxyproxy@eric.h.jung}" />
<target name="copy">
<copy todir="${temp-path}" overwrite="true">
<!-- ignore timestamps -->
<fileset dir="${src-base}" excludes="**/amo.properties,**/*.xpi/**,**/*.jar/**,**/build.xml/**,**/chrome.manifest/**,**/*.project/**,**/tbird*.*/**" />
</copy>
</target>
<!-- create the jar -->
<target name="jar">
<zip destfile="${temp-path}/chrome/foxyproxy.jar">
<zipfileset dir="${temp-path}/content" prefix="content" includes="**/**" />
<zipfileset dir="${temp-path}/skin" prefix="skin" includes="**/**" />
<zipfileset dir="${temp-path}/locale" prefix="locale" includes="**/**" />
</zip>
</target>
<!-- create foxyproxy-x.y.z.xpi in the current dir using install.rdf in the current dir -->
<target name="build">
<copy file="chrome.manifest.packaging" tofile="${temp-path}/chrome.manifest" />
<zip destfile="${target-path}/foxyproxy-${version}.xpi">
<fileset dir="${temp-path}" includes="chrome.manifest install.rdf install.js LICENSE chrome/" />
<zipfileset dir="${temp-path}/components" prefix="components" includes="**/**" />
<zipfileset dir="${temp-path}/defaults" prefix="defaults" includes="**/**" />
</zip>
</target>
<target name="clean">
<delete dir="${temp-path}" failonerror="false" />
</target>
<target name="init">
<mkdir dir="${temp-path}" />
<mkdir dir="${target-path}" />
<delete>
<fileset dir="${target-path}" includes="**/*.*/**"/>
</delete>
</target>
<target name="build-xpi" depends="init,copy,jar,build,clean" />
</project>
|