| 1 | <?xml version="1.0" ?>
|
|---|
| 2 |
|
|---|
| 3 | <project name="FireMobileSimulator" default="dist">
|
|---|
| 4 | <property name="src.dir" value="src" />
|
|---|
| 5 | <property name="dist.dir" value="dist" />
|
|---|
| 6 | <property name="app.name" value="FireMobileSimulator" />
|
|---|
| 7 | <property name="app.code" value="msim" />
|
|---|
| 8 | <property name="app.id" value="{77cc852e-6b45-11dd-929f-d30256d89593}" /> <!-- extension id like: xxx@xxx.com -->
|
|---|
| 9 | <property name="ff.dir" value="C:\Documents and Settings\horikawa_t\Application Data\Mozilla\Firefox\Profiles\dzneq73f.nms\extensions\" />
|
|---|
| 10 |
|
|---|
| 11 | <condition property="ff.present">
|
|---|
| 12 | <and>
|
|---|
| 13 | <isset property="ff.dir" />
|
|---|
| 14 | <available file="${ff.dir}" type="dir" />
|
|---|
| 15 | </and>
|
|---|
| 16 | </condition>
|
|---|
| 17 |
|
|---|
| 18 | <target name="chrome">
|
|---|
| 19 | <mkdir dir="${dist.dir}" />
|
|---|
| 20 | <mkdir dir="${dist.dir}/chrome" />
|
|---|
| 21 | <zip destfile="${dist.dir}/chrome/${app.code}.jar">
|
|---|
| 22 | <fileset dir="${src.dir}/chrome">
|
|---|
| 23 | <include name="content/**" />
|
|---|
| 24 | <include name="locale/**" />
|
|---|
| 25 | <include name="skin/**" />
|
|---|
| 26 | <exclude name="**/Thumbs.db" />
|
|---|
| 27 | <exclude name="**/.*" />
|
|---|
| 28 | <exclude name="**/CVS/**" />
|
|---|
| 29 | </fileset>
|
|---|
| 30 | </zip>
|
|---|
| 31 | </target>
|
|---|
| 32 |
|
|---|
| 33 | <target name="test.chrome" depends="chrome" if="ff.present">
|
|---|
| 34 | <!-- copy to chrome directory -->
|
|---|
| 35 | <copy file="${dist.dir}/chrome/${app.code}.jar" todir="${ff.dir}/chrome/chrome" overwrite="true" />
|
|---|
| 36 | <copy file="${src.dir}/chrome.manifest" tofile="${ff.dir}/chrome/${app.name}.manifest" overwrite="true" />
|
|---|
| 37 | </target>
|
|---|
| 38 |
|
|---|
| 39 | <!-- copy to extensions directory -->
|
|---|
| 40 | <!--
|
|---|
| 41 | <target name="test.ext" depends="chrome" if="ff.present">
|
|---|
| 42 | <copy file="${dist.dir}/${app.name}.jar" todir="${ff.dir}/extensions/${app.id}/chrome" overwrite="true" />
|
|---|
| 43 | <copy file="${src.dir}/chrome.manifest" todir="${ff.dir}/extensions/${app.id}" overwrite="true" />
|
|---|
| 44 | </target>
|
|---|
| 45 | -->
|
|---|
| 46 |
|
|---|
| 47 | <target name="dist" depends="chrome">
|
|---|
| 48 | <zip destfile="${dist.dir}/${app.name}.xpi">
|
|---|
| 49 | <zipfileset file="${dist.dir}/chrome/${app.code}.jar" prefix="chrome"/>
|
|---|
| 50 | <fileset dir="${src.dir}">
|
|---|
| 51 | <include name="chrome.manifest" />
|
|---|
| 52 | <include name="install.rdf" />
|
|---|
| 53 | <include name="defaults/**" />
|
|---|
| 54 | <include name="components/**" />
|
|---|
| 55 | <exclude name="**/.*" />
|
|---|
| 56 | <exclude name="**/CVS/**" />
|
|---|
| 57 | </fileset>
|
|---|
| 58 | </zip>
|
|---|
| 59 | <copy file="${dist.dir}/chrome/${app.code}.jar" todir="${ff.dir}/${app.id}/chrome" />
|
|---|
| 60 | <copy todir="${ff.dir}/${app.id}">
|
|---|
| 61 | <fileset dir="${src.dir}">
|
|---|
| 62 | <include name="chrome.manifest" />
|
|---|
| 63 | <include name="install.rdf" />
|
|---|
| 64 | <include name="defaults/**" />
|
|---|
| 65 | <include name="components/**" />
|
|---|
| 66 | <exclude name="**/.*" />
|
|---|
| 67 | <exclude name="**/CVS/**" />
|
|---|
| 68 | </fileset>
|
|---|
| 69 | </copy>
|
|---|
| 70 | </target>
|
|---|
| 71 |
|
|---|
| 72 | <target name="clean">
|
|---|
| 73 | <delete dir="${dist.dir}" />
|
|---|
| 74 | </target>
|
|---|
| 75 |
|
|---|
| 76 | <target name="clean.ff" if="ff.present">
|
|---|
| 77 | <delete dir="${ff.dir}/extensions/${app.id}" failonerror="false" />
|
|---|
| 78 | <delete file="${ff.dir}/chrome/${app.name}.manifest" failonerror="false" />
|
|---|
| 79 | <delete file="${ff.dir}/chrome/chrome/${app.name}.jar" failonerror="false" />
|
|---|
| 80 | </target>
|
|---|
| 81 |
|
|---|
| 82 | </project>
|
|---|