-
Notifications
You must be signed in to change notification settings - Fork 105
/
bootstrap.sh
executable file
·112 lines (87 loc) · 2.39 KB
/
bootstrap.sh
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
#!/bin/bash -e
#
# Configuration
#
DMGDIR=dist/dmg
L4JVER=3.50
L4JDIR=dist/launch4j
JDKDIR=dist/jdks
LIPOVER=0.8.4
LIPODIR=dist/lipo
#
# Donwload and unpack JDKs
#
mkdir -p "$JDKDIR"
pushd "$JDKDIR"
ZULU_URL='https://cdn.azul.com/zulu/bin'
TEMURIN_URL='https://github.com/adoptium/temurin23-binaries/releases/download'
TEMURIN_VERSION=jdk-23.0.1+11
TEMURIN_FILENAME_VERSION=23.0.1_11
BELLSOFT_URL='https://download.bell-sw.com/java/23.0.1%2B13'
BELLSOFT_VERSION=23.0.1+13
BELLSOFT_DIR=jdk-23.0.1
BELLSOFT_WIN32_URL='https://download.bell-sw.com/java/21.0.5%2B11'
BELLSOFT_WIN32_VERSION=21.0.5+11
BELLSOFT_WIN32_DIR=jdk-21.0.5
# Windows x86_32
filename="bellsoft-jdk$BELLSOFT_WIN32_VERSION-windows-i586.zip"
curl -O "$BELLSOFT_WIN32_URL/$filename"
unzip $filename
mv $BELLSOFT_WIN32_DIR windows-x86_32
# Windows x86_64
filename="OpenJDK23U-jdk_x64_windows_hotspot_$TEMURIN_FILENAME_VERSION.zip"
curl -L -O "$TEMURIN_URL/$TEMURIN_VERSION/$filename"
unzip $filename
mv $TEMURIN_VERSION windows-x86_64
# Windows aarch64
filename="bellsoft-jdk$BELLSOFT_VERSION-windows-aarch64.zip"
curl -O "$BELLSOFT_URL/$filename"
unzip $filename
mv $BELLSOFT_DIR windows-aarch64
# MacOS x86_64
filename="OpenJDK23U-jdk_x64_mac_hotspot_$TEMURIN_FILENAME_VERSION.tar.gz"
curl -L -O "$TEMURIN_URL/$TEMURIN_VERSION/$filename"
mkdir macos-x86_64
tar -C macos-x86_64 --strip-components=1 -xvf $filename
# MacOS aarch64
filename="OpenJDK23U-jdk_aarch64_mac_hotspot_$TEMURIN_FILENAME_VERSION.tar.gz"
curl -L -O "$TEMURIN_URL/$TEMURIN_VERSION/$filename"
mkdir macos-aarch64
tar -C macos-aarch64 --strip-components=1 -xvf $filename
popd
#
# Download lipo
#
mkdir -p "$LIPODIR"
pushd "$LIPODIR"
wget https://github.com/konoui/lipo/releases/download/v${LIPOVER}/lipo_linux_amd64
chmod a+x lipo_linux_amd64
popd
#
# Download and unpack launch4j
#
mkdir -p "$L4JDIR"
pushd "$L4JDIR"
wget https://downloads.sourceforge.net/project/launch4j/launch4j-3/${L4JVER}/launch4j-${L4JVER}-linux-x64.tgz
tar -xvf launch4j-${L4JVER}-linux-x64.tgz
# check if script is still broken in next release after 3.50
# see https://sourceforge.net/p/launch4j/bugs/227/
dos2unix launch4j/launch4j
popd
#
# Compile dmg
#
mkdir -p "$DMGDIR"
pushd "$DMGDIR"
if [ ! -d libdmg-hfsplus ]; then
git clone https://github.com/vassalengine/libdmg-hfsplus.git
fi
pushd libdmg-hfsplus
cmake . -B build
make -C build/dmg VERBOSE=1
popd
popd
#
# Set up Maven Wrapper
#
mvn wrapper:wrapper