forked from open-osrs/launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-win32.sh
52 lines (41 loc) · 1.78 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
#!/bin/bash
set -e
JDK_VER="11.0.8"
JDK_BUILD="10"
JDK_BUILD_SHORT="10"
PACKR_VERSION="runelite-1.3"
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 "f200fb7088dbb5e61e0835fe7b0d7fc1310beda192dacd764927567dcd7c4f0f packr_${PACKR_VERSION}.jar" | sha256sum -c
java -jar packr_${PACKR_VERSION}.jar \
packr/win-x86-config.json
# modify packr exe manifest to enable Windows dpi scaling
resourcehacker \
-open native-win32/OpenOSRS.exe \
-save native-win32/OpenOSRS.exe \
-action addoverwrite \
-res packr/openosrs.manifest \
-mask MANIFEST,1,
# packr on Windows doesn't support icons, so we use resourcehacker to include it
resourcehacker \
-open native-win32/OpenOSRS.exe \
-save native-win32/OpenOSRS.exe \
-action add \
-res openosrs.ico \
-mask ICONGROUP,MAINICON,
# We use the filtered iss file
iscc build/filtered-resources/openosrs32.iss