fix build error
This commit is contained in:
@@ -17,7 +17,6 @@ install:
|
||||
- echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a
|
||||
- echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
|
||||
script:
|
||||
- ./build-ndk.sh
|
||||
- cp local.properties.travis local.properties
|
||||
- sbt android:package-release
|
||||
- exit 0
|
||||
|
||||
@@ -29,9 +29,6 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
|
||||
```bash
|
||||
git submodule update --init
|
||||
|
||||
# Build native binaries
|
||||
./build-ndk.sh
|
||||
|
||||
# Build the App
|
||||
sbt clean android:package-release
|
||||
```
|
||||
@@ -40,7 +37,8 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
|
||||
|
||||
* Install Android SDK and NDK by run `brew install android-ndk android-sdk`
|
||||
* Add `export ANDROID_HOME=/usr/local/Cellar/android-sdk/$version` to your .bashrc , then reopen the shell to load it.
|
||||
* Run `echo "y" | android update sdk --filter tools,platform-tools,build-tools-19.0.3,android-19,extra-google-m2repository,extra-android-m2repository --no-ui --no-https -a`
|
||||
* echo "y" | android update sdk --filter tools,platform-tools,build-tools-21.0.1,android-21,extra-google-m2repository --no-ui --no-https -a
|
||||
* echo "y" | android update sdk --filter extra-android-m2repository --no-ui --no-https -a
|
||||
* Create your key following the instructions at http://developer.android.com/guide/publishing/app-signing.html#cert
|
||||
* Put your key in ~/.keystore
|
||||
* Create `local.properties` from `local.properties.example` with your own key information .
|
||||
@@ -49,9 +47,6 @@ Help to translate shadowsocks: http://crowdin.net/project/shadowsocks/invite
|
||||
```bash
|
||||
git submodule update --init
|
||||
|
||||
# Build native binaries
|
||||
./build-ndk.sh
|
||||
|
||||
# Build the apk
|
||||
sbt clean android:package-release
|
||||
```
|
||||
|
||||
@@ -10,6 +10,8 @@ name := "shadowsocks"
|
||||
|
||||
compileOrder in Compile := CompileOrder.JavaThenScala
|
||||
|
||||
ndkJavah in Android := List()
|
||||
|
||||
resolvers += "JRAF" at "http://JRAF.org/static/maven/2"
|
||||
|
||||
resolvers += "madeye private releases" at "http://madeye-maven-repository.googlecode.com/git/"
|
||||
|
||||
@@ -37,7 +37,7 @@ LIBEVENT_SOURCES := \
|
||||
|
||||
LOCAL_MODULE := event
|
||||
LOCAL_SRC_FILES := $(addprefix libevent/, $(LIBEVENT_SOURCES))
|
||||
LOCAL_CFLAGS := -O2 -g -I$(LOCAL_PATH)/libevent \
|
||||
LOCAL_CFLAGS := -O2 -I$(LOCAL_PATH)/libevent \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/openssl/include
|
||||
|
||||
@@ -122,7 +122,7 @@ LOCAL_STATIC_LIBRARIES := libevent
|
||||
|
||||
LOCAL_MODULE := redsocks-jni
|
||||
LOCAL_SRC_FILES := $(addprefix redsocks/, $(REDSOCKS_SOURCES)) main-jni.cpp
|
||||
LOCAL_CFLAGS := -O2 -std=gnu99 -g -I$(LOCAL_PATH)/redsocks \
|
||||
LOCAL_CFLAGS := -O2 -std=gnu99 -DREDSOCKS_JNI -I$(LOCAL_PATH)/redsocks \
|
||||
-I$(LOCAL_PATH)/libevent/include \
|
||||
-I$(LOCAL_PATH)/libevent
|
||||
|
||||
|
||||
@@ -175,13 +175,14 @@ class ShadowsocksNatService extends Service with BaseService {
|
||||
|
||||
def startRedsocksDaemon() {
|
||||
val conf = ConfigUtils.REDSOCKS.format(config.localPort)
|
||||
val args = "redsocks -p %sredsocks.pid -c %sredsocks.conf"
|
||||
val cmd = "redsocks -p %sredsocks.pid -c %sredsocks.conf"
|
||||
.format(Path.BASE, Path.BASE)
|
||||
ConfigUtils.printToFile(new File(Path.BASE + "redsocks.conf"))(p => {
|
||||
p.println(conf)
|
||||
})
|
||||
val cmd = Path.BASE + args
|
||||
Console.runCommand(cmd)
|
||||
if (BuildConfig.DEBUG) Log.d(TAG, cmd)
|
||||
|
||||
Core.redsocks(cmd.split(" "))
|
||||
}
|
||||
|
||||
/** Called when the activity is first created. */
|
||||
|
||||
Reference in New Issue
Block a user