-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_dev.sh
More file actions
executable file
·39 lines (28 loc) · 1.07 KB
/
build_dev.sh
File metadata and controls
executable file
·39 lines (28 loc) · 1.07 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
#!/bin/bash
# Google Secret
if [ -n "$FRUITON_GOOGLE_SECRET" ]; then
echo "$FRUITON_GOOGLE_SECRET" > FruitonClient/Assets/Resources/Google/google_client_secret.txt
else
echo "Build failed: No Google secret specified!"
exit 1
fi
./clean.sh
# Kernel
echo "Compiling kernel..."
FRUITON_CLIENT_LOC=`pwd`
KERNEL_DEST=${FRUITON_CLIENT_LOC}/FruitonClient/Assets/Scripts/Kernel/Generated
mkdir -p ${KERNEL_DEST}
UNITY_RESOURCES_LOC=${FRUITON_CLIENT_LOC}/FruitonClient/Assets/Resources
KERNEL_RESOURCES_LOC=${UNITY_RESOURCES_LOC}/Kernel
mkdir -p ${KERNEL_RESOURCES_LOC}
cd ${KERNEL_LOC}
haxe --macro include\(\'fruiton\'\,true\,\[\'fruiton.fruitDb.models\'\,\'fruiton.macro\'\]\) -D no-compilation -D no-root -cs ${KERNEL_DEST} -cp ${KERNEL_LOC} fruiton.kernel.Kernel
cp -r ${KERNEL_LOC}/resources/* ${KERNEL_RESOURCES_LOC}/
cd ${FRUITON_CLIENT_LOC}
# Protobufs
echo "Compiling protobufs..."
PROTO_DEST="FruitonClient/Assets/Scripts/Protobufs"
mkdir -p ${PROTO_DEST}
for proto_file in ${PROTO_LOC}/*.proto; do
protoc --csharp_out=${PROTO_DEST} --proto_path=${PROTO_LOC} ${proto_file}
done