-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.sh
More file actions
94 lines (73 loc) · 3.67 KB
/
build.sh
File metadata and controls
94 lines (73 loc) · 3.67 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
set -e -o pipefail
APP_ID="co.casterlabs.caffeinated"
APP_NAME="Casterlabs-Caffeinated"
MAIN_CLASS="co.casterlabs.caffeinated.bootstrap.Bootstrap"
VM_OPTIONS='--arg=-Xms1M --arg=-XX:+UseCompressedOops --arg=-XX:MaxHeapFreeRatio=2 --arg=-XX:MinHeapFreeRatio=1'
SAUCER4J_VERSION="1a278f1"
if [[ $@ == *"compile"* ]]; then
echo "------------ Compiling app ------------"
cd app
bash ./mvnw clean package
cd ..
echo "------------ Finishing compiling app ---------"
fi
if [[ $@ == *"dist-windows"* ]]; then
echo "------------ Bundling for Windows ------------"
java -jar bundler.jar bundle \
--arch x86_64 --os windows \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 $VM_OPTIONS --main $MAIN_CLASS \
--sign 'cmd.exe /C C:\signing\sign.bat Casterlabs-Caffeinated.exe' \
--file app/core/WMC-JsonConsoleWrapper.exe --dependency "app/core/target/Caffeinated.jar" \
--dependency "https://jitpack.io|com.github.saucer.saucer4j:webview2:$SAUCER4J_VERSION:.jar"
echo "------------ Finished bundling for Windows ------------"
fi
if [[ $@ == *"dist-nosign-windows"* ]]; then
echo "------------ Bundling for Windows ------------"
java -jar bundler.jar bundle \
--arch x86_64 --os windows \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 $VM_OPTIONS --main $MAIN_CLASS \
--file app/core/WMC-JsonConsoleWrapper.exe --dependency "app/core/target/Caffeinated.jar" \
--dependency "https://jitpack.io|com.github.saucer.saucer4j:webview2:$SAUCER4J_VERSION:.jar"
echo "------------ Finished bundling for Windows ------------"
fi
if [[ $@ == *"dist-macos"* ]]; then
echo "------------ Bundling for macOS ------------"
java -jar bundler.jar bundle \
--arch aarch64 --os macos \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-XstartOnFirstThread $VM_OPTIONS --main $MAIN_CLASS \
--dependency "app/core/target/Caffeinated.jar" \
--dependency "https://jitpack.io|com.github.saucer.saucer4j:webkit:$SAUCER4J_VERSION:.jar"
java -jar bundler.jar bundle \
--arch x86_64 --os macos \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 --arg=-XstartOnFirstThread $VM_OPTIONS --main $MAIN_CLASS \
--dependency "app/core/target/Caffeinated.jar" \
--dependency "https://jitpack.io|com.github.saucer.saucer4j:webkit:$SAUCER4J_VERSION:.jar"
echo "------------ Finished bundling for macOS ------------"
fi
if [[ $@ == *"dist-linux"* ]]; then
echo "------------ Bundling for Linux ------------"
java -jar bundler.jar bundle \
--arch aarch64 --os gnulinux \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 $VM_OPTIONS --main $MAIN_CLASS \
--dependency "app/core/target/Caffeinated.jar" \
--dependency "https://jitpack.io|com.github.saucer.saucer4j:webkitgtk:$SAUCER4J_VERSION:.jar"
# java -jar bundler.jar bundle \
# --arch arm --os gnulinux \
# --id $APP_ID --name $APP_NAME --icon icon.png \
# --java 11 $VM_OPTIONS --main $MAIN_CLASS \
# --dependency "app/core/target/Caffeinated.jar" \
# --dependency "https://jitpack.io|com.github.saucer.saucer4j:webkitgtk:$SAUCER4J_VERSION:.jar"
java -jar bundler.jar bundle \
--arch x86_64 --os gnulinux \
--id $APP_ID --name $APP_NAME --icon icon.png \
--java 11 $VM_OPTIONS --main $MAIN_CLASS \
--dependency "app/core/target/Caffeinated.jar" \
--dependency "https://jitpack.io|com.github.saucer.saucer4j:webkitgtk:$SAUCER4J_VERSION:.jar"
echo "------------ Finished bundling for Linux ------------"
fi