My favorites | Sign in
Logo
             
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<?xml version="1.0" ?>

<!-- This Ant build file was contributed by Paul McLanahan. pmclanahan@gmail.com.
Added template and version numbers johnjbarton@johnjbarton.com
Added unexplore targets to strip trace for distribution version.
-->

<project name="firebug" default="createBranchXPI">


<!-- Setting properties -->
<target name="local-check">
<available file="${basedir}/local.properties"
property="local.properties.available"/>
</target>

<target name="properties-local"
if="local.properties.available"
depends="local-check">
<echo message="Loading local properties file"/>
<property file="local.properties"/>
</target>

<target name="no-properties-local"
unless="local.properties.available"
depends="local-check">
<echo message="No local properties file, setting defaults"/>
<property name="install.dir" value="OperatingSystemPathTo:Profiles/fireclipse/"/>
<property name="update.path" value="http://getfirebug.com/releases"/>
</target>

<target name="version" depends="properties-local, no-properties-local" description="Compute version number">
<tstamp/>
<property name="build_dir" location="./build" />
<property name="FULLVERSION" value="${VERSION}${RELEASE}${TRUNK}"/>
<mkdir dir="${build_dir}/dist" />
<property name="dist_dir" location="${build_dir}/dist" />
<property name="FIREBUG-XPI" value="firebug-${VERSION}J${RELEASE}.xpi"/>
</target>

<!-- eg
RELEASE=.88
VERSION=eval
TRUNK=.1.05
-->
<property file="content/firebug/branch.properties" />

<!-- Project directories -->
<property name="src_dir" location="." />
<property name="build_dir" location="./build" />
<property name="dist_dir" location="./dist" />
<property name="unexplore.dir" location="../eval" />
<!-- relative to branches/firebug1.1 should be branches/eval -->

<property name="excludes" value="**/.*, **/*.jar, **/*.db" />
<property name="components_dir" location="${src_dir}/components" />
<available file="${src_dir}/aptanadebugger" property="aptanadebugger"/>

<!-- Targets -->
<target name="clean" depends="clean-reg">
<delete dir="${build_dir}" />
<delete dir="${dist_dir}" />
</target>

<!-- Expand templates -->
<target name="install-dependency" description="test tpl files">
<uptodate property="install.expansion.notRequired" targetfile="${src_dir}/install.rdf">
<srcfiles dir="${src_dir}" includes="install.rdf.tpl.xml, content/firebug/branch.properties"/>
</uptodate>
</target>

<target name="update-dependency" description="test update files">
<condition property="update.expansion.notRequired">
<or>
<not>
<available file="update.rdf.tpl.xml"/>
</not>
<uptodate targetfile="update.rdf">
<srcfiles dir="${src_dir}" includes="update.rdf.tpl.xml, branch.properties"/>
</uptodate>
</or>
</condition>
</target>

<target name="expand-templates" depends="expand-install-template, expand-update-template, verify-update-template-expansion" description="Fill in version info">
</target>
<target name="expand-install-template" depends="install-dependency, version" unless="install.expansion.notRequired" >
<copy file="${src_dir}/install.rdf.tpl.xml"
tofile="${src_dir}/install.rdf"
overwrite="true">
<filterchain>
<replacetokens>
<token key="FULLVERSION" value="${FULLVERSION}"/>
<token key="VERSION" value="${VERSION}J"/>
<token key="RELEASE" value="${RELEASE}"/>
<token key="UPDATEPATH" value="${update.path}/firebug/${VERSION}"/>
</replacetokens>
</filterchain>
</copy>
</target>

<target name="expand-update-template" depends="update-dependency, version" unless="update.expansion.notRequired" >
<copy file="${src_dir}/update.rdf.tpl.xml"
tofile="${build_dir}/update.rdf"
overwrite="true">
<filterchain>
<replacetokens>
<token key="FULLVERSION" value="${FULLVERSION}"/>
<token key="VERSION" value="${VERSION}J"/>
<token key="RELEASE" value="${RELEASE}"/>
<token key="LEAF" value="firebug-${VERSION}${RELEASE}.xpi"/>
<token key="UPDATEPATH" value="${update.path}/firebug/${VERSION}"/>
<token key="EXPERIMENTORURL" value="http://www.almaden.ibm.com/u/bartonjj"/>
</replacetokens>
</filterchain>
</copy>
<echo message="expanded ${src_dir}/update.rdf.tpl.xml"/>
</target>
<target name="verify-update-template-expansion" depends="update-dependency" if="update.expansion.notRequired">
<echo message="update.expansion.notRequired true"/>
</target>

<target name="release-documentation" depends="clean, version, expand-templates">
<copy file="${src_dir}/docs/index.tpl.html"
tofile="${src_dir}/docs/index.html"
overwrite="true">
<filterchain>
<replacetokens>
<token key="FIREBUG-VERSION" value="${RELEASE}"/>
<token key="CHROMEBUG-VERSION" value="${CHROMEBUG.FULLVERSION}"/>
<token key="UPDATEPATH" value="${update.path}"/>
</replacetokens>
</filterchain>
</copy>
</target>

<!-- Incremental Build Targets -->
<target name="dev-setup" depends="create-extension-links, expand-templates">

</target>

<target name="create-extension-links" depends="version">
<!-- These links are one line files with paths pointing into our source -->
<echo message="Writing links from ${install.dir}/extensions to ${basedir}"/>

<mkdir dir="${install.dir}/extensions" />

<path id="firebug-dev">
<pathelement location="${basedir}"/>
</path>
<pathconvert refid="firebug-dev" property="firebug-dev"/>

<echo message="${firebug-dev}" file="${install.dir}/extensions/firebug@software.joehewitt.com" />

</target>

<target name="firebug-service" depends="version" description="Check compreg.dat when service changes">
<uptodate property="deleteCompreg.notRequired" srcfile="./components/firebug-service.js" targetfile="${install.dir}/compreg.dat" />
</target>

<target name="clean-reg" depends="firebug-service" unless="deleteCompreg.notRequired"
description="Delete compreg.dat to reload service" >
<delete file="${install.dir}/compreg.dat"/>
</target>

<!-- Distribution XPI Targets -->
<target name="createChromeJAR">
<mkdir dir="${build_dir}" />
<zip destfile="${build_dir}/${ant.project.name}.jar" update="true" basedir="${src_dir}"
includes="content/**, locale/**, skin/**" excludes="${excludes}"/>
</target>

<target name="createPlatformJARs">
<mkdir dir="${build_dir}/Darwin" />
<mkdir dir="${build_dir}/Linux" />
<mkdir dir="${build_dir}/linux-gnu" />
<mkdir dir="${build_dir}/WINNT" />
<zip destfile="${build_dir}/Darwin/${ant.project.name}.jar" update="true"
basedir="${src_dir}/platform/Darwin" includes="skin/**" excludes="${excludes}" />
<zip destfile="${build_dir}/Linux/${ant.project.name}.jar" update="true"
basedir="${src_dir}/platform/Linux"
includes="skin/**"
excludes="${excludes}"
/>
<zip destfile="${build_dir}/linux-gnu/${ant.project.name}.jar" update="true"
basedir="${src_dir}/platform/linux-gnu"
includes="skin/**"
excludes="${excludes}"
/>
<zip destfile="${build_dir}/WINNT/${ant.project.name}.jar" update="true"
basedir="${src_dir}/platform/WINNT"
includes="skin/**"
excludes="${excludes}"
/>
</target>

<target name="zipIntoXPI" depends="clean, createChromeJAR, createAptanaJAR">
<mkdir dir="${dist_dir}" />
<antcall target="integrateAptana"/>
<zip destfile="${dist_dir}/${ant.project.name}.xpi" update="true">
<zipfileset dir="${build_dir}" includes="*.jar" prefix="chrome" />
<zipfileset dir="${src_dir}" includes="icons/**" prefix="chrome" excludes="${excludes}" />
<zipfileset dir="${src_dir}/platform" includes="**" prefix="platform" excludes="${excludes}, **/skin/**" />
<zipfileset dir="${src_dir}/components" includes="*.js" prefix="components" />
<zipfileset dir="${src_dir}/defaults" includes="**" prefix="defaults" excludes="${excludes}" />
<zipfileset dir="${src_dir}" includes="install.rdf" />
<zipfileset dir="${src_dir}" includes="jarred.manifest" fullpath="chrome.manifest"/>
</zip>
</target>

<target name="createDistributionXPI" depends="zipIntoXPI" >
<copy file="${dist_dir}/${ant.project.name}.xpi" tofile="${dist_dir}/${ant.project.name}.xpi.zip" />
</target>

<target name="createBranchXPI" depends="clean, version, expand-templates, zipIntoXPI, release-documentation" >
<move file="${dist_dir}/firebug.xpi" tofile="${dist_dir}/${FIREBUG-XPI}"/>
<copy file="${build_dir}/update.rdf" tofile="${dist_dir}/update.rdf" />
</target>


<!-- Trace Removal Targets: copy this dir to ../eval, strip lines with /*@explore*/ -->
<target name="clean-unexplore"
description="Delete contents of unexplore directory" >
<fail>
<condition>
<not>
<isset property="unexplore.dir"/>
</not>
</condition>
</fail>
<delete includeEmptyDirs="true">
<fileset dir="${unexplore.dir}" includes="**/*" excludes="**/.svn"/>
</delete>
</target>

<target name="copy-to-unexplore"
description="copy to clean out tracing code before xpi">
<copy todir="${unexplore.dir}" >
<fileset dir=".">
<exclude name="build/**"/>
<exclude name="dist/**"/>
<exclude name="lite/**"/>
<exclude name="aptanadebugger/**"/>
<exclude name="**/.svn"/>
<exclude name="update.rdf"/>
<exclude name="install.rdf"/>
</fileset>
</copy>
</target>


<target name="unexplore" depends="version, expand-templates, clean-unexplore, copy-to-unexplore">
<replaceregexp match=".*/\*@explore\*/.*\n" replace="" flags="g">
<fileset dir="${unexplore.dir}" includes="**/*.js"/>
<fileset dir="${unexplore.dir}" includes="**/*.xul"/>
</replaceregexp>
<echo message="Removing X for explore from RELEASE in ${unexplore.dir}/branch.properties"/>
<replaceregexp match="(RELEASE=[^X]*)X" replace="\1" file="${unexplore.dir}/branch.properties"/>
<echo message="Build Distribution XPI in ${unexplore.dir}"/>
<ant target="createBranchXPI" dir="${unexplore.dir}" inheritAll="false"/>
<delete file="${unexplore.dir}/update.rdf.tpl.xml"/> <!-- Freeze update.rdf in future builds -->
<echo message="** Now use McCoy to sign update.rdf **"/>
</target>

<target name="createAptanaJAR" if="aptanadebugger">
<echo message="Create aptanadebugger.jar"/>
<mkdir dir="${build_dir}" />
<zip destfile="${build_dir}/aptanadebugger.jar" update="true" basedir="${src_dir}/aptanadebugger/"
includes="content/**, locale/**, skin/**" excludes="${excludes}"/>
</target>

<target name="integrateAptana" if="aptanadebugger">
<echo message="Integrate AptanaDebugger"/>
<concat destfile="${build_dir}/chrome.manifest" force="yes">
<fileset file="${src_dir}/chrome.manifest"/>
<fileset file="${src_dir}/aptanadebugger/chrome.manifest"/>
</concat>
</target>


</project>
Show details Hide details

Change log

r740 by johnjbarton.com on Jun 11, 2008   Diff
Add J to version number for jarred 1.2X
Go to: 
Project members, sign in to write a code review

Older revisions

r739 by johnjbarton.com on Jun 11, 2008   Diff
update build.xml to build jarred 1.2X
version at current release
r672 by johnjbarton.com on May 21, 2008   Diff
sync to mozzipper
r671 by johnjbarton.com on May 21, 2008   Diff
sync to mozzipper
All revisions of this file

File info

Size: 12533 bytes, 281 lines
Hosted by Google Code