-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
67 lines (55 loc) · 1.2 KB
/
build.sh
File metadata and controls
67 lines (55 loc) · 1.2 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
#! /bin/bash
plat="linux"
arc="x64"
arch=$(uname -m)
if [[ $OSTYPE == darwin* ]]; then
plat="macos"
fi
if [[ "$arch" == arm* ]] || [[ "$arch" == aarch64 ]]; then
arc="arm64"
fi
mkdir -p bin
mkdir -p bin/screens
mkdir -p bin/themes
echo $plat-$arc
echo -n "Building setup..."
cd setup
gcc setup.c ../common/common.c -o setup
if [ $? -eq 0 ]; then
echo -e "\033[32;1mOK\033[0m"
else
echo -n "Result: "
echo $?
exit $?
fi
cp setup ../bin
cd ..
echo -n "Building umrc-bridge..."
cd umrc-bridge
gcc bridge.c ../common/common.c -o umrc-bridge -lssl -lcrypto
if [ $? -eq 0 ]; then
echo -e "\033[32;1mOK\033[0m"
else
echo -n "Result: "
echo $?
exit $?
fi
cp umrc-bridge ../bin
cd ..
echo -n "Building umrc-client..."
cd umrc-client
gcc main.c func.c ../common/common.c -o umrc-client -L ../lib/odoors/$plat-$arc -lODoors
if [ $? -eq 0 ]; then
echo -e "\033[32;1mOK\033[0m"
else
echo -n "Result: "
echo $?
exit $?
fi
cp umrc-client ../bin
cd ..
echo "Copying assets..."
cp -r ./assets/$plat/* ./bin/
cp -r ./assets/screens/* ./bin/screens/
cp -r ./assets/themes/* ./bin/themes/
echo -e "All jobs done. Check the \033[32;1mbin\033[0m subdirectory for the output files."