-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
138 lines (114 loc) · 5.43 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
<!--
~ This file is part of Brewday.
~
~ Brewday is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ Brewday is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with Brewday. If not, see https://www.gnu.org/licenses.
-->
<project name="Brewday" default="dist" basedir=".">
<description>Brewday</description>
<!-- load these properties, to get at the version -->
<property file="src/dist/dist.brewday.cfg"/>
<!-- JRE and JFX locations -->
<property name="jre.to.bundle" location="e:/utils/jdk-14.0.2"/>
<property name="jfx.to.bundle" location="e:/utils/javafx-sdk-11.0.2"/>
<!-- launch4j -->
<property name="launch4j.dir" location="e:/utils/launch4j"/>
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar
:${launch4j.dir}/lib/xstream.jar"/>
<!-- set global properties for this build -->
<property name="src" location="src/main/java"/>
<property name="build_base" location="./build"/>
<property name="build" location="${build_base}/classes"/>
<property name="dist" location="${build_base}/dist"/>
<property name="zipdist"
location="${dist}/brewday_${mclachlan.brewday.version}/brewday_${mclachlan.brewday.version}"/>
<property name="srcdist"
location="${dist}/brewday_${mclachlan.brewday.version}_src/brewday_${mclachlan.brewday.version}_src"/>
<path id="project.class.path">
<pathelement location="${build}"/>
<pathelement location="lib/freemarker/freemarker.jar"/>
<pathelement location="lib/gson/gson-2.8.6.jar"/>
<pathelement location="lib/javafx/javafx.base.jar"/>
<pathelement location="lib/javafx/javafx.controls.jar"/>
<pathelement location="lib/javafx/javafx.graphics.jar"/>
<pathelement location="lib/jfxtras/jfxtras-common-10.0-r1.jar"/>
<pathelement location="lib/jfxtras/jfxtras-controls-10.0-r1.jar"/>
<pathelement location="lib/jfxtras/jmetro-11.6.12.jar"/>
<pathelement location="lib/jgrapht/jgrapht-core-1.5.0.jar"/>
<pathelement location="lib/jgrapht/jheaps-0.13.jar"/>
<pathelement location="lib/commons-csv/commons-csv-1.8.jar"/>
<pathelement location="lib/commons-math/commons-math3-3.6.1.jar"/>
<pathelement location="lib/miglayout-javafx/miglayout-javafx-5.3-20200102.101943-289.jar"/>
</path>
<!--======================================================================-->
<target name="clean">
<delete dir="${build_base}"/>
</target>
<!--======================================================================-->
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<!--======================================================================-->
<target name="compile" depends="init">
<javac includeantruntime="false"
srcdir="${src}" destdir="${build}"
classpathref="project.class.path"
debug="true" encoding="UTF-8"/>
</target>
<!--======================================================================-->
<!-- Creates both ZIP'd up distros: platform-neutral and windows -->
<target name="zipdist" depends="compile">
<!-- create the clean prod db-->
<java
classname="mclachlan.brewday.util.CreateProdDb"
classpathref="project.class.path"/>
<!-- Create the distribution directory directories-->
<mkdir dir="${zipdist}/lib"/>
<mkdir dir="${zipdist}/log"/>
<!-- copy in the brewday jar -->
<jar jarfile="${zipdist}/lib/brewday.jar" basedir="${build}"/>
<!-- launcher -->
<mkdir dir="build/bin"/>
<launch4j configFile="src/dist/launch4j.config.xml"/>
<copy file="build/bin/brewday.exe" tofile="${zipdist}/brewday.exe"/>
<!-- copy in the libs -->
<copy todir="${zipdist}/lib">
<fileset dir="lib"/>
</copy>
<!-- copy in the bins -->
<copy todir="${zipdist}/bin">
<fileset dir="${jfx.to.bundle}/bin"/>
</copy>
<!-- copy in the JRE -->
<copy todir="${zipdist}/jre">
<fileset dir="${jre.to.bundle}"/>
</copy>
<!-- copy in the data -->
<copy todir="${zipdist}/data">
<fileset dir="./data"/>
</copy>
<!-- copy in files in the base dist dir -->
<copy file="src/dist/dist.brewday.cfg" tofile="${zipdist}/brewday.cfg"/>
<!-- <copy file="run.dist.cmd" tofile="${zipdist}/run.cmd"/>-->
<copy file="release_notes.txt" todir="${zipdist}"/>
<copy file="README.md" todir="${zipdist}"/>
<!-- finally, create the distribution zip files -->
<zip destfile="${dist}/brewday_${mclachlan.brewday.version}.zip"
basedir="${zipdist}/.." level="9"/>
</target>
<!--======================================================================-->
<target name="dist" depends="zipdist"/>
</project>