1 | #!/bin/bash
|
---|
2 |
|
---|
3 | set -Eeou pipefail
|
---|
4 |
|
---|
5 | # Don't show one time passwords
|
---|
6 | set +x
|
---|
7 |
|
---|
8 | if [ -z "${1-}" ]
|
---|
9 | then
|
---|
10 | echo "Usage: $0 josm_revision"
|
---|
11 | exit 1
|
---|
12 | fi
|
---|
13 |
|
---|
14 | echo "Building JOSM.app"
|
---|
15 |
|
---|
16 | mkdir app
|
---|
17 |
|
---|
18 | JPACKAGEOPTIONS=""
|
---|
19 |
|
---|
20 | echo "Building app"
|
---|
21 | jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
|
---|
22 | --main-class org.openstreetmap.josm.gui.MainApplication \
|
---|
23 | --icon ./native/windows/logo.ico --type app-image --dest app \
|
---|
24 | --java-options "--add-exports=java.base/sun.security.action=ALL-UNNAMED" \
|
---|
25 | --java-options "--add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED" \
|
---|
26 | --java-options "--add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED" \
|
---|
27 | --java-options "--add-opens=java.base/java.lang=ALL-UNNAMED" \
|
---|
28 | --java-options "--add-opens=java.base/java.nio=ALL-UNNAMED" \
|
---|
29 | --java-options "--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED" \
|
---|
30 | --java-options "--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED" \
|
---|
31 | --java-options "--add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED" \
|
---|
32 | --java-options "--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED" \
|
---|
33 | --java-options "--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED" \
|
---|
34 | --app-version "$1" \
|
---|
35 | --copyright "JOSM, and all its integral parts, are released under the GNU General Public License v2 or later" \
|
---|
36 | --vendor "https://josm.openstreetmap.de" \
|
---|
37 | --file-associations native/file-associations/bz2.properties \
|
---|
38 | --file-associations native/file-associations/geojson.properties \
|
---|
39 | --file-associations native/file-associations/gpx.properties \
|
---|
40 | --file-associations native/file-associations/gz.properties \
|
---|
41 | --file-associations native/file-associations/jos.properties \
|
---|
42 | --file-associations native/file-associations/joz.properties \
|
---|
43 | --file-associations native/file-associations/osm.properties \
|
---|
44 | --file-associations native/file-associations/zip.properties \
|
---|
45 | --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.management,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.sql,java.transaction.xa,java.xml,jdk.crypto.ec,jdk.jfr,jdk.jsobject,jdk.unsupported,jdk.unsupported.desktop,jdk.xml.dom
|
---|
46 |
|
---|
47 | echo "Building done."
|
---|