forked from logisim-evolution/logisim-evolution
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathbuild.xml
134 lines (111 loc) · 5.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
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
<!--
logisim-evolution : Ant build configuration file
Original code by Adrien Lescourt - 10.2011
Notes on Java Versions [4 Feb 2019]:
We now make extensive use of Java 8 features (e.g. default methods in
interfaces). Unfortunately, the com.apple.eawt classes that we rely on for Mac
OS compatability are not available for Java 8, and it does not seem likely they
ever will be available for Java 8 or any later versions of Java. The
recommendation appears to be to instead migrate to Java 9's where there is
built-in support (e.g. "Desktop" classes) for most of the things com. Recent
license changes by Oracle, however, seem to mean we can't make use of Oracle's
commercial license JDK version 8+ with long term support. Their nearly
functionally identical build of the OpenJDK version 8+ would work, but each
version of that will be supported for apparently only six months and perhaps not
even be available after that. I can't support version migration that often.
Among OpenJDK version 8+ builds, it seems there are several reasonable choices
that will provide 3+ years of security patches and long-term
support/availability: Azul, Amazon's Corretta, AdoptOpenJDK, RedHat, etc. There
does not appear to be significant distinguishing factors here, so I will be
using AdoptOpenJDK for now. This leaves the choice of version. Java 8 is
techically a LTS release, and Java 9, 10, and 11 are not. On the other hand,
Java 11 seems to be where the activity is, and should make future migrations
easier.
In summary:
- Java 7 and below: lack functional interfaces, default methods, etc.
- Java 8: missing support for com.apple.eawt needed for Mac OS builds.
- Oracle JDK 9+: incompatible license terms.
- Oracle OpenJDK 9+ builds: no long-term patches, uncertain availability.
- AdoptOpenJDK (or other third-party) OpenJDK 9 or 10 build: fine.
- AdoptOpenJDK (or other third-party) OpenJDK 11 build: best, most recent.
Updates on Java Versions [19 June 2023]:
Java 17 is the most recent LTS release, with Java 21 for release September 2023.
When it comes to AArch64 support, Java 17 appears to have better support than
Java 11 In simple trials, there appears to be no performance improvement when
compiling against version 17 versus version 11. Therefore, development will now
target Java 17, though the binaries will still be compiled using language
version 11 to allow for some backwards compatibility when using the JAR release.
In brief testing, there does not seem to be a significant difference in behavior
or simulation speed.
AdoptOpenJDK has been renamed to Adoptium, with the JDK named temurin
In summary:
- Adoptium's temurin OpenJDK 17 build: current recommended execution JDK.
- Any Java 11 or higher JDK: acceptable for executing JAR.
Updates on Java Versions [9 January 2025]:
Now developing on OpenJDK Temurin 21, but still compiling jar with release="11".
-->
<project name="logisim-evolution">
<target name="cleanall" depends="clean">
<delete dir="bin/com/bfh/"/>
<delete dir="bin/com/cburch/"/>
<delete dir="bin/com/hepia/"/>
</target>
<target name="clean">
<delete file="logisim-evolution.jar"/>
<delete file="logisim-evolution-src.jar"/>
<delete file="src/com/cburch/logisim/gui/start/MacOsAdapter.java"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="bin"/>
<depend srcdir="src" destdir="bin" cache="depcache" closure="no"/>
<javac srcdir="src" includeantruntime="false" destdir="bin" debug="true" release="11" classpath="libs/xswingx.jar:libs/lablib-checkboxtree-3.3.jar:libs/colorpicker.jar:libs/fontchooser.jar:libs/rsyntaxtextarea-stripped.jar">
<compilerarg line="-Xmaxerrs 10000"/>
<!-- <compilerarg line="-Xlint:unchecked"/> -->
<compilerarg line="-Xlint:deprecation"/>
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="logisim-evolution.jar">
<fileset dir="bin" />
<fileset dir="." includes="doc/ resources/" />
<zipgroupfileset dir="libs" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.cburch.logisim.Main"/>
<attribute name="Add-Opens" value="java.desktop/com.apple.eawt.event"/>
</manifest>
</jar>
</target>
<target name="jarsrc" depends="jar">
<jar destfile="logisim-evolution-src.jar">
<fileset dir="bin" />
<fileset dir="." includes="doc/ src/ build.xml" />
<zipgroupfileset dir="libs" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="com.cburch.logisim.Main"/>
<attribute name="Add-Opens" value="java.desktop/com.apple.eawt.event"/>
<attribute name="Add-Opens" value="java.desktop/com.microsoft.eawt.event"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="logisim-evolution.jar" fork="true"/>
</target>
<target name="helpdocs">
<antcall target="helpdocs_for_lang"><param name="lang" value="de"/></antcall>
<antcall target="helpdocs_for_lang"><param name="lang" value="el"/></antcall>
<antcall target="helpdocs_for_lang"><param name="lang" value="en"/></antcall>
<antcall target="helpdocs_for_lang"><param name="lang" value="es"/></antcall>
<antcall target="helpdocs_for_lang"><param name="lang" value="fr"/></antcall>
<antcall target="helpdocs_for_lang"><param name="lang" value="pt"/></antcall>
<antcall target="helpdocs_for_lang"><param name="lang" value="ru"/></antcall>
</target>
<target name="helpdocs_for_lang">
<exec dir="doc" executable="jhindexer">
<arg value="-locale"/>
<arg value="${lang}"/>
<arg value="-db"/>
<arg value="search_lookup_${lang}"/>
<arg value="${lang}"/>
</exec>
</target>
</project>