-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
172 lines (153 loc) · 7.2 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
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="all" name="jequix">
<property file="override.properties"/>
<property name="release.number" value="0.1.0" />
<target name="all" depends="clean,plugin" />
<target name="jar" >
<ant dir="src" target="build" />
</target>
<target name="plugin" depends="jar">
<mkdir dir="plugin/" />
<mkdir dir="plugin/lib/" />
<!-- get version number -->
<buildnumber file="scripts/build.number" />
<!-- make the update xpi2p -->
<!-- this contains everything except i2ptunnel.config -->
<copy file="LICENSE" tofile="plugin/LICENSE.txt" overwrite="true" />
<copy file="README.txt" todir="plugin/" overwrite="true" />
<copy file="CHANGES.txt" todir="plugin/" overwrite="true" />
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="update-only=true" />
</exec>
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-b${build.number}" />
</exec>
<copy file="src/build/jequix.jar" todir="plugin/lib/" />
<input message="Enter su3 signing key password:" addproperty="release.password.su3" />
<fail message="You must enter a password." >
<condition>
<equals arg1="${release.password.su3}" arg2=""/>
</condition>
</fail>
<!-- this will fail if no su3 keys exist, as it needs the password twice -->
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" />
</exec>
<move file="jequix.su3" tofile="jequix-update.su3" overwrite="true" />
<!-- make the install xpi2p -->
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
<!-- Files in installer but not update. Be sure to Add to delete fileset above and clean target below -->
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
<arg value="version=${release.number}-b${build.number}" />
</exec>
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
<arg value="plugin" />
</exec>
</target>
<target name="test" depends="testinterpreted, testcompiled" />
<target name="testinterpreted" depends="testhashxi, testequixi, testpowi, runpowi" />
<target name="testcompiled" depends="testhashxc, testequixc, testpowc, runpowc" />
<target name="testhashxi" depends="jar">
<java classname="net.i2p.pow.hashx.Test" fork="true" failonerror="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
</classpath>
</java>
</target>
<target name="testequixi" depends="jar">
<java classname="net.i2p.pow.equix.Test" fork="true" failonerror="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
</classpath>
</java>
</target>
<target name="testpowi" depends="jar">
<java classname="net.i2p.pow.Test" fork="true" failonerror="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
</classpath>
</java>
</target>
<target name="runpowi" depends="jar">
<java classname="net.i2p.pow.POW" fork="true" failonerror="true">
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
</classpath>
</java>
</target>
<target name="testhashxc" depends="jar">
<java classname="net.i2p.pow.hashx.Test" fork="true" failonerror="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="${ant.home}/lib/ant-launcher.jar" />
<pathelement location="/usr/share/java/ecj.jar" />
</classpath>
</java>
</target>
<target name="testequixc" depends="jar">
<java classname="net.i2p.pow.equix.Test" fork="true" failonerror="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="${ant.home}/lib/ant-launcher.jar" />
<pathelement location="/usr/share/java/ecj.jar" />
</classpath>
</java>
</target>
<target name="testpowc" depends="jar">
<java classname="net.i2p.pow.Test" fork="true" failonerror="true">
<assertions><enable/></assertions>
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="${ant.home}/lib/ant-launcher.jar" />
<pathelement location="/usr/share/java/ecj.jar" />
</classpath>
</java>
</target>
<target name="runpowc" depends="jar">
<java classname="net.i2p.pow.POW" fork="true" failonerror="true">
<classpath>
<pathelement location="src/build/jequix.jar" />
<pathelement location="../i2p.i2p/build/i2p.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="${ant.home}/lib/ant-launcher.jar" />
<pathelement location="/usr/share/java/ecj.jar" />
</classpath>
</java>
</target>
<target name="distclean" depends="clean" />
<target name="clean" >
<ant dir="src" target="clean" />
<defaultexcludes remove="**/*~"/>
<delete>
<fileset dir="." includes="*/*.~ **/*.*~ */**/*.*~ *.*~" />
</delete>
<delete dir="tmp/" />
<delete file="plugin/plugin.config" />
<delete dir="plugin/lib/" />
<delete file="plugin/CHANGES.txt" />
<delete file="plugin/LICENSE.txt" />
<delete file="plugin/README.txt" />
<delete file="jequix.xpi2p" />
<delete file="jequix-update.xpi2p" />
<delete file="jequix.su3" />
<delete file="jequix-update.su3" />
<delete file="plugin.zip" />
<delete dir="plugin/" />
</target>
</project>