Skip to content

Commit

Permalink
Merge pull request #1490 from meganz/release/v3.5.4
Browse files Browse the repository at this point in the history
Release/v3.5.4
  • Loading branch information
sergiohs84 authored Jun 27, 2019
2 parents 282da4e + e9bba26 commit b668402
Show file tree
Hide file tree
Showing 49 changed files with 2,582 additions and 1,035 deletions.
2 changes: 1 addition & 1 deletion bindings/ios/3rdparty/build-cryptopp.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CURRENTPATH=`pwd`

CRYPTOPP_VERSION="982655845a784a9a4cfbc92221359a25a74184a3"
CRYPTOPP_VERSION="5e5fb6c855e0f0232065079ab96414ce1a78c411"

set -e

Expand Down
42 changes: 42 additions & 0 deletions bindings/java/nz/mega/sdk/MegaApiJava.java
Original file line number Diff line number Diff line change
Expand Up @@ -6859,6 +6859,35 @@ public ArrayList<MegaNode> search(String searchString) {
return nodeListToArray(megaApi.search(searchString));
}

/**
* Return a list of buckets, each bucket containing a list of recently added/modified nodes
*
* Each bucket contains files that were added/modified in a set, by a single user.
*
* @param days Age of actions since added/modified nodes will be considered (in days)
* @param maxnodes Maximum amount of nodes to be considered
*
* @return List of buckets containing nodes that were added/modifed as a set
*/
public ArrayList<MegaRecentActionBucket> getRecentActions (long days, long maxnodes) {
return recentActionsToArray(megaApi.getRecentActions(days, maxnodes));
}

/**
* Return a list of buckets, each bucket containing a list of recently added/modified nodes
*
* Each bucket contains files that were added/modified in a set, by a single user.
*
* This function uses the default parameters for the MEGA apps, which consider (currently)
* interactions during the last 90 days and max 10.000 nodes.
*
* @return List of buckets containing nodes that were added/modifed as a set
*/

public ArrayList<MegaRecentActionBucket> getRecentActions () {
return recentActionsToArray(megaApi.getRecentActions());
}

/**
* Process a node tree using a MegaTreeProcessor implementation.
*
Expand Down Expand Up @@ -7955,4 +7984,17 @@ static ArrayList<MegaUserAlert> userAlertListToArray(MegaUserAlertList userAlert

return result;
}

static ArrayList<MegaRecentActionBucket> recentActionsToArray(MegaRecentActionBucketList recentActionList) {
if (recentActionList == null) {
return null;
}

ArrayList<MegaRecentActionBucket> result = new ArrayList<>(recentActionList.size());
for (int i = 0; i< recentActionList.size(); i++) {
result.add(recentActionList.get(i).copy());
}

return result;
}
}
18 changes: 12 additions & 6 deletions contrib/build_android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -z "$ANDROID_NDK_ROOT" ]; then
fi

_ANDROID_ARCH=arch-arm
_ANDROID_API="android-9"
_ANDROID_API="android-21"
export ANDROID_GCC_VER=4.9

export ANDROID_SYSROOT="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH"
Expand All @@ -49,16 +49,22 @@ export HOSTCC=gcc
#export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi/$STLPORT_LIB"

#GNU STL
export ANDROID_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include"
export ANDROID_STL_INC2="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/include"
export GNUSTL_LIB=libgnustl_static.a
export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/libs/armeabi/$ANDROID_GNUSTL_LIB"
#export ANDROID_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include"
#export ANDROID_STL_INC2="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/include"
#export GNUSTL_LIB=libgnustl_static.a
#export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/$ANDROID_GNUSTL_LIB"

#cryptopp565
#libc++ STL
export ANDROID_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/include"
export ANDROID_STL_INC2="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/armeabi/include"
export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/armeabi/$ANDROID_GNUSTL_LIB"

#cryptopp
export AOSP_SYSROOT="$ANDROID_SYSROOT" #used by cryptopp
export AOSP_STL_LIB="$ANDROID_STL_LIB"
export AOSP_BITS_INC="$ANDROID_STL_INC"
export AOSP_FLAGS="$ANDROID_FLAGS"
export CXXFLAGS="${CXXFLAGS} -DCRYPTOPP_DISABLE_ASM"

export MACHINE=armv7
export RELEASE=2.6.37
Expand Down
20 changes: 13 additions & 7 deletions contrib/build_android32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -z "$ANDROID_NDK_ROOT" ]; then
fi

_ANDROID_ARCH=arch-arm
_ANDROID_API="android-9"
_ANDROID_API="android-21"
export ANDROID_GCC_VER=4.9

export ANDROID_SYSROOT="$ANDROID_NDK_ROOT/platforms/$_ANDROID_API/$_ANDROID_ARCH"
Expand All @@ -49,16 +49,22 @@ export HOSTCC=gcc
#export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi/$STLPORT_LIB"

#GNU STL
export ANDROID_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include"
export ANDROID_STL_INC2="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include"
export GNUSTL_LIB=libgnustl_static.a
export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/libs/armeabi/$ANDROID_GNUSTL_LIB"
#export ANDROID_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/include"
#export ANDROID_STL_INC2="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/include"
#export GNUSTL_LIB=libgnustl_static.a
#export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/gnu-libstdc++/${ANDROID_GCC_VER}/libs/armeabi/$ANDROID_GNUSTL_LIB"

#cryptopp565
#libc++ STL
export ANDROID_STL_INC="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/include"
export ANDROID_STL_INC2="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/armeabi/include"
export ANDROID_STL_LIB="$ANDROID_NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/armeabi/$ANDROID_GNUSTL_LIB"

#cryptopp
export AOSP_SYSROOT="$ANDROID_SYSROOT" #used by cryptopp
export AOSP_STL_LIB="$ANDROID_STL_LIB"
export AOSP_BITS_INC="$ANDROID_STL_INC"
export AOSP_FLAGS="$ANDROID_FLAGS"
export CXXFLAGS="${CXXFLAGS} -DCRYPTOPP_DISABLE_ASM"

export MACHINE=armv7
export RELEASE=2.6.37
Expand All @@ -85,7 +91,7 @@ export INCLUDE="-I${SYSROOT}/usr/include -I${TOOLCHAIN_INC} -I${ANDROID_STL_INC}

export CFLAGS="${CFLAGS} --sysroot=${SYSROOT}"
export CXXFLAGS="${CXXFLAGS} --sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${TOOLCHAIN_INC} -I${ANDROID_STL_INC} -I${ANDROID_STL_INC2}"
export CPPFLAGS="--sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${TOOLCHAIN_INC} -I${ANDROID_STL_INC}"
export CPPFLAGS="--sysroot=${SYSROOT} -I${SYSROOT}/usr/include -I${TOOLCHAIN_INC} -I${ANDROID_STL_INC} -I${ANDROID_STL_INC2}"
export LDFLAGS="${LDFLAGS} -L${SYSROOT}/usr/lib -L${TOOLCHAIN_LIB}"

opts="--host=arm-linux-androideabi --with-sysroot=$SYSROOT "
Expand Down
14 changes: 11 additions & 3 deletions contrib/build_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,13 @@ package_install() {
local cwd=$(pwd)
cd $dir

make install $target &> ../$name.install.log
if [ $android_build -eq 1 ] && [[ $name == "Crypto++"* ]]; then
echo make install-lib $target
make install-lib $target &> ../$name.install.log || make install $target &> ../$name.install.log
else
echo make install $target
make install $target &> ../$name.install.log
fi
local exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "Failed to install $name, exit status: $exit_code"
Expand Down Expand Up @@ -384,9 +390,9 @@ cryptopp_pkg() {
local build_dir=$1
local install_dir=$2
local name="Crypto++"
local cryptopp_ver="565"
local cryptopp_ver="800"
local cryptopp_url="http://www.cryptopp.com/cryptopp$cryptopp_ver.zip"
local cryptopp_md5="df5ef4647b4e978bba0cac79a83aaed5"
local cryptopp_md5="f5affc19468c78fd8c5694c664cbd8ec"
local cryptopp_file="cryptopp$cryptopp_ver.zip"
local cryptopp_dir="cryptopp$cryptopp_ver"

Expand All @@ -408,6 +414,8 @@ cryptopp_pkg() {
sed "s#CXXFLAGS += -march=native#CXXFLAGS += #g" -i $cryptopp_dir/GNUmakefile

if [ $android_build -eq 1 ]; then
cp ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.h $cryptopp_dir/
cp ${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.c $cryptopp_dir/
package_build $name $cryptopp_dir "static -f GNUmakefile-cross"
package_install $name $cryptopp_dir $install_dir "-f GNUmakefile-cross"
else
Expand Down
Loading

0 comments on commit b668402

Please sign in to comment.