-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
asan_run.sh
executable file
·50 lines (43 loc) · 1.83 KB
/
asan_run.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
#! /bin/bash
#####################################
#
# config:
#
java_17_or_newer_dir=/usr/lib/jvm/temurin-22-jdk-amd64/
asan_runtime_lib=/usr/lib/x86_64-linux-gnu/libasan.so.6.0.0
#
#
#
#####################################
# runReleaseDistributable
p=$(pwd)
h=$(echo $HOME)
if [ "$1""x" == "buildx" ]; then
if [ "$2""x" != "1x" ]; then
cp -av resources/common/libffmpeg_av_jni.so__ASAN resources/common/libffmpeg_av_jni.so
cp -av resources/common/libjni_notifications.so__ASAN resources/common/libjni_notifications.so
cp -av resources/common/libjni-c-toxcore.so__ASAN resources/common/libjni-c-toxcore.so
fi
./gradlew -Dorg.gradle.java.home="$java_17_or_newer_dir" packageDistributionForCurrentOS
./gradlew -Dorg.gradle.java.home="$java_17_or_newer_dir" packageUberJarForCurrentOS
fi
# options to log GC stats, and limit memusage a lot
# -XX:+UseG1GC -XX:MinHeapFreeRatio=1 -XX:MaxHeapFreeRatio=1
if [ "$2""x" != "1x" ]; then
LD_PRELOAD="$asan_runtime_lib" \
"$java_17_or_newer_dir"/bin/java -Dapple.awt.application.name=TRIfA \
-Dcom.apple.mrj.application.apple.menu.about.name=TRIfA \
-Dcompose.application.configure.swing.globals=true \
-Dcompose.application.resources.dir="$p"/build/compose/tmp/prepareAppResources \
-Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant \
-cp "$p"/build/compose/jars/trifa_material-linux-x64-1.0.44.jar \
MainKt
else
"$java_17_or_newer_dir"/bin/java -Dapple.awt.application.name=TRIfA \
-Dcom.apple.mrj.application.apple.menu.about.name=TRIfA \
-Dcompose.application.configure.swing.globals=true \
-Dcompose.application.resources.dir="$p"/build/compose/tmp/prepareAppResources \
-Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant \
-cp "$p"/build/compose/jars/trifa_material-linux-x64-1.0.44.jar \
MainKt
fi