-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_linux_dummy.sh
More file actions
53 lines (35 loc) · 873 Bytes
/
build_linux_dummy.sh
File metadata and controls
53 lines (35 loc) · 873 Bytes
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
#!/bin/bash
## Dependencies
# install dependencies
if [[ " $@ " =~ " --dependencies " ]]; then
if [[ -f /etc/debian_version ]]; then
# Debian/Ubuntu/Raspbian
sudo apt install -y g++
elif [[ -f /etc/arch-release ]]; then
# Arch/Manjaro
sudo pacman -S --noconfirm base-devel
else
echo "unable to install dependencies - unsupported system"
fi
fi
## Prepare
# construct version string
BUILD="HUI-linux-$(uname -m)-dummy"
# create target directory
mkdir -p $BUILD
cd $BUILD
## Build
# build
g++ -shared -fPIC -o ./libHUI.so ../hui_webview__dummy.cc -I..
## Deploy
if [[ " $@ " =~ " --deploy " ]]; then
# TODO: linux packaging; AUR package, pkg config file
echo "deploying not supported"
fi
## Tests
if [[ " $@ " =~ " --tests " ]]; then
# build tests
g++ -o test_webview_js_api ../tests/test_webview_js_api.cc -I.. -L. -lHUI
fi
## Notes
cd ..