forked from PIVX-Project/PIVX
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild_macos.sh
executable file
·30 lines (25 loc) · 917 Bytes
/
build_macos.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
#!/bin/bash
echo -e "\033[0;32mHow many CPU cores do you want to be used in compiling process? (Default is 1. Press enter for default.)\033[0m"
read -e CPU_CORES
if [ -z "$CPU_CORES" ]
then
CPU_CORES=1
fi
# Clone SAPP code from SAPP official Github repository
git clone https://github.com/sappcoin-com/SAPP
# Entering SAPP directory
cd SAPP
# Compile dependencies
cd depends
make -j$(echo $CPU_CORES) HOST=x86_64-apple-darwin17
cd ..
# Compile SAPP
./autogen.sh
./configure --prefix=$(pwd)/depends/x86_64-apple-darwin17 --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench
make -j$(echo $CPU_CORES) HOST=x86_64-apple-darwin17
make deploy
cd ..
# Create zip file of binaries
cp SAPP/src/sapd SAPP/src/sap-cli SAPP/src/sap-tx SAPP/src/qt/sap-qt SAPP/SAPP.dmg .
zip SAPP-MacOS.zip sapd sap-cli sap-tx sap-qt SAPP.dmg
rm -f sapd sap-cli sap-tx sap-qt SAPP.dmg