-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathbuild-linux-x86_64.sh
executable file
·63 lines (47 loc) · 2.17 KB
/
build-linux-x86_64.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
#!/bin/bash
set -e
JDK_VER="11.0.8"
JDK_BUILD="10"
PACKR_VERSION="runelite-1.3"
APPIMAGE_VERSION="12"
umask 022
if ! [ -f OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz ] ; then
curl -Lo OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz \
https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-${JDK_VER}%2B${JDK_BUILD}/OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz
fi
echo "98615b1b369509965a612232622d39b5cefe117d6189179cbad4dcef2ee2f4e1 OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz" | sha256sum -c
# packr requires a "jdk" and pulls the jre from it - so we have to place it inside
# the jdk folder at jre/
if ! [ -d linux-jdk ] ; then
tar zxf OpenJDK11U-jre_x64_linux_hotspot_${JDK_VER}_${JDK_BUILD}.tar.gz
mkdir linux-jdk
mv jdk-$JDK_VER+$JDK_BUILD-jre linux-jdk/jre
fi
if ! [ -f packr_${PACKR_VERSION}.jar ] ; then
curl -Lo packr_${PACKR_VERSION}.jar \
https://github.com/runelite/packr/releases/download/${PACKR_VERSION}/packr.jar
fi
echo "f200fb7088dbb5e61e0835fe7b0d7fc1310beda192dacd764927567dcd7c4f0f packr_${PACKR_VERSION}.jar" | sha256sum -c
# Note: Host umask may have checked out this directory with g/o permissions blank
chmod -R u=rwX,go=rX appimage
# ...ditto for the build process
chmod 644 build/libs/OpenOSRS-shaded.jar
java -jar packr_${PACKR_VERSION}.jar \
packr/linux-x64-config.json
pushd native-linux-x86_64/OpenOSRS.AppDir
mkdir -p jre/lib/amd64/server/
ln -s ../../server/libjvm.so jre/lib/amd64/server/ # packr looks for libjvm at this hardcoded path
# Symlink AppRun -> OpenOSRS
ln -s OpenOSRS AppRun
# Ensure OpenOSRS is executable to all users
chmod 755 OpenOSRS
popd
if ! [ -f appimagetool-x86_64.AppImage ] ; then
curl -Lo appimagetool-x86_64.AppImage \
https://github.com/AppImage/AppImageKit/releases/download/$APPIMAGE_VERSION/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
fi
echo "d918b4df547b388ef253f3c9e7f6529ca81a885395c31f619d9aaf7030499a13 appimagetool-x86_64.AppImage" | sha256sum -c
./appimagetool-x86_64.AppImage \
native-linux-x86_64/OpenOSRS.AppDir/ \
native-linux-x86_64/OpenOSRS.AppImage