-
Notifications
You must be signed in to change notification settings - Fork 15
/
build-linux-x86_64.sh
60 lines (43 loc) · 1.53 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
#!/bin/bash
set -e
pushd native
cmake -B build-x64 .
cmake --build build-x64 --config Release
popd
APPIMAGE_VERSION="13"
umask 022
source .jdk-versions.sh
rm -rf build/linux-x64
mkdir -p build/linux-x64
if ! [ -f linux64_jre.tar.gz ] ; then
curl -Lo linux64_jre.tar.gz $LINUX_AMD64_LINK
fi
echo "$LINUX_AMD64_CHKSUM linux64_jre.tar.gz" | 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 target/Elvarg.jar
cp native/build-x64/src/Elvarg build/linux-x64/
cp target/Elvarg.jar build/linux-x64/
cp packr/linux-x64-config.json build/linux-x64/config.json
cp target/filtered-resources/app.desktop build/linux-x64/
cp appimage/app.png build/linux-x64/
tar zxf linux64_jre.tar.gz
mv jdk-$LINUX_AMD64_VERSION-jre build/linux-x64/jre
pushd build/linux-x64/
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 -> RuneLite
ln -s Elvarg AppRun
# Ensure RuneLite is executable to all users
chmod 755 Elvarg
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 "df3baf5ca5facbecfc2f3fa6713c29ab9cefa8fd8c1eac5d283b79cab33e4acb appimagetool-x86_64.AppImage" | sha256sum -c
./appimagetool-x86_64.AppImage \
build/linux-x64/ \
Elvarg.AppImage