forked from squirrel-sql-client/squirrel-sql-code
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
125 lines (101 loc) · 4.28 KB
/
build.xml
File metadata and controls
125 lines (101 loc) · 4.28 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
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
<project name="SQuirreLSQLFX" default="buildAll" basedir=".">
<!-- JavaFX 11+ SDK directory is needed for compiling -->
<property name="javafx.sdk.dir" value="C:/dev/javafx-sdk-11.0.2"/>
<!-- use JDK11+ for compiling & running -->
<property name="targetVM" value="11"/>
<target name="cleanAllAndInit" description="cleanAllAndInit">
<tstamp/> <!-- Needed to initialize DSTAMP and TSTAMP variables-->
<!-- DEFINE VERSION ONLY HERE -->
<!--<property name="squirrelsqlfx.version" value="0."/>-->
<property name="squirrelsqlfx.version" value="snapshot-${DSTAMP}_${TSTAMP}"/>
<delete dir="output"/>
<mkdir dir="output/work/bin"/>
<mkdir dir="output/dist"/>
<mkdir dir="output/dist/doc"/>
<mkdir dir="output/dist/lib"/>
<mkdir dir="output/plainZip/work"/>
</target>
<path id="core.lib.classpath">
<fileset dir="core/lib">
<include name="**/*" />
<exclude name="versioncheck.jar" />
</fileset>
</path>
<path id="build.classpath">
<path refid="core.lib.classpath"/>
<fileset dir="${javafx.sdk.dir}/lib">
<include name="*.jar" />
</fileset>
</path>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="core.lib.classpath"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.jar" to="lib/*.jar"/>
</chainedmapper>
</mapper>
</pathconvert>
<target name="buildAll" description="buildAll" depends="cleanAllAndInit">
<antcall target="compileCore"/>
<antcall target="createPlainZip"/>
</target>
<target name="createPlainZip" description="createPlainZip">
<delete dir="output/plainZip/work"/>
<property name="plainZipName" value="squirrelsqlfx-${squirrelsqlfx.version}-portable"/>
<mkdir dir="output/plainZip/work/${plainZipName}"/>
<copy todir="output/plainZip/work/${plainZipName}">
<fileset dir="output/dist">
<include name="**/*" />
</fileset>
</copy>
<zip destfile="output/plainZip/${plainZipName}.zip" basedir="output/plainZip/work"/>
</target>
<target name="compileCore" description="compileCore">
<javac source="${targetVM}" target="${targetVM}"
srcdir="core/src" destdir="output/work/bin" classpathref="build.classpath" debug="true"/>
<copy todir="output/work/bin">
<fileset dir="core/src">
<exclude name="**/*.java" />
</fileset>
</copy>
<replace file="output/work/bin/org/squirrelsql/splash/Version.properties" token="squirrelsql.version.value" value="${squirrelsqlfx.version}"/>
<jar jarfile="output/dist/squirrel-sql-fx.jar" basedir="output/work/bin">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="org.squirrelsql.Main"/>
<attribute name="Class-Path" value="${manifest.classpath}"/>
</manifest>
</jar>
<copy todir="output/dist/lib">
<fileset dir="core/lib">
<include name="**/*" />
<exclude name="versioncheck.jar" />
</fileset>
</copy>
<copy todir="output/dist/versioncheck">
<fileset dir="core/lib">
<include name="versioncheck.jar" />
</fileset>
</copy>
<copy todir="output/dist/">
<fileset dir="launcher">
<include name="**/*" />
</fileset>
</copy>
<copy todir="output/dist/doc">
<fileset dir="core/doc">
<include name="**/*" />
</fileset>
</copy>
<copy todir="output/dist/icons" file="output/work/bin/org/squirrelsql/globalicons/splash.jpg" />
<zip destfile="output/dist/doc/src.jar" basedir="core/src"/>
</target>
<target name="runApp" description="Run SquirrelSQLFX">
<java jar="output/dist/squirrel-sql-fx.jar" fork="true" dir="output/dist"
modulepath="${javafx.sdk.dir}/lib">
<jvmarg value="--add-modules"/>
<jvmarg value="ALL-MODULE-PATH"/>
</java>
</target>
</project>