-
-
Notifications
You must be signed in to change notification settings - Fork 647
/
build.xml
101 lines (93 loc) · 3.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<project name="tabula" default="build" basedir=".">
<property file="build.properties"/>
<property name="build.dir" value="build"/>
<property name="mac.dir" value="${build.dir}/mac" />
<property name="windows.dir" value="${build.dir}/windows" />
<property name="full_version" value="1.2.1.18052200"/>
<property name="launch4j.dir" location="${build.dir}/../launch4j" />
<property name="launch4j.bindir" location="${build.dir}/../launch4j/bin" />
<target name="check-jar-exists">
<available file="${build.dir}/tabula.jar" property="jar.exists"/>
</target>
<target name="macbundle" depends="check-jar-exists" if="jar.exists">
<mkdir dir="${mac.dir}"/>
<!-- this must be a real JDK -->
<property name="java_home" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home"/>
<taskdef
name="bundleapp"
classname="com.oracle.appbundler.AppBundlerTask"
classpath="${build.dir}/appbundler-1.0.jar"
/>
<bundleapp
outputdirectory="${build.dir}/mac"
name="Tabula"
displayname="Tabula"
identifier="org.nerdpower.tabula.Tabula"
icon="${build.dir}/icons/tabula.icns"
shortversion="${full_version}"
mainclassname="WarMain"
>
<runtime dir="${java_home}" />
<classpath file="${build.dir}/tabula.jar" />
<option value="-Dapple.laf.useScreenMenuBar=true"/>
<option value="-Dwarbler.port=8080"/>
<option value="-Dtabula.openBrowser=true"/>
</bundleapp>
<!--
To allow OSX to use this, you'll need to code sign.
Generate a self-signed "Code Signing" certificate[1], then enter
it in the -s option here and edit below section. Users can then
right-click or Control-click the app and "Open" and then tell OS X to
open anyway[2].
[1]: http://support.apple.com/kb/PH7173
[2]: http://support.apple.com/kb/HT5290
For production builds, you can get rid of "Unidentified Developer"
warnings by having a Mac Developer Account and a cert from[3]. Then
change -s option to something like 'Developer ID Application: Mike Tigas (68QUP6KP2C)',
based on your Developer Account & cert.
[3]: https://developer.apple.com/account/mac/certificate/certificateList.action
-->
<exec executable="codesign" os="Mac OS X">
<arg line="-f -s 'Developer ID Application: Mike Tigas (68QUP6KP2C)' --deep ${build.dir}/mac/Tabula.app" />
<!-- <arg line="-f -s 'Tabula' ${build.dir}/mac/Tabula.app" /> -->
</exec>
</target>
<target name="windows" depends="check-jar-exists" if="jar.exists">
<mkdir dir="${windows.dir}"/>
<taskdef
name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar"
/>
<launch4j bindir="${launch4j.bindir}">
<config
headerType="console"
outfile="${windows.dir}/tabula.exe"
jarPath="tabula.jar"
dontWrapJar="true"
icon="${build.dir}/icons/tabula.ico">
<classPath mainClass="WarMain">
<cp>tabula.jar</cp>
</classPath>
<jre minVersion="1.6.0" jdkPreference="preferJre" initialHeapSize="256" maxHeapSize="1024">
<opt>-Dfile.encoding=utf-8</opt>
<opt>-Dwarbler.port=8080</opt>
<opt>-Dtabula.openBrowser=true</opt>
</jre>
<versionInfo
fileVersion="${full_version}"
txtFileVersion="${full_version}"
fileDescription="tabula"
copyright="© 2012-2020 Manuel Aristarán"
productVersion="${full_version}"
txtProductVersion="${full_version}"
productName="Tabula"
companyName="Tabula Team"
internalName="tabula"
originalFilename="tabula.exe"
/>
</config>
</launch4j>
</target>
</project>