forked from logisim-evolution/logisim-evolution
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.xml
198 lines (174 loc) · 9.19 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!--
logisim-evolution : Ant build configuration file
Original code by Adrien Lescourt - 10.2011
-->
<project name="logisim-evolution" default="compile" basedir="."
xmlns:fx="javafx:com.sun.javafx.tools.ant">
<property name="app.name" value="Logisim-evolution"/>
<property name="app.version" value="2.14.6.1"/>
<target name="cleanall" depends="clean">
<delete dir="bin/com/bfh/"/>
<delete dir="bin/com/cburch/"/>
<delete dir="bin/com/hepia/"/>
<delete dir="bin/edu/cornell"/>
</target>
<target name="clean">
<delete file="logisim-evolution.jar"/>
<delete file="logisim-evolution_src.jar"/>
<delete file="package/logisim-evolution.jar"/>
<delete file="package/${app.name}.jnlp"/>
<delete file="package/${app.name}_browser.jnlp"/>
<delete file="package/${app.name}.html"/>
<delete dir="package/bundles"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="bin"/>
<javac srcdir="src" includeantruntime="false" destdir="bin" source="1.7" target="1.7" classpath="libs/colorpicker.jar:libs/fontchooser.jar:libs/jh.jar:libs/MRJAdapter.jar:libs/nimrodlf.jar:libs/rsyntaxtextarea.jar:libs/logback-classic-1.1.2.jar:libs/logback-core-1.1.2.jar:libs/slf4j-api-1.7.8.jar:libs/junit-4.12.jar:libs/hamcrest-core-1.3.jar" />
</target>
<target name="jar" depends="compile">
<jar destfile="logisim-evolution.jar">
<fileset dir="bin" excludes="resources/ libs/ javax/ doc/ boards_model/"/>
<fileset dir="." includes="doc/ resources/" excludes="doc/**/html/guide/analyze/" />
<zipgroupfileset dir="libs" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.cburch.logisim.Main"/>
</manifest>
</jar>
</target>
<target name="jarsrc" depends="jar">
<jar destfile="Logisim_src.jar">
<fileset dir="bin" />
<fileset dir="." includes="doc/ src/ build.xml publi/" />
<zipgroupfileset dir="libs" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.cburch.logisim.Main"/>
</manifest>
</jar>
</target>
<target name="jar_all" depends="compile">
<patch patchfile="main.patch" originalfile="src/com/cburch/logisim/Main.java"/>
<jar destfile="logisim-evolution.jar">
<fileset dir="bin" excludes="resources/ libs/ javax/ doc/ boards_model/"/>
<fileset dir="." includes="doc/ resources/" />
<zipgroupfileset dir="libs" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.cburch.logisim.Main"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="logisim-evolution.jar" fork="true"/>
</target>
<target name="run_all" depends="jar">
<java jar="logisim-evolution.jar" fork="true"/>
</target>
<target name="macos_info_plist">
<exec executable="/usr/libexec/PlistBuddy">
<arg value="-c"/>
<arg value="SET :CFBundleVersion ${app.version}"/>
<arg value="package/macosx/Info.plist"/>
</exec>
<exec executable="/usr/libexec/PlistBuddy">
<arg value="-c"/>
<arg value="SET :CFBundleShortVersionString ${app.version}"/>
<arg value="package/macosx/Info.plist"/>
</exec>
</target>
<!-- Task package will fail on macOS High Sierra while generating a DMG
due to bug JDK-8190758. Use task package_macos instead to generate
an app bundle. -->
<target name="package" depends="jar,macos_info_plist">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath=".:${java.home}/../lib/ant-javafx.jar"/>
<fx:deploy width="600" height="400"
embeddedWidth="100%" embeddedHeight="100%"
outdir="${basedir}/package"
outfile="${app.name}"
nativeBundles="all"
signBundle="false"
verbose="true">
<fx:application name="${app.name}"
mainClass="com.cburch.logisim.Main"
version="${app.version}"
toolkit="swing"
/>
<!-- Package only application and dependencies but not the JRE -->
<!-- Unfortunately, removed in JDK 9. No workaround known yet. -->
<fx:platform basedir=""/>
<fx:resources>
<fx:fileset dir="." includes="logisim-evolution.jar"/>
</fx:resources>
<fx:info title="${app.name}"
vendor="${app.name} development team"
description="${app.name} for design and simulation of digital logic circuits"
category="Engineering"
copyright="Copyright (C) 2001--2018 Carl Burch, BFH, HEIG-VD, HEPIA, et al."
license="GNU GENERAL PUBLIC LICENSE, version 3"
>
<fx:association extension="circ" mimetype="application-prs.cburch.logisim" description="${app.name} circuit file"/>
</fx:info>
<fx:bundleArgument arg="email" value="roberto.rigamonti@heig-vd.ch"/>
<fx:bundleArgument arg="linux.bundleName" value="logisim-evolution"/>
<!-- See https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8 for list of AppStore categories -->
<fx:bundleArgument arg="mac.category" value="public.app-category.education"/>
<fx:bundleArgument arg="mac.CFBundleName" value="Logisim"/>
<fx:bundleArgument arg="mac.CFBundleIdentifier" value="com.cburch.logisim"/>
<fx:bundleArgument arg="win.menuGroup" value="Engineering"/>
<fx:bundleArgument arg="dropinResourcesRoot" value="${basedir}"/>
<fx:preferences install="true"
installDirChooser="true"
menu="true"/>
</fx:deploy>
</target>
<!-- DMG generation is broken on macOS High Sierra, cf. to
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8190758 for
details. Problem is only fixed in JDK 8u162 and the upcoming JDK 10.
There is no fix for JDK 9. This task package_macos works around the
problem by only generating a pkg installer. -->
<target name="package_macos" depends="jar">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath=".:${java.home}/lib/ant-javafx.jar"/>
<fx:deploy width="600" height="400"
embeddedWidth="100%" embeddedHeight="100%"
outdir="${basedir}/package"
outfile="${app.name}"
nativeBundles="pkg"
signBundle="false"
verbose="true">
<fx:application name="${app.name}"
mainClass="com.cburch.logisim.Main"
version="${app.version}"
toolkit="swing"
/>
<!-- Package only application and dependencies but not the JRE -->
<!-- Unfortunately, removed in JDK 9. No workaround known yet. -->
<!-- <fx:platform basedir=""/> -->
<fx:resources>
<fx:fileset dir="." includes="logisim-evolution.jar"/>
</fx:resources>
<fx:info title="${app.name}"
vendor="${app.name} development team"
description="${app.name} for design and simulation of digital logic circuits"
category="Engineering"
copyright="Copyright (C) 2001--2018 Carl Burch, BFH, HEIG-VD, HEPIA, et al."
license="GNU GENERAL PUBLIC LICENSE, version 3"
>
<fx:association extension="circ" mimetype="application-prs.cburch.logisim" description="${app.name} circuit file"/>
</fx:info>
<fx:bundleArgument arg="email" value="roberto.rigamonti@heig-vd.ch"/>
<fx:bundleArgument arg="linux.bundleName" value="logisim-evolution"/>
<!-- See https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8 for list of AppStore categories -->
<fx:bundleArgument arg="mac.category" value="public.app-category.education"/>
<fx:bundleArgument arg="mac.CFBundleName" value="Logisim"/>
<fx:bundleArgument arg="mac.CFBundleIdentifier" value="com.cburch.logisim"/>
<fx:bundleArgument arg="win.menuGroup" value="Engineering"/>
<fx:bundleArgument arg="signBundle" value="false"/>
<fx:bundleArgument arg="dropinResourcesRoot" value="${basedir}"/>
<fx:preferences install="true"
installDirChooser="true"
menu="true"/>
</fx:deploy>
</target>
</project>