summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2018-01-11 17:10:17 +0100
committerArne Schwabe <arne@rfc2549.org>2018-01-11 17:10:17 +0100
commit87044429de0689f434639ac04813666584d79a54 (patch)
tree9d7309b64d62db5ee24a32a099d4d4cdf689e2a1
parent9ec7ca00eec294f5498d5a468729882b7457fe05 (diff)
MInor build fixes and simpler lzo cmake file
-rw-r--r--build.gradle2
-rw-r--r--gradle/wrapper/gradle-wrapper.properties4
-rw-r--r--main/build.gradle5
-rw-r--r--main/src/main/cpp/CMakeLists.txt5
-rw-r--r--main/src/main/cpp/lzo.cmake75
-rw-r--r--main/src/main/res/layout-sw600dp/log_fragment.xml5
-rw-r--r--main/src/main/res/xml/general_settings.xml2
-rw-r--r--main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java1
8 files changed, 89 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle
index 14cf5e15..4c91bd56 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,7 +11,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.0-alpha06'
+ classpath 'com.android.tools.build:gradle:3.1.0-alpha07'
}
}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index d7e494a9..68843020 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Dec 24 00:32:39 CET 2017
+#Wed Jan 10 14:02:32 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-rc-3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
diff --git a/main/build.gradle b/main/build.gradle
index 18fb1c50..f10f3795 100644
--- a/main/build.gradle
+++ b/main/build.gradle
@@ -31,7 +31,7 @@ dependencies {
-def openvpn3SwigFiles = new File(buildDir, "ovpn3swig/")
+def openvpn3SwigFiles = new File(buildDir, "generated/source/ovpn3swig/ovpn3")
task ("generateOpenVPN3Swig" ,type:Exec) {
doFirst {
@@ -69,11 +69,10 @@ android {
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'build/ovpnassets']
- jniLibs.srcDirs = ['ovpnlibs/jniLibs']
}
ovpn3 {
- java.srcDirs += openvpn3SwigFiles
+ java.srcDirs =["src/ovpn3/java/", openvpn3SwigFiles]
}
debug {
diff --git a/main/src/main/cpp/CMakeLists.txt b/main/src/main/cpp/CMakeLists.txt
index a71e9883..85b3403b 100644
--- a/main/src/main/cpp/CMakeLists.txt
+++ b/main/src/main/cpp/CMakeLists.txt
@@ -5,8 +5,9 @@ OPTION(ENABLE_PROGRAMS "" OFF)
OPTION(USE_SHARED_MBEDTLS_LIBRARY "" OFF)
OPTION(ENABLE_TESTING "" OFF)
-add_subdirectory(lzo)
+#add_subdirectory(lzo)
include(tools.cmake)
+include(lzo.cmake)
include(openssl.cmake)
# Super hacky way to determine flavour
@@ -186,4 +187,4 @@ add_custom_command(TARGET pie_openvpn.${ANDROID_ABI} POST_BUILD
DEPENDS makeassetdir)
# Hack that these targets are really executed
-add_dependencies(opvpnutil pie_openvpn.${ANDROID_ABI} nopie_openvpn.${ANDROID_ABI}) \ No newline at end of file
+add_dependencies(opvpnutil pie_openvpn.${ANDROID_ABI} nopie_openvpn.${ANDROID_ABI})
diff --git a/main/src/main/cpp/lzo.cmake b/main/src/main/cpp/lzo.cmake
new file mode 100644
index 00000000..a0afbbda
--- /dev/null
+++ b/main/src/main/cpp/lzo.cmake
@@ -0,0 +1,75 @@
+# Lzo's own cmake is rather throublesome
+
+set(lzo_srcs
+ lzo1.c
+ lzo1_99.c
+ lzo1a.c
+ lzo1a_99.c
+ lzo1b_1.c
+ lzo1b_2.c
+ lzo1b_3.c
+ lzo1b_4.c
+ lzo1b_5.c
+ lzo1b_6.c
+ lzo1b_7.c
+ lzo1b_8.c
+ lzo1b_9.c
+ lzo1b_99.c
+ lzo1b_9x.c
+ lzo1b_cc.c
+ lzo1b_d1.c
+ lzo1b_d2.c
+ lzo1b_rr.c
+ lzo1b_xx.c
+ lzo1c_1.c
+ lzo1c_2.c
+ lzo1c_3.c
+ lzo1c_4.c
+ lzo1c_5.c
+ lzo1c_6.c
+ lzo1c_7.c
+ lzo1c_8.c
+ lzo1c_9.c
+ lzo1c_99.c
+ lzo1c_9x.c
+ lzo1c_cc.c
+ lzo1c_d1.c
+ lzo1c_d2.c
+ lzo1c_rr.c
+ lzo1c_xx.c
+ lzo1f_1.c
+ lzo1f_9x.c
+ lzo1f_d1.c
+ lzo1f_d2.c
+ lzo1x_1.c
+ lzo1x_1k.c
+ lzo1x_1l.c
+ lzo1x_1o.c
+ lzo1x_9x.c
+ lzo1x_d1.c
+ lzo1x_d2.c
+ lzo1x_d3.c
+ lzo1x_o.c
+ lzo1y_1.c
+ lzo1y_9x.c
+ lzo1y_d1.c
+ lzo1y_d2.c
+ lzo1y_d3.c
+ lzo1y_o.c
+ lzo1z_9x.c
+ lzo1z_d1.c
+ lzo1z_d2.c
+ lzo1z_d3.c
+ lzo2a_9x.c
+ lzo2a_d1.c
+ lzo2a_d2.c
+ lzo_crc.c
+ lzo_init.c
+ lzo_ptr.c
+ lzo_str.c
+ lzo_util.c
+ )
+
+PREPEND(lzo_src_with_path "lzo/src" ${lzo_srcs})
+add_library(lzo_static_lib ${lzo_src_with_path})
+target_include_directories(lzo_static_lib PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/lzo/include")
diff --git a/main/src/main/res/layout-sw600dp/log_fragment.xml b/main/src/main/res/layout-sw600dp/log_fragment.xml
index 26f63df4..089bfb9d 100644
--- a/main/src/main/res/layout-sw600dp/log_fragment.xml
+++ b/main/src/main/res/layout-sw600dp/log_fragment.xml
@@ -17,8 +17,9 @@
android:background="@drawable/white_rect"
android:elevation="1dp"
android:minWidth="300dp"
+
android:orientation="vertical"
- android:layout_width="wrap_content"
+ android:layout_width="400dp"
android:layout_height="match_parent">
<include layout="@layout/log_silders"/>
@@ -27,6 +28,8 @@
</LinearLayout>
<ListView
+ android:minWidth="400dp"
+ android:layout_weight="4"
android:id="@android:id/list"
android:transcriptMode="normal"
android:layout_width="fill_parent"
diff --git a/main/src/main/res/xml/general_settings.xml b/main/src/main/res/xml/general_settings.xml
index 250e2736..624e5fac 100644
--- a/main/src/main/res/xml/general_settings.xml
+++ b/main/src/main/res/xml/general_settings.xml
@@ -18,7 +18,7 @@
android:defaultValue="false"
android:key="ovpn3"
android:summaryOn="Use the C++ OpenVPN library (experimental)"
- android:summaryOff="Use OpenVPN 2.3"
+ android:summaryOff="Use OpenVPN 2.x"
android:title="OpenVPN 3 Core"/>
diff --git a/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java
index 850983a9..3e52eaec 100644
--- a/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java
+++ b/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java
@@ -244,6 +244,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable
@Override
public boolean stopVPN(boolean replaceConnection) {
+ stop();
return false;
}