-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommon.sh
More file actions
85 lines (72 loc) · 1.82 KB
/
common.sh
File metadata and controls
85 lines (72 loc) · 1.82 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
#!/sr/bin/env bash
if [ -z "${DYNAMO_HOME}" ]; then
echo "No DYNAMO_HOME found. Setting it to '.'"
DYNAMO_HOME=.
fi
if [ -z "${BOB}" ]; then
BOB=${DYNAMO_HOME}/share/java/bob.jar
fi
if [ -z "${SERVER}" ]; then
SERVER=https://build.defold.com
fi
if [ -z "${LOOPCOUNT}" ]; then
LOOPCOUNT=10
fi
PLATFORM=$1
shift
if [ -z "${PLATFORM}" ]; then
echo "No platform argument specified"
exit 1
fi
if [ -z "${VARIANT}" ]; then
VARIANT=debug
fi
echo "Using BOB=${BOB}"
echo "Using SERVER=${SERVER}"
echo "Using PLATFORM=${PLATFORM}"
echo "Using VARIANT=${VARIANT}"
echo ""
echo "Test params:"
echo "Using LOOPCOUNT=${LOOPCOUNT}"
if [ ! -e "${BOB}" ]; then
echo "BOB=${BOB} does not exist"
exit 1
fi
function gen_app_manifest {
local feature=$1
local output=$2
case ${feature} in
"all")
excludes="[]"
;;
"vanilla")
excludes="['ExtensionCSharp', 'ExtensionCPP', 'ExtensionZig']"
;;
"zig")
excludes="['ExtensionCSharp', 'ExtensionCPP']"
;;
"cpp")
excludes="['ExtensionCSharp', 'ExtensionZig']"
;;
"csharp")
excludes="['ExtensionCPP', 'ExtensionZig']"
;;
esac
echo "#generated, do not edit!" > ${output}
echo "platforms:" >> ${output}
echo " common:" >> ${output}
echo " context:" >> ${output}
echo " excludeSymbols: ${excludes}" >> ${output}
echo "" >> ${output}
echo "Wrote ${output}"
}
function gen_settings {
local feature=$1
local output=$2
echo "[native_extension]" > ${SETTINGS}
echo "app_manifest=${APP_MANIFEST}" >> ${SETTINGS}
echo "[test]" >> ${SETTINGS}
echo "perf_test=1" >> ${SETTINGS}
echo "loopcount=${LOOPCOUNT}" >> ${SETTINGS}
echo "Wrote ${SETTINGS}"
}