forked from jbx5/devious-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-win64.sh
53 lines (41 loc) · 1.9 KB
/
build-win64.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
#!/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_x64_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip ] ; then
curl -Lo OpenJDK11U-jre_x64_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip \
https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-${JDK_VER}%2B${JDK_BUILD}/OpenJDK11U-jre_x64_windows_hotspot_${JDK_VER}_${JDK_BUILD_SHORT}.zip
fi
echo "fefa05395dbccfe072a8b6fbfebecf797ed81e18cb1aa4ed093c653d316b3f56 OpenJDK11U-jre_x64_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 win64-jdk ] ; then
unzip OpenJDK11U-jre_x64_windows_hotspot_${JDK_VER}_${JDK_BUILD}.zip
mkdir win64-jdk
mv jdk-$JDK_VER+$JDK_BUILD_SHORT-jre win64-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-x64-config.json
# modify packr exe manifest to enable Windows dpi scaling
"C:/Program Files (x86)/Resource Hacker/ResourceHacker.exe" \
-open native-win64/Devious.exe \
-save native-win64/Devious.exe \
-action addoverwrite \
-res packr/unethicalite.manifest \
-mask MANIFEST,1,
# packr on Windows doesn't support icons, so we use resourcehacker to include it
"C:/Program Files (x86)/Resource Hacker/ResourceHacker.exe" \
-open native-win64/Devious.exe \
-save native-win64/Devious.exe \
-action add \
-res unethicalite.ico \
-mask ICONGROUP,MAINICON,
# We use the filtered iss file
"C:/Program Files (x86)/Inno Setup 6/ISCC.exe" build/filtered-resources/unethicalite.iss