Merge remote-tracking branch 'origin' into dev_codec_downloader
This commit is contained in:
commit
cd40cb75e7
7 changed files with 108 additions and 11 deletions
|
@ -14,6 +14,7 @@ copy-libs:
|
|||
mkdir -p assets/config_files
|
||||
if test -d "../liblinphone-sdk/android-arm"; then \
|
||||
mkdir -p libs/armeabi && \
|
||||
cp -f ../liblinphone-sdk/android-arm/lib/libgnustl_shared.so libs/armeabi && \
|
||||
cp -f ../liblinphone-sdk/android-arm/lib/lib*-armeabi.so libs/armeabi && \
|
||||
cp -f ../liblinphone-sdk/android-arm/lib/mediastreamer/plugins/*.so libs/armeabi && \
|
||||
cp -f ../liblinphone-sdk/android-arm/share/linphone/rootca.pem assets/config_files; \
|
||||
|
@ -25,6 +26,7 @@ copy-libs:
|
|||
rm -rf libs/armeabi-v7a
|
||||
if test -d "../liblinphone-sdk/android-armv7"; then \
|
||||
mkdir -p libs/armeabi-v7a && \
|
||||
cp -f ../liblinphone-sdk/android-armv7/lib/libgnustl_shared.so libs/armeabi-v7a && \
|
||||
cp -f ../liblinphone-sdk/android-armv7/lib/lib*-armeabi-v7a.so libs/armeabi-v7a && \
|
||||
cp -f ../liblinphone-sdk/android-armv7/lib/mediastreamer/plugins/*.so libs/armeabi-v7a && \
|
||||
cp -f ../liblinphone-sdk/android-armv7/share/linphone/rootca.pem assets/config_files; \
|
||||
|
@ -36,6 +38,7 @@ copy-libs:
|
|||
rm -rf libs/x86
|
||||
if test -d "../liblinphone-sdk/android-x86"; then \
|
||||
mkdir -p libs/x86 && \
|
||||
cp -f ../liblinphone-sdk/android-x86/lib/libgnustl_shared.so libs/x86 && \
|
||||
cp -f ../liblinphone-sdk/android-x86/lib/lib*-x86.so libs/x86 && \
|
||||
cp -f ../liblinphone-sdk/android-x86/lib/mediastreamer/plugins/*.so libs/x86 && \
|
||||
cp -f ../liblinphone-sdk/android-x86/share/linphone/rootca.pem assets/config_files; \
|
||||
|
|
69
prepare.py
69
prepare.py
|
@ -22,8 +22,11 @@
|
|||
#
|
||||
############################################################################
|
||||
|
||||
import fnmatch
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from distutils.spawn import find_executable
|
||||
from logging import error, warning, info
|
||||
from subprocess import Popen
|
||||
sys.dont_write_bytecode = True
|
||||
|
@ -80,6 +83,10 @@ class AndroidPreparator(prepare.Preparator):
|
|||
|
||||
def __init__(self, targets=android_targets):
|
||||
prepare.Preparator.__init__(self, targets)
|
||||
self.min_supported_ndk = 10
|
||||
self.max_supported_ndk = 11
|
||||
self.unsupported_ndk_version = None
|
||||
self.release_with_debug_info = True
|
||||
self.veryclean = True
|
||||
self.show_gpl_disclaimer = True
|
||||
self.argparser.add_argument('-ac', '--all-codecs', help="Enable all codecs, including the non-free ones", action='store_true')
|
||||
|
@ -109,6 +116,56 @@ class AndroidPreparator(prepare.Preparator):
|
|||
self.additional_args += ["-DENABLE_VPX=YES"]
|
||||
# self.additional_args += ["-DENABLE_X264=YES"] # Do not activate x264 because it has text relocation issues
|
||||
|
||||
def list_feature_target(self):
|
||||
return android_targets['armv7']
|
||||
|
||||
def check_ndk_version(self):
|
||||
retval = True
|
||||
ndk_build = find_executable('ndk-build')
|
||||
ndk_path = os.path.dirname(ndk_build)
|
||||
# NDK prior to r11 had a RELEASE.TXT file holding the version number
|
||||
release_file = os.path.join(ndk_path, 'RELEASE.TXT')
|
||||
if os.path.isfile(release_file):
|
||||
version = open(release_file).read().strip()
|
||||
res = re.match('^r(\d+)(.*)$', version)
|
||||
version = int(res.group(1))
|
||||
retval = False
|
||||
else:
|
||||
# Hack to find the NDK version since the RELEASE.TXT file is no longer there
|
||||
python_config_files = []
|
||||
for root, dirnames, filenames in os.walk(ndk_path):
|
||||
for filename in fnmatch.filter(filenames, 'python-config'):
|
||||
python_config_files.append(os.path.join(root, filename))
|
||||
if len(python_config_files) > 0:
|
||||
version = open(python_config_files[0]).readlines()[0]
|
||||
res = re.match('^.*/aosp-ndk-r(\d+).*$', version)
|
||||
version = int(res.group(1))
|
||||
retval = False
|
||||
else:
|
||||
error("Could not get Android NDK version!")
|
||||
sys.exit(-1)
|
||||
if retval == False and (version < self.min_supported_ndk or version > self.max_supported_ndk):
|
||||
self.unsupported_ndk_version = version
|
||||
retval = True
|
||||
return retval
|
||||
|
||||
def check_environment(self):
|
||||
ret = 0
|
||||
ret_sdk = not self.check_is_installed('android', 'Android SDK tools')
|
||||
ret_ndk = not self.check_is_installed('ndk-build', 'Android NDK r{}'.format(self.max_supported_ndk))
|
||||
if not ret_ndk:
|
||||
ret_ndk = self.check_ndk_version()
|
||||
ret |= ret_sdk
|
||||
ret |= ret_ndk
|
||||
ret |= prepare.Preparator.check_environment(self)
|
||||
return ret
|
||||
|
||||
def show_environment_errors(self):
|
||||
if self.unsupported_ndk_version is not None:
|
||||
error("Unsupported Android NDK r{}. Please install version r{}.".format(self.unsupported_ndk_version, self.max_supported_ndk))
|
||||
else:
|
||||
prepare.Preparator.show_environment_errors(self)
|
||||
|
||||
def clean(self):
|
||||
prepare.Preparator.clean(self)
|
||||
if os.path.isfile('Makefile'):
|
||||
|
@ -118,7 +175,7 @@ class AndroidPreparator(prepare.Preparator):
|
|||
if os.path.isdir('liblinphone-sdk') and not os.listdir('liblinphone-sdk'):
|
||||
os.rmdir('liblinphone-sdk')
|
||||
|
||||
def generate_makefile(self, generator):
|
||||
def generate_makefile(self, generator, project_file=''):
|
||||
platforms = self.args.target
|
||||
arch_targets = ""
|
||||
for arch in platforms:
|
||||
|
@ -159,9 +216,11 @@ copy-libs:
|
|||
\trm -rf libs/armeabi
|
||||
\tif test -d "liblinphone-sdk/android-arm"; then \\
|
||||
\t\tmkdir -p libs-debug/armeabi && \\
|
||||
\t\tcp -f liblinphone-sdk/android-arm/lib/libgnustl_shared.so libs-debug/armeabi && \\
|
||||
\t\tcp -f liblinphone-sdk/android-arm/lib/lib*-armeabi.so libs-debug/armeabi && \\
|
||||
\t\tcp -f liblinphone-sdk/android-arm/lib/mediastreamer/plugins/*.so libs-debug/armeabi && \\
|
||||
\t\tmkdir -p libs/armeabi && \\
|
||||
\t\tcp -f liblinphone-sdk/android-arm/lib/libgnustl_shared.so libs/armeabi && \\
|
||||
\t\tcp -f liblinphone-sdk/android-arm/lib/lib*-armeabi.so libs/armeabi && \\
|
||||
\t\tcp -f liblinphone-sdk/android-arm/lib/mediastreamer/plugins/*.so libs/armeabi && \\
|
||||
\t\tsh WORK/android-arm/strip.sh libs/armeabi/*.so; \\
|
||||
|
@ -176,9 +235,11 @@ copy-libs:
|
|||
\trm -rf libs/armeabi-v7a
|
||||
\tif test -d "liblinphone-sdk/android-armv7"; then \\
|
||||
\t\tmkdir -p libs-debug/armeabi-v7a && \\
|
||||
\t\tcp -f liblinphone-sdk/android-armv7/lib/libgnustl_shared.so libs-debug/armeabi-v7a && \\
|
||||
\t\tcp -f liblinphone-sdk/android-armv7/lib/lib*-armeabi-v7a.so libs-debug/armeabi-v7a && \\
|
||||
\t\tcp -f liblinphone-sdk/android-armv7/lib/mediastreamer/plugins/*.so libs-debug/armeabi-v7a && \\
|
||||
\t\tmkdir -p libs/armeabi-v7a && \\
|
||||
\t\tcp -f liblinphone-sdk/android-armv7/lib/libgnustl_shared.so libs/armeabi-v7a && \\
|
||||
\t\tcp -f liblinphone-sdk/android-armv7/lib/lib*-armeabi-v7a.so libs/armeabi-v7a && \\
|
||||
\t\tcp -f liblinphone-sdk/android-armv7/lib/mediastreamer/plugins/*.so libs/armeabi-v7a && \\
|
||||
\t\tsh WORK/android-armv7/strip.sh libs/armeabi-v7a/*.so; \\
|
||||
|
@ -193,9 +254,11 @@ copy-libs:
|
|||
\trm -rf libs/x86
|
||||
\tif test -d "liblinphone-sdk/android-x86"; then \\
|
||||
\t\tmkdir -p libs-debug/x86 && \\
|
||||
\t\tcp -f liblinphone-sdk/android-x86/lib/libgnustl_shared.so libs-debug/x86 && \\
|
||||
\t\tcp -f liblinphone-sdk/android-x86/lib/lib*-x86.so libs-debug/x86 && \\
|
||||
\t\tcp -f liblinphone-sdk/android-x86/lib/mediastreamer/plugins/*.so libs-debug/x86 && \\
|
||||
\t\tmkdir -p libs/x86 && \\
|
||||
\t\tcp -f liblinphone-sdk/android-x86/lib/libgnustl_shared.so libs/x86 && \\
|
||||
\t\tcp -f liblinphone-sdk/android-x86/lib/lib*-x86.so libs/x86 && \\
|
||||
\t\tcp -f liblinphone-sdk/android-x86/lib/mediastreamer/plugins/*.so libs/x86 && \\
|
||||
\t\tsh WORK/android-x86/strip.sh libs/x86/*.so; \\
|
||||
|
@ -303,8 +366,8 @@ help: help-prepare-options
|
|||
def main():
|
||||
preparator = AndroidPreparator()
|
||||
preparator.parse_args()
|
||||
if preparator.check_tools() != 0:
|
||||
preparator.show_missing_dependencies()
|
||||
if preparator.check_environment() != 0:
|
||||
preparator.show_environment_errors()
|
||||
return 1
|
||||
return preparator.run()
|
||||
|
||||
|
|
|
@ -392,7 +392,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
|
|||
}
|
||||
|
||||
final Preference delete = manage.getPreference(2);
|
||||
delete.setEnabled(true);
|
||||
delete.setEnabled(!isNewAccount);
|
||||
delete.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
mPrefs.deleteAccount(n);
|
||||
|
|
|
@ -728,6 +728,11 @@ public class LinphonePreferences {
|
|||
}
|
||||
|
||||
public void deleteAccount(int n) {
|
||||
LinphoneAuthInfo authInfo = getAuthInfo(n);
|
||||
if (authInfo != null) {
|
||||
getLc().removeAuthInfo(authInfo);
|
||||
}
|
||||
|
||||
LinphoneProxyConfig proxyCfg = getProxyConfig(n);
|
||||
if (proxyCfg != null)
|
||||
getLc().removeProxyConfig(proxyCfg);
|
||||
|
@ -737,11 +742,6 @@ public class LinphonePreferences {
|
|||
getLc().setDefaultProxyConfig(null);
|
||||
}
|
||||
|
||||
LinphoneAuthInfo authInfo = getAuthInfo(n);
|
||||
if (authInfo != null) {
|
||||
getLc().removeAuthInfo(authInfo);
|
||||
}
|
||||
|
||||
getLc().refreshRegisters();
|
||||
}
|
||||
// End of accounts settings
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9c8a905c202e6ee26ec66a9b1658fe11151aa3c9
|
||||
Subproject commit 1af41d70117131d2361b8c41ac7009f9e6ae672a
|
31
submodules/externals/build/cpplib/CMakeLists.txt
vendored
Normal file
31
submodules/externals/build/cpplib/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
############################################################################
|
||||
# CMakeLists.txt
|
||||
# Copyright (C) 2016 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(androidcpplib LANGUAGES NONE)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
install(FILES "${ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/${CMAKE_SYSTEM_PROCESSOR}/libc++_shared.so"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
||||
)
|
|
@ -1 +1 @@
|
|||
Subproject commit 9850fc31d3de4440f71872693b0c905621fb9b0d
|
||||
Subproject commit e0c204fb2b82b2b7c12d8030a94029395d5dd30d
|
Loading…
Reference in a new issue