-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #459 from meganz/release/v2.8.0
Merge the last stable developments into master
- Loading branch information
Showing
73 changed files
with
2,257 additions
and
1,195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/MEGASDK.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/MEGASDK.xcscheme | ||
/MEGASDK.xcodeproj/xcuserdata/MEGA.xcuserdatad/xcschemes/xcschememanagement.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
/cryptopp*.zip | ||
/curl* | ||
/openssl* | ||
/libsodium* | ||
/include | ||
/lib | ||
/karere-native | ||
/webrtc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/bin/sh | ||
|
||
EXPAT_VERSION="2.1.1" | ||
SDKVERSION=`xcrun -sdk iphoneos --show-sdk-version` | ||
|
||
############################################## | ||
CURRENTPATH=`pwd` | ||
OPENSSL_PREFIX="${CURRENTPATH}" | ||
ARCHS="i386 x86_64 armv7 armv7s arm64" | ||
DEVELOPER=`xcode-select -print-path` | ||
|
||
if [ ! -d "$DEVELOPER" ]; then | ||
echo "xcode path is not set correctly $DEVELOPER does not exist (most likely because of xcode > 4.3)" | ||
echo "run" | ||
echo "sudo xcode-select -switch <xcode path>" | ||
echo "for default installation:" | ||
echo "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer" | ||
exit 1 | ||
fi | ||
|
||
case $DEVELOPER in | ||
*\ * ) | ||
echo "Your Xcode path contains whitespaces, which is not supported." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
case $CURRENTPATH in | ||
*\ * ) | ||
echo "Your path contains whitespaces, which is not supported by 'make install'." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
set -e | ||
|
||
if [ ! -e "expat-${EXPAT_VERSION}.tar.bz2" ] | ||
then | ||
wget "http://downloads.sourceforge.net/project/expat/expat/2.1.1/expat-${EXPAT_VERSION}.tar.bz2" | ||
fi | ||
|
||
for ARCH in ${ARCHS} | ||
do | ||
if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]]; | ||
then | ||
PLATFORM="iPhoneSimulator" | ||
else | ||
PLATFORM="iPhoneOS" | ||
fi | ||
|
||
rm -rf expat-${EXPAT_VERSION} | ||
tar zxf expat-${EXPAT_VERSION}.tar.bz2 | ||
pushd "expat-${EXPAT_VERSION}" | ||
|
||
export BUILD_TOOLS="${DEVELOPER}" | ||
export BUILD_DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" | ||
export BUILD_SDKROOT="${BUILD_DEVROOT}/SDKs/${PLATFORM}${SDKVERSION}.sdk" | ||
|
||
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}" | ||
mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" | ||
|
||
# Build | ||
export LDFLAGS="-Os -arch ${ARCH} -Wl,-dead_strip -miphoneos-version-min=7.0 -L${BUILD_SDKROOT}/usr/lib" | ||
export CFLAGS="-Os -arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -miphoneos-version-min=7.0 -Wno-implicit-function-declaration" | ||
export CPPFLAGS="${CFLAGS} -I${BUILD_SDKROOT}/usr/include" | ||
export CXXFLAGS="${CPPFLAGS}" | ||
|
||
if [ "${ARCH}" == "arm64" ]; then | ||
./configure --host=aarch64-apple-darwin --enable-static --disable-shared | ||
else | ||
./configure --host=${ARCH}-apple-darwin --enable-static --disable-shared | ||
fi | ||
|
||
make -j8 | ||
cp -f .libs/libexpat.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
#make clean | ||
|
||
popd | ||
|
||
done | ||
|
||
|
||
mkdir lib || true | ||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libexpat.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libexpat.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libexpat.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libexpat.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libexpat.a -output ${CURRENTPATH}/lib/libexpat.a | ||
|
||
mkdir -p include/expat || true | ||
cp -f expat-${EXPAT_VERSION}/lib/*.h include/expat/ | ||
|
||
rm -rf bin | ||
rm -rf expat-${EXPAT_VERSION} | ||
rm -rf expat-${EXPAT_VERSION}.tar.bz2 | ||
|
||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#!/bin/sh | ||
|
||
MEGACHAT_VERSION="GIT" | ||
SDKVERSION=`xcrun -sdk iphoneos --show-sdk-version` | ||
|
||
############################################## | ||
CURRENTPATH=`pwd` | ||
OPENSSL_PREFIX="${CURRENTPATH}" | ||
ARCHS="i386 x86_64 armv7 armv7s arm64" | ||
DEVELOPER=`xcode-select -print-path` | ||
|
||
if [ ! -d "$DEVELOPER" ]; then | ||
echo "xcode path is not set correctly $DEVELOPER does not exist (most likely because of xcode > 4.3)" | ||
echo "run" | ||
echo "sudo xcode-select -switch <xcode path>" | ||
echo "for default installation:" | ||
echo "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer" | ||
exit 1 | ||
fi | ||
|
||
case $DEVELOPER in | ||
*\ * ) | ||
echo "Your Xcode path contains whitespaces, which is not supported." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
case $CURRENTPATH in | ||
*\ * ) | ||
echo "Your path contains whitespaces, which is not supported by 'make install'." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
set -e | ||
|
||
if [ ! -d "karere-native" ] | ||
then | ||
git clone --recursive -b develop https://code.developers.mega.co.nz/messenger/karere-native | ||
fi | ||
|
||
for ARCH in ${ARCHS} | ||
do | ||
if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]]; | ||
then | ||
PLATFORM="iPhoneSimulator" | ||
else | ||
PLATFORM="iPhoneOS" | ||
fi | ||
|
||
pushd karere-native/third-party/libevent | ||
git reset --hard && git clean -dfx | ||
|
||
export BUILD_TOOLS="${DEVELOPER}" | ||
export BUILD_DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" | ||
export BUILD_SDKROOT="${BUILD_DEVROOT}/SDKs/${PLATFORM}${SDKVERSION}.sdk" | ||
|
||
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}" | ||
mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" | ||
|
||
# Build | ||
export LDFLAGS="-Os -arch ${ARCH} -Wl,-dead_strip -miphoneos-version-min=7.0 -L${BUILD_SDKROOT}/usr/lib -L${OPENSSL_PREFIX}/lib" | ||
export CFLAGS="-Os -arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -miphoneos-version-min=7.0 -I${OPENSSL_PREFIX}/include" | ||
export CPPFLAGS="${CFLAGS} -I${BUILD_SDKROOT}/usr/include" | ||
export CXXFLAGS="${CPPFLAGS}" | ||
|
||
./autogen.sh | ||
|
||
if [ "${ARCH}" == "arm64" ]; then | ||
./configure --host=aarch64-apple-darwin --enable-static --disable-shared --disable-libevent-regress --disable-tests --disable-samples | ||
else | ||
./configure --host=${ARCH}-apple-darwin --enable-static --disable-shared --disable-libevent-regress --disable-tests --disable-samples | ||
fi | ||
|
||
make -j8 | ||
cp -f .libs/libevent.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
cp -f .libs/libevent_core.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
cp -f .libs/libevent_extra.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
cp -f .libs/libevent_pthreads.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
cp -f .libs/libevent_openssl.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
|
||
#make clean | ||
|
||
popd | ||
|
||
done | ||
|
||
|
||
mkdir lib || true | ||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libevent.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libevent.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libevent.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libevent.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libevent.a -output ${CURRENTPATH}/lib/libevent.a | ||
|
||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libevent_core.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libevent_core.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libevent_core.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libevent_core.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libevent_core.a -output ${CURRENTPATH}/lib/libevent_core.a | ||
|
||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libevent_extra.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libevent_extra.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libevent_extra.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libevent_extra.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libevent_extra.a -output ${CURRENTPATH}/lib/libevent_extra.a | ||
|
||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libevent_pthreads.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libevent_pthreads.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libevent_pthreads.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libevent_pthreads.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libevent_pthreads.a -output ${CURRENTPATH}/lib/libevent_pthreads.a | ||
|
||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libevent_openssl.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libevent_openssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libevent_openssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libevent_openssl.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libevent_openssl.a -output ${CURRENTPATH}/lib/libevent_openssl.a | ||
|
||
mkdir -p include/libevent || true | ||
cp -f -R karere-native/third-party/libevent/include/* include/libevent/ | ||
|
||
#rm -rf bin | ||
#rm -rf expat-${EXPAT_VERSION} | ||
#rm -rf expat-${EXPAT_VERSION}.tar.bz2 | ||
|
||
echo "Done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,91 @@ | ||
#!/bin/sh | ||
|
||
LIBSODIUM_VERSION="1.0.11" | ||
SDKVERSION=`xcrun -sdk iphoneos --show-sdk-version` | ||
|
||
############################################## | ||
CURRENTPATH=`pwd` | ||
ARCHS="i386 x86_64 armv7 armv7s arm64" | ||
DEVELOPER=`xcode-select -print-path` | ||
|
||
if [ ! -d "$DEVELOPER" ]; then | ||
echo "xcode path is not set correctly $DEVELOPER does not exist (most likely because of xcode > 4.3)" | ||
echo "run" | ||
echo "sudo xcode-select -switch <xcode path>" | ||
echo "for default installation:" | ||
echo "sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer" | ||
exit 1 | ||
fi | ||
|
||
case $DEVELOPER in | ||
*\ * ) | ||
echo "Your Xcode path contains whitespaces, which is not supported." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
case $CURRENTPATH in | ||
*\ * ) | ||
echo "Your path contains whitespaces, which is not supported by 'make install'." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
set -e | ||
|
||
if [ ! -e "libsodium-${LIBSODIUM_VERSION}.tar.gz" ] | ||
then | ||
curl -LO "https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM_VERSION}/libsodium-${LIBSODIUM_VERSION}.tar.gz" | ||
wget "https://github.com/jedisct1/libsodium/releases/download/${LIBSODIUM_VERSION}/libsodium-${LIBSODIUM_VERSION}.tar.gz" | ||
fi | ||
|
||
for ARCH in ${ARCHS} | ||
do | ||
if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]]; | ||
then | ||
PLATFORM="iPhoneSimulator" | ||
else | ||
PLATFORM="iPhoneOS" | ||
fi | ||
|
||
rm -rf libsodium-${LIBSODIUM_VERSION} | ||
tar zxf libsodium-${LIBSODIUM_VERSION}.tar.gz | ||
pushd "libsodium-${LIBSODIUM_VERSION}" | ||
|
||
sh dist-build/ios.sh | ||
export BUILD_TOOLS="${DEVELOPER}" | ||
export BUILD_DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer" | ||
export BUILD_SDKROOT="${BUILD_DEVROOT}/SDKs/${PLATFORM}${SDKVERSION}.sdk" | ||
|
||
cp -f libsodium-ios/lib/libsodium.a ../lib | ||
cp -fR libsodium-ios/include/sodium* ../include | ||
#make clean | ||
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}" | ||
mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" | ||
|
||
# Build | ||
export LDFLAGS="-Os -arch ${ARCH} -Wl,-dead_strip -miphoneos-version-min=7.0 -L${BUILD_SDKROOT}/usr/lib" | ||
export CFLAGS="-Os -arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -miphoneos-version-min=7.0" | ||
export CPPFLAGS="${CFLAGS} -I${BUILD_SDKROOT}/usr/include" | ||
export CXXFLAGS="${CPPFLAGS}" | ||
|
||
if [ "${ARCH}" == "arm64" ]; then | ||
./configure --host=aarch64-apple-darwin --disable-shared --enable-minimal | ||
else | ||
./configure --host=${ARCH}-apple-darwin --disable-shared --enable-minimal | ||
fi | ||
|
||
make -j8 | ||
|
||
cp -f src/libsodium/.libs/libsodium.a ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/ | ||
|
||
popd | ||
|
||
rm -rf libsodium-${LIBSODIUM_VERSION} | ||
rm -rf libsodium-${LIBSODIUM_VERSION}.tar.gz | ||
done | ||
|
||
|
||
mkdir lib || true | ||
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/libsodium.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/libsodium.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/libsodium.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/libsodium.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/libsodium.a -output ${CURRENTPATH}/lib/libsodium.a | ||
|
||
cp -fR libsodium-${LIBSODIUM_VERSION}/src/libsodium/include/sodium* include | ||
|
||
rm -rf bin | ||
rm -rf libsodium-${LIBSODIUM_VERSION} | ||
|
||
echo "Done." | ||
|
Oops, something went wrong.