-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
62 lines (55 loc) · 3.42 KB
/
build.xml
File metadata and controls
62 lines (55 loc) · 3.42 KB
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
<?xml version="1.0" ?>
<project name="phantomjs4java" default="all" basedir=".">
<property environment="env" />
<target name="all" depends="">
<echo>try: ant -p</echo>
</target>
<target name="install-phantomjs" depends="proxy" description="Install phantomjs. Sample: -Dphantomjs.version=1.9.1">
<delete dir="gen/phantomjs" />
<mkdir dir="gen/phantomjs" />
<parallel>
<sequential>
<get dest="gen/phantomjs/phantomjs-linux-i686.tar.bz2" src="https://phantomjs.googlecode.com/files/phantomjs-${phantomjs.version}-linux-i686.tar.bz2" />
<untar dest="gen/phantomjs/phantomjs-linux-i686" src="gen/phantomjs/phantomjs-linux-i686.tar.bz2" compression="bzip2" />
</sequential>
<sequential>
<get dest="gen/phantomjs/phantomjs-linux-x86_64.tar.bz2" src="https://phantomjs.googlecode.com/files/phantomjs-${phantomjs.version}-linux-x86_64.tar.bz2" />
<untar dest="gen/phantomjs/phantomjs-linux-x86_64" src="gen/phantomjs/phantomjs-linux-x86_64.tar.bz2" compression="bzip2" />
</sequential>
<sequential>
<get dest="gen/phantomjs/phantomjs-macosx.zip" src="https://phantomjs.googlecode.com/files/phantomjs-${phantomjs.version}-macosx.zip" />
<unzip dest="gen/phantomjs/phantomjs-macosx" src="gen/phantomjs/phantomjs-macosx.zip" />
</sequential>
<sequential>
<get dest="gen/phantomjs/phantomjs-windows.zip" src="https://phantomjs.googlecode.com/files/phantomjs-${phantomjs.version}-windows.zip" />
<unzip dest="gen/phantomjs/phantomjs-windows" src="gen/phantomjs/phantomjs-windows.zip" />
</sequential>
</parallel>
<delete dir="phantomjs4java-api/src/main/resources/phantomjs4java/binary" />
<mkdir dir="phantomjs4java-api/src/main/resources/phantomjs4java/binary" />
<parallel>
<sequential>
<copy file="gen/phantomjs/phantomjs-linux-i686/phantomjs-${phantomjs.version}-linux-i686/bin/phantomjs" tofile="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-linux-i686" />
<chmod perm="u+x" file="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-linux-i686" />
</sequential>
<sequential>
<copy file="gen/phantomjs/phantomjs-linux-x86_64/phantomjs-${phantomjs.version}-linux-x86_64/bin/phantomjs" tofile="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-linux-x86_64" />
<chmod perm="u+x" file="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-linux-x86_64" />
</sequential>
<sequential>
<copy file="gen/phantomjs/phantomjs-macosx/phantomjs-${phantomjs.version}-macosx/bin/phantomjs" tofile="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-macosx" />
<chmod perm="u+x" file="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-macosx" />
</sequential>
<sequential>
<copy file="gen/phantomjs/phantomjs-windows/phantomjs-${phantomjs.version}-windows/phantomjs.exe" tofile="phantomjs4java-api/src/main/resources/phantomjs4java/binary/phantomjs-windows.exe" />
</sequential>
<sequential>
<echo message="p4j.phantomjs.version=${phantomjs.version}${line.separator}" file="phantomjs4java-api/src/main/resources/phantomjs4java/binary/p4j.phantomjs.properties" />
</sequential>
</parallel>
</target>
<target name="proxy" if="proxyHost">
<!-- <echo>Using proxy ${proxyUser}:x@${proxyHost}:${proxyPort}</echo> <setproxy proxyhost="${proxyHost}" proxyport="${proxyPort}" proxyuser="${proxyUser}" proxypassword="${proxyPass}"
/> -->
</target>
</project>