-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.web.sh
48 lines (34 loc) · 1.18 KB
/
build.web.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
#!/bin/bash
if [[ "$OSTYPE" == "msys" ]]; then
dir=$PWD
fi
mkdir -p build
pushd build
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
cmake .. -DBUILD_WEB=ON -DWT_INCLUDE="$HOME/wt_install/include" -DWT_CONFIG_H="$HOME/wt_install/include"
elif [[ "$OSTYPE" == "darwin"* ]]; then
cmake .. DBUILD_WEB=ON -DWT_INCLUDE="$HOME/wt_install/include" -DWT_CONFIG_H="$HOME/wt_install/include"
elif [[ "$OSTYPE" == "msys" ]]; then
cmake .. --fresh -DBUILD_WEB=ON -DWT_INCLUDE="$dir/ext/wt-4.10.0/src" -DWT_CONFIG_H="$dir/ext/wt-4.10.0/build"
cmake --build .
fi
cmake --build .
popd
pwd
pushd build
pushd web
remote=$(git config --get remote.origin.url)
echo "remote repository: $remote"
sleep 2
echo "open browser http://localhost:8080"
if [ "$remote" == "https://github.com/pedro-vicente/nostr_client_relay.git" ]; then
export LD_LIBRARY_PATH="$HOME/github/nostr_client_relay/ext/boost_1_82_0/stage/lib":$LD_LIBRARY_PATH
else
export LD_LIBRARY_PATH="$HOME/git/nostr_client_relay/ext/boost_1_82_0/stage/lib":$LD_LIBRARY_PATH
fi
if [[ "$OSTYPE" == "msys"* ]]; then
./Debug/wostro --http-address=0.0.0.0 --http-port=8080 --docroot=.
else
./wostro --http-address=0.0.0.0 --http-port=8080 --docroot=.
fi
exit