-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
108 lines (95 loc) · 3.4 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="DaisyWorksDesktop" basedir="." default="all">
<property name="skip-tests" value="true"/>
<property name="jre.version" value="jre1.6.0_25"/>
<property name="ui" value="daisyworks-desktop-air"/>
<property name="webapp" value="daisyworks-desktop-java"/>
<target name="install-deps" depends="init" description="Installs jars in local maven repo that are not available on the web">
<exec executable="${mvn}">
<arg value="install:install-file"/>
<arg value="-DgroupId=com.daisyworks"/>
<arg value="-DartifactId=stk500"/>
<arg value="-Dversion=1.0"/>
<arg value="-Dpackaging=jar"/>
<arg value="-Dfile=./daisyworks-desktop-java/lib/stk500-1.0.jar"/>
<arg value="-DgeneratePom=true"/>
</exec>
</target>
<target name="init">
<!-- Mac OS Build -->
<condition property="mvn" value="mvn">
<os family="mac" />
</condition>
<!-- Windows Build -->
<condition property="isWindows">
<os family="windows"/>
</condition>
<condition property="mvn" value="mvn.bat">
<os family="windows" />
</condition>
<!-- Linux Build -->
<condition property="isLinux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<condition property="mvn" value="mvn">
<os family="unix" />
</condition>
</target>
<!--
Builds an executable jar and copies it to the Air build to be included in the installer
-->
<target name="server" depends="init">
<delete file="./${ui}/bin-debug/daisyworks-server.jar" />
<delete file="./${ui}/deploy/daisyworks-server.jar" />
<exec executable="${mvn}" dir="./${webapp}">
<arg value="clean"/>
<arg value="package"/>
<arg value="-Dmaven.test.skip=${skip-tests}"/>
</exec>
<!-- we copy to bin-debug for in-place FlashBuilder execution -->
<copy file="./${webapp}/target/daisyworks-desktop-server-1.0-SNAPSHOT.jar"
tofile="./${ui}/bin-debug/daisyworks-server.jar"
failonerror="true"/>
<!-- we copy to client/deploy for cmd line installer build -->
<copy file="./${webapp}/target/daisyworks-desktop-server-1.0-SNAPSHOT.jar"
tofile="./${ui}/deploy/daisyworks-server.jar"
failonerror="true"/>
<!-- all are called, but only one is executed -->
<antcall target="copy-linux-jre" />
<antcall target="copy-windows-jre" />
</target>
<!--
Extracts the 32-bit Sun 6 JRE to the Air directories to be included in the installer for Linux
-->
<target name="copy-linux-jre" depends="init" if="isLinux">
<!-- we copy to bin-debug for in-place FlashBuilder execution -->
<exec executable="./copy-linux-jre.sh" failonerror="true" />
</target>
<!--
Extracts the 32-bit Sun 6 JRE to the Air directories to be included in the installer for Windows
-->
<target name="copy-windows-jre" depends="init" if="isWindows">
<!-- we copy to bin-debug for in-place FlashBuilder execution -->
<unzip
src="${basedir}/jre/windows/${jre.version}/${jre.version}.zip"
dest="./${ui}/bin-debug/jre"
overwrite="false"/>
<!-- we copy to client/deploy for cmd line installer build -->
<unzip
src="${basedir}/jre/windows/${jre.version}/${jre.version}.zip"
dest="./${ui}/deploy/jre"
overwrite="false"/>
</target>
<!--
Call the subtask to build the native installer
-->
<target name="installer">
<ant target="installer" dir="${ui}" useNativeBasedir="true" />
</target>
<target name="all" depends="server, installer" />
</project>