-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_setup_development.sh
executable file
·76 lines (59 loc) · 1.32 KB
/
1_setup_development.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
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
#!/bin/bash
### Required software to develop fwww
# g++ and make
if type g++
then
echo "g++ is found, OK"
else
echo "g++ is not found, please install g++"
exit 1
fi
if type make
then
echo "make is found, OK"
else
echo "make is not found, please install make"
exit 1
fi
### start to install and build thirdparty packages
pd=`pwd -P`
echo "Install thirdparty software packages ..."
./setup_thirdparty_packages.sh
echo
### setup web server
cd $pd/setup/sh
./setup_lighttpd_conf_dir.sh
### start to build our library
echo "Build library ..."
cd $pd/src/weblib
make
echo
### make a simple work directory
echo "Make a directory private_myproj for my first project ..."
cd $pd
if [[ ! -d "private_myproj" ]]; then
mkdir -p private_myproj
/bin/cp -f example/* private_myproj/
fi
cd $pd/private_myproj
make
cd $pd
/bin/cp -f build/bin/fwww $HOME/fwww/bin_dir/
echo "Basic program is build/bin/fwww"
echo
### if you have other projects, work here
###
### start http server
echo "Starting web server ..."
cd $pd/setup/sh
./start_test_http.sh -f
echo
### show how to use
echo "You can try open the following URLs:"
echo
echo " https://<this_host_IP>:4433/fwww/"
echo " http://<this_host_IP>:8080/fwww/"
echo
echo "Example 1: curl -k https://localhost:4433/fwww/"
echo
echo "Example 2: curl http://localhost:8080/fwww/"