-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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 #2 from shadowsocks/master
Sync
- Loading branch information
Showing
71 changed files
with
478 additions
and
589 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 |
---|---|---|
|
@@ -24,3 +24,6 @@ core/src/overture/src/gopkg.in | |
# work in progress | ||
tv/ | ||
things/ | ||
|
||
# release apks | ||
*.apk |
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,4 +1,4 @@ | ||
APP_ABI := armeabi-v7a arm64-v8a x86 | ||
APP_PLATFORM := android-19 | ||
APP_PLATFORM := android-21 | ||
APP_STL := c++_static | ||
NDK_TOOLCHAIN_VERSION := clang |
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
Submodule shadowsocks-libev
updated
12 files
+3 −0 | CMakeLists.txt | |
+42 −20 | src/CMakeLists.txt | |
+9 −8 | src/Makefile.am | |
+2 −2 | src/android.c | |
+3 −3 | src/common.h | |
+0 −4 | src/jconf.c | |
+0 −1 | src/jconf.h | |
+16 −28 | src/local.c | |
+0 −9 | src/netutils.c | |
+1 −47 | src/redir.c | |
+0 −3 | src/redir.h | |
+11 −19 | src/udprelay.c |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@ECHO OFF | ||
|
||
SET DIR=%~dp0 | ||
SET DEPS=%DIR%\.deps | ||
|
||
RD /S /Q %DEPS% | ||
RD /S /Q %DIR%\go\bin | ||
RD /S /Q %DIR%\bin | ||
|
||
ECHO "Successfully clean overture" |
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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
@ECHO OFF | ||
SETLOCAL | ||
|
||
IF NOT DEFINED ANDROID_NDK_HOME ( | ||
SET ANDROID_NDK_HOME=%ANDROID_HOME%\ndk-bundle | ||
) | ||
|
||
SET DIR=%~dp0 | ||
SET MIN_API=%1% | ||
SET TARGET=%DIR%\bin | ||
SET DEPS=%DIR%\.deps | ||
|
||
SET ANDROID_ARM_TOOLCHAIN=%DEPS%\android-toolchain-%MIN_API%-arm | ||
SET ANDROID_ARM64_TOOLCHAIN=%DEPS%\android-toolchain-%MIN_API%-arm64 | ||
SET ANDROID_X86_TOOLCHAIN=%DEPS%\android-toolchain-%MIN_API%-x86 | ||
|
||
SET ANDROID_ARM_CC=%ANDROID_ARM_TOOLCHAIN%\bin\arm-linux-androideabi-clang | ||
SET ANDROID_ARM_STRIP=%ANDROID_ARM_TOOLCHAIN%\bin\arm-linux-androideabi-strip | ||
|
||
SET ANDROID_ARM64_CC=%ANDROID_ARM64_TOOLCHAIN%\bin\aarch64-linux-android-clang | ||
SET ANDROID_ARM64_STRIP=%ANDROID_ARM64_TOOLCHAIN%\bin\aarch64-linux-android-strip | ||
|
||
SET ANDROID_X86_CC=%ANDROID_X86_TOOLCHAIN%\bin\i686-linux-android-clang | ||
SET ANDROID_X86_STRIP=%ANDROID_X86_TOOLCHAIN%\bin\i686-linux-android-strip | ||
|
||
MKDIR %DEPS%>nul 2>nul | ||
MKDIR %TARGET%\armeabi-v7a>nul 2>nul | ||
MKDIR %TARGET%\x86>nul 2>nul | ||
MKDIR %TARGET%\arm64-v8a>nul 2>nul | ||
|
||
IF NOT EXIST %ANDROID_ARM_CC% ( | ||
ECHO "Make standalone toolchain for ARM arch" | ||
%ANDROID_NDK_HOME%\build\tools\make_standalone_toolchain.py --arch arm ^ | ||
--api %MIN_API% --install-dir %ANDROID_ARM_TOOLCHAIN% | ||
) | ||
|
||
IF NOT EXIST %ANDROID_ARM64_CC% ( | ||
ECHO "Make standalone toolchain for ARM64 arch" | ||
%ANDROID_NDK_HOME%\build\tools\make_standalone_toolchain.py --arch arm64 ^ | ||
--api %MIN_API% --install-dir %ANDROID_ARM64_TOOLCHAIN% | ||
) | ||
|
||
IF NOT EXIST %ANDROID_X86_CC% ( | ||
ECHO "Make standalone toolchain for X86 arch" | ||
%ANDROID_NDK_HOME%\build\tools\make_standalone_toolchain.py --arch x86 ^ | ||
--api %MIN_API% --install-dir %ANDROID_X86_TOOLCHAIN% | ||
) | ||
|
||
IF NOT EXIST %DIR%\go\bin\go.exe ( | ||
ECHO "Build the custom go" | ||
|
||
PUSHD %DIR%\go\src | ||
CALL make.bat | ||
POPD | ||
) | ||
|
||
SET GOROOT=%DIR%\go | ||
SET GOPATH=%DIR% | ||
SET PATH=%GOROOT%\bin;%GOPATH%\bin;%PATH% | ||
|
||
SET BUILD=1 | ||
IF EXIST "%TARGET%\armeabi-v7a\liboverture.so" ( | ||
IF EXIST "%TARGET%\arm64-v8a\liboverture.so" ( | ||
IF EXIST "%TARGET%\x86\liboverture.so" ( | ||
SET BUILD=0 | ||
) | ||
) | ||
) | ||
|
||
IF %BUILD% == 1 ( | ||
ECHO "Get dependences for overture" | ||
go.exe get -u github.com\tools\godep | ||
|
||
PUSHD %GOPATH%\src\github.com\shadowsocks\overture\main | ||
godep.exe restore | ||
|
||
ECHO "Cross compile overture for arm" | ||
IF NOT EXIST "%TARGET%\armeabi-v7a\liboverture.so" ( | ||
SETLOCAL | ||
SET CGO_ENABLED=1 | ||
SET CC=%ANDROID_ARM_CC% | ||
SET GOOS=android | ||
SET GOARCH=arm | ||
SET GOARM=7 | ||
go.exe build -ldflags="-s -w" | ||
%ANDROID_ARM_STRIP% main | ||
MOVE main %TARGET%\armeabi-v7a\liboverture.so>nul 2>nul | ||
ENDLOCAL | ||
) | ||
|
||
ECHO "Cross compile overture for arm64" | ||
IF NOT EXIST "%TARGET%\arm64-v8a\liboverture.so" ( | ||
SETLOCAL | ||
SET CGO_ENABLED=1 | ||
SET CC=%ANDROID_ARM64_CC% | ||
SET GOOS=android | ||
SET GOARCH=arm64 | ||
go.exe build -ldflags="-s -w" | ||
%ANDROID_ARM64_STRIP% main | ||
MOVE main %TARGET%\arm64-v8a\liboverture.so>nul 2>nul | ||
ENDLOCAL | ||
) | ||
|
||
ECHO "Cross compile overture for x86" | ||
IF NOT EXIST "%TARGET%\x86\liboverture.so" ( | ||
SETLOCAL | ||
SET CGO_ENABLED=1 | ||
SET CC=%ANDROID_X86_CC% | ||
SET GOOS=android | ||
SET GOARCH=386 | ||
go.exe build -ldflags="-s -w" | ||
%ANDROID_X86_STRIP% main | ||
MOVE main %TARGET%\x86\liboverture.so>nul 2>nul | ||
ENDLOCAL | ||
) | ||
|
||
POPD | ||
) | ||
|
||
ECHO "Successfully build overture" | ||
ENDLOCAL |
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
Oops, something went wrong.