Skip to content

Commit

Permalink
fix an issue in the build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Sep 18, 2014
1 parent 971ef22 commit 97c6ff9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
22 changes: 18 additions & 4 deletions build-ndk.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
#!/bin/bash

ndk-build clean
ndk-build
function try () {
"$@" || exit -1
}

# Build
try ndk-build clean
try ndk-build

# copy executables
rm -rf src/main/assets/armeabi-v7a
rm -rf src/main/assets/x86
mkdir -p src/main/assets/armeabi-v7a
mkdir -p src/main/assets/x86
for app in pdnsd redsocks
do
mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/
mv libs/x86/$app src/main/assets/x86/
try mv libs/armeabi-v7a/$app src/main/assets/armeabi-v7a/
try mv libs/x86/$app src/main/assets/x86/
done

# copy libraries
rm -rf src/main/jni/armeabi-v7a
rm -rf src/main/jni/x86
mkdir -p src/main/jni/armeabi-v7a
mkdir -p src/main/jni/x86
try mv libs/armeabi-v7a/*.so src/main/jni/armeabi-v7a/
try mv libs/x86/*.so src/main/jni/x86/
10 changes: 5 additions & 5 deletions jni/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jstring Java_com_github_shadowsocks_system_getabi(JNIEnv *env, jobject thiz) {
} else if (family == ANDROID_CPU_FAMILY_MIPS) {
abi = "mips";
} else if (family == ANDROID_CPU_FAMILY_ARM) {
if (features & ANDROID_CPU_ARM_FEATURE_ARMv7) {
abi = "armeabi-v7a";
} else {
abi = "armeabi";
}
// if (features & ANDROID_CPU_ARM_FEATURE_ARMv7) {
abi = "armeabi-v7a";
// } else {
// abi = "armeabi";
// }
}
return env->NewStringUTF(abi);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
android:versionCode="71"
android:versionName="2.2.3">
android:versionCode="72"
android:versionName="2.2.4">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down

0 comments on commit 97c6ff9

Please sign in to comment.