aboutsummaryrefslogtreecommitdiff
path: root/files/ja/ant_script_to_assemble_an_extension/index.html
blob: 3c9a0fca59a563f16a224301dcfdea943993c33e (plain)
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
---
title: ant script to assemble an extension
slug: ant_script_to_assemble_an_extension
tags:
  - Extensions
  - 'Extensions:Tools'
  - Tools
---
<p>この ant スクリプトは<a href="ja/Extension_Packaging">拡張機能のパッケージ化</a>に役立ちます。
</p>
<pre class="eval">&lt;?xml version="1.0"?&gt;
<span>This build file was written by Régis Décamps &lt;<a class=" link-mailto" href="mailto:decamps@users.sf.net">decamps@users.sf.net</a>&gt;</span>

&lt;project name="blogmark" default="createxpi"&gt;
       &lt;property name="VERSION" value="1.3-rc1"/&gt;
       &lt;property name="DESCRIPTION" value="New context-menu item to add
                                           the current page in your Blogmarks"/&gt;
       <span>XPI file is created after "chrome/blogmark.jar"               is created, which is then stuffed into "blogmark.xpi"</span>
       &lt;target name="createxpi" depends="createjar"
               description="Assemble the final build blogmark.xpi"&gt;
               &lt;zip destfile="blogmark-${VERSION}.xpi"&gt;
                        &lt;zipfileset dir="." includes="chrome/blogmark.jar" /&gt;
                        &lt;zipfileset dir="." includes="install.rdf" /&gt;
                &lt;/zip&gt;
        &lt;/target&gt;

       <span>Everything inside the chrome directory is zipped into chrome/blogmark.jar</span>
       &lt;target name="createjar" depends="templates" description="Assemble the jar"&gt;
                &lt;jar destfile="chrome/blogmark.jar"&gt;
                       &lt;fileset dir="chrome/"&gt;
                               &lt;include name="**/*"/&gt;
                               &lt;exclude name="**/*~"/&gt;
                               &lt;exclude name="**/*.tpl.*"/&gt;
                               &lt;exclude name="blogmark.jar"/&gt;
                       &lt;/fileset&gt;
                &lt;/jar&gt;
        &lt;/target&gt;

       &lt;target name="templates" description="Generate files from templates."&gt;
               &lt;copy file="chrome/content/blogmark/contents.rdf.tpl.xml"
                     tofile="chrome/content/blogmark/contents.rdf"
                     overwrite="true"&gt;
                       &lt;filterchain&gt;
                               &lt;replacetokens&gt;
                                       &lt;token key="VERSION" value="${VERSION}"/&gt;
                                       &lt;token key="DESCRIPTION" value="${DESCRIPTION}"/&gt;
                               &lt;/replacetokens&gt;
                       &lt;/filterchain&gt;
               &lt;/copy&gt;
               &lt;copy file="chrome/content/blogmark/about.xul.tpl.xml"
                       tofile="chrome/content/blogmark/about.xul"
                       overwrite="true"&gt;
                       &lt;filterchain&gt;
                               &lt;replacetokens&gt;
                                       &lt;token key="VERSION" value="${VERSION}"/&gt;
                               &lt;/replacetokens&gt;
                       &lt;/filterchain&gt;
               &lt;/copy&gt;
               &lt;copy file="install.rdf.tpl.xml"
                       tofile="install.rdf"
                       overwrite="true"&gt;
                       &lt;filterchain&gt;
                               &lt;replacetokens&gt;
                                       &lt;token key="VERSION" value="${VERSION}"/&gt;
                                       &lt;token key="DESCRIPTION" value="${DESCRIPTION}"/&gt;
                               &lt;/replacetokens&gt;
                       &lt;/filterchain&gt;
               &lt;/copy&gt;
       &lt;/target&gt;
&lt;/project&gt;
</pre>
<div class="noinclude">
</div>
{{ languages( { "en": "en/Ant_script_to_assemble_an_extension" } ) }}