forked from runelite/launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-win32.sh
69 lines (58 loc) · 2.17 KB
/
build-win32.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
#!/bin/bash
set -e
JDK_VER="11.0.8"
JDK_BUILD="10"
JDK_BUILD_SHORT="10"
PACKR_VERSION="runelite-1.0"
if ! [ -f OpenJDK11U-jre_x86-32_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip ] ; then
curl -Lo OpenJDK11U-jre_x86-32_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip \
https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-${JDK_VER}%2B${JDK_BUILD}/OpenJDK11U-jre_x86-32_windows_hotspot_${JDK_VER}_${JDK_BUILD_SHORT}.zip
fi
echo "00e0eb7112a4cdbaae663110e4c7af6377d2fa01f69c20222790293b4f427f26 OpenJDK11U-jre_x86-32_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip" | 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 win32-jdk ] ; then
unzip OpenJDK11U-jre_x86-32_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip
mkdir win32-jdk
mv jdk-$JDK_VER+$JDK_BUILD_SHORT-jre win32-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 "18b7cbaab4c3f9ea556f621ca42fbd0dc745a4d11e2a08f496e2c3196580cd53 packr_${PACKR_VERSION}.jar" | sha256sum -c
java -jar packr_${PACKR_VERSION}.jar \
--platform \
windows32 \
--jdk \
win32-jdk \
--executable \
RuneLite \
--classpath \
target/RuneLite.jar \
--mainclass \
net.runelite.launcher.Launcher \
--vmargs \
Drunelite.launcher.nojvm=true \
Xmx512m \
Xss2m \
XX:CompileThreshold=1500 \
Djna.nosys=true \
--output \
native-win32
# modify packr exe manifest to enable Windows dpi scaling
resourcehacker \
-open native-win32/RuneLite.exe \
-save native-win32/RuneLite.exe \
-action addoverwrite \
-res packr/runelite.manifest \
-mask MANIFEST,1,
# packr on Windows doesn't support icons, so we use resourcehacker to include it
resourcehacker \
-open native-win32/RuneLite.exe \
-save native-win32/RuneLite.exe \
-action add \
-res runelite.ico \
-mask ICONGROUP,MAINICON,
# We use the filtered iss file
iscc target/filtered-resources/runelite32.iss