-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
77 lines (67 loc) · 2.88 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="oracle-jdk" basedir=".">
<dirname property="app.basedir" file="${ant.file.oracle-jdk}"/>
<property name="build.properties" value="${app.basedir}/build.properties"/>
<property file="${build.properties}"/>
<!-- Load Portapps core build -->
<property name="core.basedir" location="${app.basedir}\${core.dir}"/>
<fail unless="core.basedir" message="Core directory '${core.basedir}' not found in ${core.basedir}"/>
<echo message="Core found in ${core.basedir}" level="debug"/>
<!-- Import build-app.xml -->
<import file="${core.basedir}\.build\build-app.xml"/>
<!-- Targets -->
<target name="release" depends="release.app" description="Release"/>
<target name="prepare">
<echo message="Preparing release..."/>
<if>
<equals arg1="${atf.ext}" arg2=".zip"/>
<then>
<property name="extract.path2" value="${tmp.path}\extract2"/>
<move todir="${tmp.path}\extract2">
<fileset dir="${extract.path}\jdk-${app.version}" defaultexcludes="no"/>
</move>
<delete dir="${extract.path}"/>
<move todir="${extract.path}">
<fileset dir="${extract.path2}" defaultexcludes="no"/>
</move>
</then>
<else>
<if>
<matches string="${atf.assertextract}" pattern="^.+111$"/>
<then>
<sevenzip-ax src="${extract.path}\${atf.assertextract}" dest="${extract.path}"/>
<assertfile file="${extract.path}\tools.zip"/>
</then>
</if>
<sevenzip-ax src="${extract.path}\tools.zip" dest="${extract.path}\jdk"/>
<assertfile file="${extract.path}\jdk\bin\java.exe"/>
<for param="file">
<path>
<fileset dir="${extract.path}\jdk" defaultexcludes="no" includes="**/*.pack"/>
</path>
<sequential>
<var name="file.pack.dir" unset="true"/>
<var name="file.pack.basename" unset="true"/>
<var name="file.pack.jar" unset="true"/>
<dirname property="file.pack.dir" file="@{file}"/>
<basename property="file.pack.basename" file="@{file}" suffix=".pack"/>
<property name="file.pack.jar" value="${file.pack.basename}.jar"/>
<exec executable="${extract.path}\jdk\bin\unpack200.exe" dir="${file.pack.dir}" failonerror="true">
<arg value="-r"/>
<arg value="@{file}"/>
<arg value="${file.pack.jar}"/>
</exec>
</sequential>
</for>
<property name="extract.path2" value="${tmp.path}\extract2"/>
<move todir="${tmp.path}\extract2">
<fileset dir="${extract.path}\jdk" defaultexcludes="no"/>
</move>
<delete dir="${extract.path}"/>
<move todir="${extract.path}">
<fileset dir="${extract.path2}" defaultexcludes="no"/>
</move>
</else>
</if>
</target>
</project>