-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
release.xml
128 lines (114 loc) · 5.4 KB
/
release.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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="DCP Setup Maker - release" default="release" basedir=".">
<!-- ANT 1.7 is required -->
<description>
DevComPack Setup Maker Ant build file.
Continous Integration online at https://travis-ci.org/DevComPack/setupmaker
</description>
<!-- global properties for build -->
<loadproperties srcfile="${basedir}/src/resources/app.properties" />
<property name="target" location="${basedir}/target"/>
<property name="jar_name" value="DCP-SNAPSHOT.jar"/>
<property name="jar_name.out" value="dcpsetupmaker.jar"/>
<property name="jar_file" value="${basedir}/${jar_name}"/>
<property name="exe_name" value="dcpsetupmaker.exe"/>
<property name="exe_name.out" value="DCPSM-${version}.exe"/>
<property name="releases" value="${target}/dist"/>
<property name="current_release" value="${releases}/DCP_${version}/"/>
<!-- must update these paths on first time before running a release! -->
<property name="doc.dir" value="../gh-pages/doc"/>
<property name="launch4j.dir" value="C:/bin/launch4j"/>
<!-- task definitions -->
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar" />
<!-- release targets -->
<target name="dcp.console" description="DCP console packaging" >
<echo message="Starting.."/>
<java jar="${basedir}/${jar_name}" fork="true" failonerror="true" maxmemory="256m">
<arg value="${basedir}/saves/dcp.dcp"/>
</java>
<echo message="Complete"/>
</target>
<target name="exe" description="Generating exe file for jar" >
<echo message="Generating exe file for jar"/>
<launch4j configFile="${basedir}/dev/launch4j.xml" outfile="${basedir}/${exe_name}"
fileVersion="${version}.0" txtFileVersion="${version}.0"
productVersion="${version}.0" txtProductVersion="${version}.0" />
</target>
<target name="release" description="prepare release archive">
<echo message="Release Package start"/>
<mkdir dir="${releases}"/>
<mkdir dir="${current_release}"/>
<zip destfile="${current_release}/DCP-${version}.zip">
<fileset dir="${basedir}" includes="lib/dcp/"/>
<fileset dir="${basedir}" includes="res/bat/ res/langpacks/ res/xml/"/>
<zipfileset dir="${basedir}" includes="${jar_name}" fullpath="DCPSM-${version}.jar"/>
<zipfileset dir="${basedir}" includes="settings.json" fullpath="settings.json"/>
<zipfileset dir="${basedir}" includes="README.md" fullpath="README"/>
<zipfileset dir="${basedir}" includes="LICENSE" fullpath="LICENSE"/>
<zipfileset dir="${basedir}" includes="res/release_notes.txt" fullpath="changelog.txt"/>
</zip>
<echo message="Release success"/>
</target>
<target name="release.win" description="prepare release archive for windows">
<echo message="Generating exe file for jar"/>
<launch4j>
<config headerType="gui" outfile="${target}/${exe_name}"
dontWrapJar="true" jarPath="${jar_name.out}"
icon="${basedir}/res/dcpsm.ico" >
<classPath mainClass="com.dcp.sm.App">
<cp>dcpsetupmaker.jar</cp>
<cp>lib/truezip-samples-7.7.1-jar-with-dependencies.jar</cp>
<cp>lib/ant.jar</cp>
<cp>lib/ant-launcher.jar</cp>
<cp>lib/ant-apache-regexp.jar</cp>
<cp>lib/ant-contrib.jar</cp>
<cp>lib/bcel-5.2.jar</cp>
<cp>lib/stax2-api-3.1.1.jar</cp>
<cp>lib/staxmate-2.2.0.jar</cp>
<cp>lib/woodstox-core-asl-4.1.5.jar</cp>
<cp>lib/standalone-compiler.jar</cp>
<cp>lib/json-simple-1.1.1.jar</cp>
<cp>lib/jsch-0.1.50.jar</cp>
<cp>lib/pivot-charts.jar</cp>
<cp>lib/pivot-core.jar</cp>
<cp>lib/pivot-wtk.jar</cp>
<cp>lib/pivot-wtk-terra.jar</cp>
<cp>lib/commons-io-2.4.jar</cp>
</classPath>
<jre minVersion="1.7.0_02" />
<splash file="${basedir}/res/splash.bmp" waitForWindow="true" />
<versionInfo fileVersion="${version}.0" txtFileVersion="${version}.0"
productVersion="${version}.0" txtProductVersion="${version}.0"
productName="${name}" companyName="DevComPack"
fileDescription="${name}" originalFilename="${exe_name.out}"
internalName="dcpsetupmaker" copyright="${username}" />
</config>
</launch4j>
<echo message="Release Package start"/>
<mkdir dir="${releases}"/>
<mkdir dir="${current_release}"/>
<zip destfile="${current_release}/DCP-${version}-win.zip">
<fileset dir="${target}" includes="lib/ lib/dcp/"/>
<fileset dir="${basedir}" includes="res/bat/ res/langpacks/ res/utils/ res/ps/ res/xml/"/>
<zipfileset dir="${basedir}" includes="${jar_name}" fullpath="${jar_name.out}"/>
<zipfileset dir="${target}" includes="${exe_name}" fullpath="${exe_name.out}"/>
<zipfileset dir="${basedir}" includes="settings.json" fullpath="settings.json"/>
<zipfileset dir="${basedir}" includes="README.md" fullpath="README"/>
<zipfileset dir="${basedir}" includes="LICENSE" fullpath="LICENSE"/>
<zipfileset dir="${basedir}" includes="res/release_notes.txt" fullpath="changelog.txt"/>
</zip>
<echo message="Windows Release success"/>
</target>
<target name="doc.clean" description="prepare documentation for publish">
<replaceregexp byline="true">
<regexp pattern="<p class="rvps5"><span class="rvts17">Created with.*</p>"/>
<substitution expression=""/>
<fileset dir="${doc.dir}">
<include name="*.html" />
<exclude name="toc.html" />
<exclude name="index.html" />
</fileset>
</replaceregexp>
</target>
</project>