-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
72 lines (62 loc) · 2.35 KB
/
build.xml
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" ?>
<project name="goo.gl_lite" default="dist">
<property name="src.dir" value="." />
<property name="dist.dir" value="dist" />
<property name="app.name" value="goo.gl_lite" />
<property name="app.id" value="${app.name}" /> <!-- extension id like: [email protected] -->
<property name="ff.dir" value="" />
<defaultexcludes add="**/*.orig" />
<defaultexcludes add="**/*.rej" />
<condition property="ff.present">
<and>
<isset property="ff.dir" />
<available file="${ff.dir}" type="dir" />
</and>
</condition>
<target name="chrome">
<mkdir dir="${dist.dir}" />
<zip destfile="${dist.dir}/${app.name}.jar">
<fileset dir="${src.dir}">
<include name="content/**" />
<include name="locale/**" />
<include name="skin/**" />
<exclude name="**/.*" />
<exclude name="**/CVS/**" />
</fileset>
</zip>
</target>
<target name="test.chrome" depends="chrome" if="ff.present">
<!-- copy to chrome directory -->
<copy file="${dist.dir}/${app.name}.jar" todir="${ff.dir}/chrome/chrome" overwrite="true" />
<copy file="${src.dir}/chrome.manifest" tofile="${ff.dir}/chrome/${app.name}.manifest" overwrite="true" />
</target>
<!-- copy to extensions directory -->
<!--
<target name="test.ext" depends="chrome" if="ff.present">
<copy file="${dist.dir}/${app.name}.jar" todir="${ff.dir}/extensions/${app.id}/chrome" overwrite="true" />
<copy file="${src.dir}/chrome.manifest" todir="${ff.dir}/extensions/${app.id}" overwrite="true" />
</target>
-->
<target name="dist" depends="chrome">
<zip destfile="${dist.dir}/${app.name}.xpi">
<zipfileset file="${dist.dir}/${app.name}.jar" prefix="chrome"/>
<fileset dir="${src.dir}">
<include name="chrome.manifest" />
<include name="install.rdf" />
<include name="GPL2" />
<include name="CONTRIBUTORS" />
<include name="resources/**" />
<include name="defaults/**" />
<exclude name="**/.*" />
</fileset>
</zip>
</target>
<target name="clean">
<delete dir="${dist.dir}" />
</target>
<target name="clean.ff" if="ff.present">
<delete dir="${ff.dir}/extensions/${app.id}" failonerror="false" />
<delete file="${ff.dir}/chrome/${app.name}.manifest" failonerror="false" />
<delete file="${ff.dir}/chrome/chrome/${app.name}.jar" failonerror="false" />
</target>
</project>