forked from gubatron/frostwire-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·141 lines (110 loc) · 6.08 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
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
<!-- top level ant file -->
<project name="limewire" default="compile-src" basedir=".">
<property name="limewire.home" location="${basedir}"/>
<import file="components/build.xml"/>
<property name="gettexttasks.jar" value="${limewire.lib.jars}/gettext-commons.jar"/>
<import file="core/build.xml"/>
<import file="gui/build.xml" />
<!-- Builds EVERYTHING from Scratch, including 3rd party jars from sources (lib/jars-src) -->
<target name="everything">
<touch file="lib/jars/COMPILE"/>
<ant dir="lib/jars-src"/>
<ant target="jar"/>
</target>
<target name="clean-jars">
<ant dir="lib/jars-src" target="clean"/>
</target>
<target name="initialize" depends="lw-core.initialize, lw-gui.initialize, lw-components.initialize" unless="initialized.limewire">
<property name="limewire.components.limewire.home"
location="${limewire.home}"/>
<do.setup-properties component="limewire"/>
</target>
<target name="compile"
description="Compiles all code."
depends="initialize, lw-components.compile-core-src, lw-components.compile-ui-src, lw-core.compile-core, lw-gui.compile-gui"/>
<target name="compile-src"
description="Compiles all source code (not tests)."
depends="initialize, lw-components.compile-core-src, lw-components.compile-ui-src, lw-core.compile-core, lw-gui.compile-gui"/>
<target name="clean"
description="Cleans everything."
depends="initialize, lw-components.clean, clean-core, clean-gui">
<do.clean component="limewire"/>
<delete dir="${limewire.components.limewire.home}/unused"/>
</target>
<target name="clean-src"
description="Cleans artifacts from compiling src."
depends="initialize, lw-components.clean-src, clean-core, clean-gui"/>
<target name="jar" depends="compile-src">
<ant dir="components" target="jar"/>
<!-- echo message="GUBA: root main.xml (jar) - Remember to invoke components/build.xml jar first than this manually"/-->
<!-- get the list of jars in a space separated list without dirnames -->
<fileset dir="${limewire.lib.jars}" includes="**/*.jar" id="alljars"/>
<pathconvert property="classpath" refid="alljars" pathsep=" ">
<mapper type = "flatten" />
</pathconvert>
<mkdir dir="${limewire.home}/dist"/>
<!-- build FrostWire's main jar -->
<delete file="${limewire.home}/dist/frostwire.jar"/>
<jar jarfile="${limewire.home}/dist/frostwire.jar" compress="true" level="9">
<fileset dir="${build.limewire.gui.classes}" includes="com/frostwire/**/*.class"/>
<fileset dir="${build.limewire.core.classes}" includes="com/frostwire/**/*.class"/>
<fileset dir="${build.limewire.gui.classes}" includes="com/limegroup/**/*.class"/>
<fileset dir="${build.limewire.core.classes}" includes="com/limegroup/**/*.class"/>
<fileset dir="${limewire.home}/gui" includes="irc/**/*" excludes="irc/**/*.java"/>
<fileset dir="${limewire.home}/gui" includes="org/**/*" excludes="org/**/*.java"/>
<manifest>
<attribute name="Main-Class" value="com.limegroup.gnutella.gui.Main" />
<attribute name="Class-Path" value=". ${classpath} lw-alexandria.jar lw-azureus.jar lw-common.jar lw-resources.jar lw-setting.jar lw-medialib.jar lw-jdownloader.jar"/>
</manifest>
</jar>
</target>
<!-- TODO: implement -->
<target name="clean-dist"/>
<property name="translation.cutoff" value="35"/>
<target name="init.gettext" description="Loads the Ant gettext tasks">
<taskdef name="gettext-extract" classname="org.xnap.commons.ant.gettext.GettextExtractKeysTask" classpath="${gettexttasks.jar}"/>
<taskdef name="gettext-merge" classname="org.xnap.commons.ant.gettext.GettextMergeKeysTask" classpath="${gettexttasks.jar}"/>
<taskdef name="gettext-generate-default" classname="org.xnap.commons.ant.gettext.GenerateDefaultBundleTask" classpath="${gettexttasks.jar}"/>
<taskdef name="gettext-dist" classname="org.xnap.commons.ant.gettext.GettextDistTask" classpath="${gettexttasks.jar}"/>
</target>
<target name="gettext-extract" description="Extracts message keys from the source code" depends="init.gettext">
<gettext-extract keysFile="frostwire.pot" poDirectory="lib/messagebundles" keywords="-kgetStringResource -kgetFormattedStringResource -ktrc -ktr -kmarktr -ktrn:1,2 -ktrl">
<fileset dir="components" includes="**/*.java" excludes="azureus/**"/>
<fileset dir="core" includes="**/*.java"/>
<fileset dir="gui" includes="**/*.java"/>
</gettext-extract>
<gettext-merge keysFile="frostwire.pot" poDirectory="lib/messagebundles"/>
</target>
<!-- generate one jar with almost complete translations -->
<target name="gettext-bundle" description="Rebuilds messages and bundles them" depends="init.gettext">
<!-- clean up -->
<delete dir="lib/messagebundles/org"/>
<!-- generate default bundle for complete messages -->
<gettext-generate-default targetBundle="org.limewire.i18n.Messages"
outputDirectory="lib/messagebundles"
potfile="lib/messagebundles/frostwire.pot"/>
<!-- generate complete bundles -->
<gettext-dist targetBundle="org.limewire.i18n.Messages"
poDirectory="lib/messagebundles"
outputDirectory="lib/messagebundles"
percentage="${translation.cutoff}"/>
<!-- generate the empty en.po file without percentage -->
<gettext-dist targetBundle="org.limewire.i18n.Messages"
outputDirectory="lib/messagebundles">
<fileset dir="lib/messagebundles" includes="en.po"/>
</gettext-dist>
<!-- jar them -->
<jar destfile="lib/jars/messages.jar"
basedir="lib/messagebundles"
includes="org/**"/>
<!-- clean up -->
<delete dir="lib/messagebundles/org"/>
</target>
<!-- mask imported targets -->
<target name="test"/>
<target name="test-package"/>
<target name="compile-core"/>
<target name="compile-core-src"/>
<target name="compile-ui-src"/>
<target name="compile-gui"/>
</project>