forked from ProjectArepa/ArepaCoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Compile.sh
executable file
·108 lines (98 loc) · 3.3 KB
/
Compile.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# Script for compile Daemon and WalletQt for ArepaCoin
installAptLibs16Qt() {
sudo apt-get -y update
sudo apt-get -y install \
qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools software-properties-common build-essential \
libssl-dev libdb++-dev libboost-all-dev libqrencode-dev qrencode libminiupnpc-dev automake autoconf \
git pkg-config libcurl4-openssl-dev libjansson-dev libgmp-dev make g++ gcc
}
installAptLibs18Qt() {
sudo apt-get -y update
sudo apt-get -y install \
qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools software-properties-common build-essential \
libssl1.0-dev libdb++-dev libboost-all-dev libqrencode-dev qrencode libminiupnpc-dev automake autoconf \
git pkg-config libcurl-openssl1.0-dev libjansson-dev libgmp-dev make g++ gcc
}
installLibsQt() {
echo "Installing prerequisites"
. /etc/os-release
case "$ID-$VERSION_ID" in
ubuntu-16.04 ) installAptLibs16 ;;
ubuntu-18.04 ) installAptLibs18 ;;
* ) echo "ERROR: only Ubuntu 16.04 or 18.04 are supported now."; exit 1;;
esac
}
installAptLibs16() {
sudo apt-get -y update
sudo apt-get -y install \
software-properties-common build-essential \
libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev automake autoconf \
git pkg-config libcurl4-openssl-dev libjansson-dev libgmp-dev make g++ gcc
}
installAptLibs18() {
sudo apt-get -y update
sudo apt-get -y install \
software-properties-common build-essential \
libssl1.0-dev libdb++-dev libboost-all-dev libminiupnpc-dev automake autoconf \
git pkg-config libcurl-openssl1.0-dev libjansson-dev libgmp-dev make g++ gcc
}
installLibs() {
echo "Installing prerequisites"
. /etc/os-release
case "$ID-$VERSION_ID" in
ubuntu-16.04 ) installAptLibs16 ;;
ubuntu-18.04 ) installAptLibs18 ;;
* ) echo "ERROR: only Ubuntu 16.04 or 18.04 are supported now."; exit 1;;
esac
}
installBerkeleyDB() {
echo "Installing Berkeley DB"
sudo env LC_ALL=C.UTF-8 add-apt-repository -y ppa:bitcoin/bitcoin
sudo apt-get -y update
sudo apt-get -y install libdb4.8-dev libdb4.8++-dev
}
compileDaemonWallet() {
echo "Compile Arepa Daemon Wallet"
cd src
make -j$(nproc) -f makefile.unix
strip arepacoind
}
compileQtWallet() {
echo "Compile Arepa Qt Wallet"
qmake "USE_QRCODE=1"
make -j$(nproc)
}
PS3='Please enter your choice: '
options=("Compile Qt Wallet" "Compile Daemon Wallet" "Compile Qt and Daemon Wallet")
select opt in "${options[@]}"
do
case $opt in
"Compile Qt Wallet")
echo "Compile Qt Wallet"
installLibsQt
installBerkeleyDB
compileQtWallet
echo "Complete!"
break
;;
"Compile Daemon Wallet")
echo "Compile Daemon Wallet"
installLibs
installBerkeleyDB
compileDaemonWallet
echo "Complete!"
break
;;
"Compile Qt and Daemon Wallet")
echo "Compile Qt and Daemon Wallet"
installLibsQt
installBerkeleyDB
compileQtWallet
compileDaemonWallet
echo "Complete!"
break
;;
*) echo "invalid option $REPLY";;
esac
done