summaryrefslogtreecommitdiff
path: root/main/src
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 /main/src
parent9ec7ca00eec294f5498d5a468729882b7457fe05 (diff)
MInor build fixes and simpler lzo cmake file
Diffstat (limited to 'main/src')
-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
5 files changed, 84 insertions, 4 deletions
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;
}