-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from tindy2013/dev
Dev
- Loading branch information
Showing
8 changed files
with
79 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,19 @@ | |
mkdir obj | ||
mkdir bin | ||
set -e | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c geoip.cpp -o obj/geoip.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c logger.cpp -o obj/logger.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c main.cpp -o obj/main.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c misc.cpp -o obj/misc.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c multithread-test.cpp -o obj/multithread-test.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c printout.cpp -o obj/printout.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c processes.cpp -o obj/processes.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c renderer.cpp -o obj/renderer.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c rulematch.cpp -o obj/rulematch.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c socket.cpp -o obj/socket.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c speedtestutil.cpp -o obj/speedtestutil.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c tcping.cpp -o obj/tcping.o | ||
c++ -I/usr/local/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c webget.cpp -o obj/webget.o | ||
c++ -g -o stairspeedtest obj/geoip.o obj/logger.o obj/main.o obj/misc.o obj/multithread-test.o obj/printout.o obj/processes.o obj/renderer.o obj/rulematch.o obj/socket.o obj/speedtestutil.o obj/tcping.o obj/webget.o -L/usr/local/lib -lcurl -lPNGwriter -lpng16 -lfreetype -lz -lssl -lcrypto -lyaml-cpp -ldl -lpthread | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c geoip.cpp -o obj/geoip.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c logger.cpp -o obj/logger.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c main.cpp -o obj/main.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c misc.cpp -o obj/misc.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c multithread-test.cpp -o obj/multithread-test.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c printout.cpp -o obj/printout.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c processes.cpp -o obj/processes.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/include/freetype2 -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c renderer.cpp -o obj/renderer.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c rulematch.cpp -o obj/rulematch.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c socket.cpp -o obj/socket.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c speedtestutil.cpp -o obj/speedtestutil.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c tcping.cpp -o obj/tcping.o | ||
c++ -I/usr/local/include -I/usr/local/opt/[email protected]/include -Wall -fexceptions -D_MACOS -DCURL_STATICLIB -g -std=c++11 -c webget.cpp -o obj/webget.o | ||
c++ -g -o stairspeedtest obj/geoip.o obj/logger.o obj/main.o obj/misc.o obj/multithread-test.o obj/printout.o obj/processes.o obj/renderer.o obj/rulematch.o obj/socket.o obj/speedtestutil.o obj/tcping.o obj/webget.o -L/usr/local/opt/[email protected]/lib -lcurl -lPNGwriter -lpng -lfreetype -lz -lssl -lcrypto -lyaml-cpp -ldl -lpthread | ||
chmod +x stairspeedtest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,37 @@ | ||
#!/bin/bash | ||
set -e | ||
#initialize sudo so that no password entering during installation | ||
sudo -v | ||
|
||
echo installing brew | ||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
|
||
echo preconfigure compiler | ||
brew install gcc | ||
|
||
#don't remove these for non-xcode user | ||
#cd /usr/bin | ||
#sudo rm -f g++ gcc c++ cpp cc | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/c++-9 /usr/bin/c++ | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/cpp-9 /usr/bin/cpp | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/g++-9 /usr/bin/g++ | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/gcc-9 /usr/bin/gcc | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/gcc-9 /usr/bin/cc | ||
#fix for cmake which uses a different path | ||
#sudo rm -f g++ gcc c++ cpp cc | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/c++-9 /Library/Developer/CommandLineTools/usr/bin/c++ | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/cpp-9 /Library/Developer/CommandLineTools/usr/bin/cpp | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/g++-9 /Library/Developer/CommandLineTools/usr/bin/g++ | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/gcc-9 /Library/Developer/CommandLineTools/usr/bin/gcc | ||
#sudo ln -s /usr/local/Cellar/gcc/9.1.0/bin/gcc-9 /Library/Developer/CommandLineTools/usr/bin/cc | ||
|
||
echo installing tools with brew | ||
brew install wget cmake zlib | ||
|
||
echo downloading and compiling openssl-1.1.1c | ||
wget https://www.openssl.org/source/openssl-1.1.1c.tar.gz | ||
tar xvf openssl-1.1.1c.tar.gz | ||
cd openssl-1.1.1c | ||
#override compiler | ||
CC=cc ./config --prefix=/usr/local | ||
#don't install docs since we don't need them | ||
sudo make install_sw -j8 | ||
#fix install error | ||
sudo install libssl.a /usr/local/lib/ | ||
sudo install libssl.dylib /usr/local/lib/ | ||
sudo install libcrypto.a /usr/local/lib/ | ||
sudo install libcrypto.dylib /usr/local/lib/ | ||
cd .. | ||
|
||
#using system-default libcurl | ||
#echo downloading and compiling curl-7.65.1 | ||
#wget https://curl.haxx.se/download/curl-7.65.1.tar.gz | ||
#tar xvf curl-7.65.1.tar.gz | ||
#cd curl-7.65.1 | ||
#./configure --disable-shared --disable-ldap --disable-ldaps --disable-smtp --disable-pop3 --disable-rtmp --disable-imap --disable-gopher --disable-telnet --disable-tftp | ||
#sudo make install -j8 | ||
#cd .. | ||
|
||
echo downloading and compiling libpng-1.6.37 | ||
wget https://nchc.dl.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.gz | ||
tar xvf libpng-1.6.37.tar.gz | ||
cd libpng-1.6.37 | ||
CC=cc ./configure | ||
sudo make install -j8 | ||
cd .. | ||
|
||
echo downloading and compiling freetype-2.10.1 | ||
wget https://nchc.dl.sourceforge.net/project/freetype/freetype2/2.10.1/freetype-2.10.1.tar.xz | ||
tar xvf freetype-2.10.1.tar.xz | ||
cd freetype-2.10.1 | ||
CC=cc ./configure | ||
sudo make install -j8 | ||
#a fix for incorrect file path | ||
sudo mv /usr/local/include/freetype2/* /usr/local/include | ||
sudo rmdir /usr/local/include/freetype2 | ||
cd .. | ||
|
||
echo downloading and compiling pngwriter | ||
git clone https://github.com/pngwriter/pngwriter | ||
cd pngwriter | ||
CC=cc cmake . | ||
sudo make install -j8 | ||
#fix install error | ||
#sudo install libPNGwriter.a /usr/local/lib/ | ||
cd .. | ||
|
||
echo downloading and installing rapidjson | ||
git clone https://github.com/tencent/rapidjson | ||
cd rapidjson | ||
CC=cc cmake . | ||
sudo make install -j8 | ||
cd .. | ||
|
||
#install ss-local from brew | ||
echo installing shadowsocks-libev from brew | ||
brew install shadowsocks-libev | ||
|
||
#extra tools for ssr-local | ||
#but ss-libev has already covered these | ||
|
||
#brew install asciidoc xmlto pcre | ||
|
||
#use brew version is okay | ||
#echo downloading and compiling pcre-8.43 | ||
#wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz | ||
#tar xvf pcre-8.43.tar.gz | ||
#cd pcre-8.43 | ||
#./configure | ||
#make -j8 | ||
#sudo make install -j8 | ||
#cd .. | ||
|
||
echo downloading and compiling shadowsocksr-libev | ||
git clone https://github.com/shadowsocksrr/shadowsocksr-libev | ||
cd shadowsocksr-libev | ||
#override some warning settings | ||
CC="cc" CFLAGS+="-Wno-format-overflow -Wno-format-truncation -Wno-sizeof-pointer-memaccess" ./configure --with-openssl-lib=/usr/local/lib --with-openssl-include=/usr/local/include --disable-documentation | ||
make -j8 | ||
#will not directly install this one, use another method | ||
sudo install src/ss-local /usr/local/bin/ssr-local | ||
cd .. | ||
|
||
echo installing v2ray from brew | ||
brew tap v2ray/v2ray | ||
brew install v2ray-core | ||
|
||
echo all done! | ||
#!/bin/bash | ||
set -e | ||
#initialize sudo so that no password entering during installation | ||
sudo -v | ||
|
||
echo installing brew | ||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
|
||
#install most libraries and client through brew | ||
brew install cmake git wget [email protected] libpng yaml-cpp freetype rapidjson shadowsocks-libev | ||
|
||
echo downloading and compiling pngwriter | ||
git clone https://github.com/pngwriter/pngwriter | ||
cd pngwriter | ||
cmake . | ||
sudo make install -j8 | ||
#fix install error | ||
#sudo install libPNGwriter.a /usr/local/lib/ | ||
cd .. | ||
|
||
echo downloading and compiling shadowsocksr-libev | ||
git clone https://github.com/shadowsocksrr/shadowsocksr-libev | ||
cd shadowsocksr-libev | ||
./configure --with-openssl-lib=/usr/local/opt/openssl/lib --with-openssl-include=/usr/local/opt/openssl/include --disable-documentation | ||
make -j8 | ||
#fix dynamic lib reference error | ||
install_name_tool -change @rpath/libssl.1.1.dylib /usr/local/opt/[email protected]/lib/libssl.1.1.dylib src/ss-local | ||
install_name_tool -change @rpath/libcrypto.1.1.dylib /usr/local/opt/[email protected]/lib/libcrypto.1.1.dylib src/ss-local | ||
#will not directly install this one, use another method | ||
sudo install src/ss-local /usr/local/bin/ssr-local | ||
cd .. | ||
|
||
echo installing v2ray from brew | ||
brew tap v2ray/v2ray | ||
brew install v2ray-core | ||
|
||
echo all done! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef VERSION_H_INCLUDED | ||
#define VERSION_H_INCLUDED | ||
|
||
#define VERSION "v0.2.12-alpha" | ||
#define VERSION "v0.2.13-alpha" | ||
|
||
#endif // VERSION_H_INCLUDED |