This commit is contained in:
Ali 2020-02-18 04:47:09 +04:00
parent 33820a1882
commit 22abc4fa6c
7 changed files with 105 additions and 98 deletions

View File

@ -595,7 +595,8 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
secondaryColor: UIColor(rgb: 0x5e5e5e), secondaryColor: UIColor(rgb: 0x5e5e5e),
accentColor: accentColor, accentColor: accentColor,
destructiveColor: UIColor(rgb: 0xff3b30), destructiveColor: UIColor(rgb: 0xff3b30),
disabledColor: UIColor(rgb: 0xd0d0d0) disabledColor: UIColor(rgb: 0xd0d0d0),
baseFontSize: 17.0
), ),
actionSheet: ActionSheetControllerTheme( actionSheet: ActionSheetControllerTheme(
dimColor: UIColor(white: 0.0, alpha: 0.4), dimColor: UIColor(white: 0.0, alpha: 0.4),
@ -611,7 +612,8 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
controlColor: UIColor(rgb: 0x7e8791), controlColor: UIColor(rgb: 0x7e8791),
switchFrameColor: UIColor(rgb: 0xe0e0e0), switchFrameColor: UIColor(rgb: 0xe0e0e0),
switchContentColor: UIColor(rgb: 0x77d572), switchContentColor: UIColor(rgb: 0x77d572),
switchHandleColor: UIColor(rgb: 0xffffff) switchHandleColor: UIColor(rgb: 0xffffff),
baseFontSize: 17.0
) )
), strings: WalletStrings( ), strings: WalletStrings(
primaryComponent: WalletStringsComponent( primaryComponent: WalletStringsComponent(

View File

@ -19,7 +19,7 @@ objc_library(
copts = [ copts = [
'-DAPP_CONFIG_API_ID=0', '-DAPP_CONFIG_API_ID=0',
'-DAPP_CONFIG_API_HASH="1"', '-DAPP_CONFIG_API_HASH="1"',
'-DAPP_CONFIG_HOCKEYAPP_ID="1"', '-DAPP_CONFIG_APP_CENTER_ID="1"',
'-DAPP_CONFIG_IS_INTERNAL_BUILD=false', '-DAPP_CONFIG_IS_INTERNAL_BUILD=false',
'-DAPP_CONFIG_IS_APPSTORE_BUILD=true', '-DAPP_CONFIG_IS_APPSTORE_BUILD=true',
'-DAPP_CONFIG_APPSTORE_ID=0', '-DAPP_CONFIG_APPSTORE_ID=0',

View File

@ -50,24 +50,9 @@ open class ListViewItemHeaderNode: ASDisplayNode {
self.spring = ListViewItemSpring(stiffness: -280.0, damping: -24.0, mass: 0.85) self.spring = ListViewItemSpring(stiffness: -280.0, damping: -24.0, mass: 0.85)
} }
if seeThrough { super.init()
if (layerBacked) {
super.init()
self.setLayerBlock({
return CASeeThroughTracingLayer()
})
} else {
super.init()
self.setViewBlock({
return CASeeThroughTracingView()
})
}
} else {
super.init()
self.isLayerBacked = layerBacked self.isLayerBacked = layerBacked
}
} }
open func updateStickDistanceFactor(_ factor: CGFloat, transition: ContainedViewLayoutTransition) { open func updateStickDistanceFactor(_ factor: CGFloat, transition: ContainedViewLayoutTransition) {

View File

@ -109,40 +109,37 @@ openssl_libs = [
"libcrypto.a", "libcrypto.a",
] ]
archs = ["arm64", "armv7", "x86_64"]
rules = [
genrule(
name = "openssl_build_" + arch,
srcs = [
"build-openssl.sh",
"openssl-1.1.1d.tar.gz",
"patch-conf.patch",
"patch-include.patch",
],
cmd_bash =
"mkdir -p $(RULEDIR)/{} && cp $(SRCS) $(RULEDIR)/{}/ && sh $(RULEDIR)/{}/build-openssl.sh $(RULEDIR)/{} $(RULEDIR)/{} ".format(arch, arch, arch, arch, arch) + arch + "\n" +
("\n".join(["cp \"$(RULEDIR)/{}/build/arm64/include/openssl/{}\" \"$(location :{})\"\n".format(arch, x, x) for x in openssl_headers]) if arch == "arm64" else "") +
"\n".join([
"cp \"$(RULEDIR)/{}/build/{}/lib/{}\" \"$(location :{})\"\n".format(arch, arch, x, arch + "_" + x) for x in openssl_libs
]),
outs =
(openssl_headers if arch == "arm64" else []) +
[arch + "_" + x for x in openssl_libs],
visibility = [
"//visibility:public",
]
) for arch in archs
]
genrule( genrule(
name = "openssl_fat_libraries", name = "openssl_build",
srcs = [":" + arch + "_" + openssl_libs[0] for arch in archs], srcs = [
cmd_bash = "xcrun lipo {} -output {} -create".format(" ".join(["$(location :" + arch + "_" + openssl_libs[0] + ")" for arch in archs]), "$(location " + openssl_libs[0] + ")"), "build-openssl.sh",
outs = openssl_libs, "openssl-1.1.1d.tar.gz",
"patch-conf.patch",
"patch-include.patch",
],
cmd_bash =
"""
if [ "$(TARGET_CPU)" == "ios_armv7" ]; then
BUILD_ARCH="armv7"
elif [ "$(TARGET_CPU)" == "ios_arm64" ]; then
BUILD_ARCH="arm64"
elif [ "$(TARGET_CPU)" == "ios_x86_64" ]; then
BUILD_ARCH="x86_64"
else
echo "Unsupported architecture $(TARGET_CPU)"
fi
""" + "\n" +
"mkdir -p $(RULEDIR)/$$BUILD_ARCH && cp $(SRCS) $(RULEDIR)/$$BUILD_ARCH/ && sh $(RULEDIR)/$$BUILD_ARCH/build-openssl.sh $(RULEDIR)/$$BUILD_ARCH $(RULEDIR)/$$BUILD_ARCH $$BUILD_ARCH" + "\n" +
"\n".join([
"cp \"$(RULEDIR)/$$BUILD_ARCH/build/arm64/include/openssl/{}\" \"$(location :{})\"\n".format(x, x) for x in openssl_headers
]) +
"\n".join([
"cp \"$(RULEDIR)/$$BUILD_ARCH/build/$$BUILD_ARCH/lib/{}\" \"$(location :{})\"\n".format(x, x) for x in openssl_libs
]),
outs = openssl_headers + openssl_libs,
visibility = [ visibility = [
"//visibility:public", "//visibility:public",
], ]
) )
genrule( genrule(

View File

@ -48,6 +48,16 @@ genrule(
""" """
set -ex set -ex
if [ "$(TARGET_CPU)" == "ios_armv7" ]; then
BUILD_ARCH="armv7"
elif [ "$(TARGET_CPU)" == "ios_arm64" ]; then
BUILD_ARCH="arm64"
elif [ "$(TARGET_CPU)" == "ios_x86_64" ]; then
BUILD_ARCH="x86_64"
else
echo "Unsupported architecture $(TARGET_CPU)"
fi
cp $(location :build-ton.sh) "$(RULEDIR)/" cp $(location :build-ton.sh) "$(RULEDIR)/"
cp $(location :iOS.cmake) "$(RULEDIR)/" cp $(location :iOS.cmake) "$(RULEDIR)/"
tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/" tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/"
@ -60,7 +70,7 @@ genrule(
done done
mkdir -p "$(RULEDIR)/Public/ton" mkdir -p "$(RULEDIR)/Public/ton"
sh $(RULEDIR)/build-ton.sh "$(RULEDIR)" "$(RULEDIR)" "$(RULEDIR)/openssl_headers" sh $(RULEDIR)/build-ton.sh "$(RULEDIR)" "$(RULEDIR)" "$(RULEDIR)/openssl_headers" $$BUILD_ARCH
""" + """ +
"\n".join([ "\n".join([
"cp -f \"$(RULEDIR)/build/out/include/{}\" \"$(location Public/ton/include/{})\"".format(header, header) for header in ton_headers "cp -f \"$(RULEDIR)/build/out/include/{}\" \"$(location Public/ton/include/{})\"".format(header, header) for header in ton_headers

View File

@ -6,6 +6,7 @@ set -e
OUT_DIR="$(pwd)/$1" OUT_DIR="$(pwd)/$1"
SOURCE_DIR="$(pwd)/$2" SOURCE_DIR="$(pwd)/$2"
openssl_base_path="$(pwd)/$3" openssl_base_path="$(pwd)/$3"
arch="$4"
if [ -z "$openssl_base_path" ]; then if [ -z "$openssl_base_path" ]; then
echo "Usage: sh build-ton.sh path/to/openssl" echo "Usage: sh build-ton.sh path/to/openssl"
@ -25,52 +26,44 @@ mkdir -p "$OUT_DIR"
mkdir -p "$OUT_DIR/build" mkdir -p "$OUT_DIR/build"
cd "$OUT_DIR/build" cd "$OUT_DIR/build"
platforms="iOS" openssl_path="$openssl_base_path"
for platform in $platforms; do echo "OpenSSL path = ${openssl_path}"
openssl_path="$openssl_base_path" openssl_crypto_library="${openssl_path}/lib/libcrypto.a"
echo "OpenSSL path = ${openssl_path}" openssl_ssl_library="${openssl_path}/lib/libssl.a"
openssl_crypto_library="${openssl_path}/lib/libcrypto.a" options="$options -DOPENSSL_FOUND=1"
openssl_ssl_library="${openssl_path}/lib/libssl.a" options="$options -DOPENSSL_CRYPTO_LIBRARY=${openssl_crypto_library}"
options="$options -DOPENSSL_FOUND=1" options="$options -DOPENSSL_INCLUDE_DIR=${openssl_path}/include"
options="$options -DOPENSSL_CRYPTO_LIBRARY=${openssl_crypto_library}" options="$options -DOPENSSL_LIBRARIES=${openssl_crypto_library}"
options="$options -DOPENSSL_INCLUDE_DIR=${openssl_path}/include" options="$options -DCMAKE_BUILD_TYPE=Release"
options="$options -DOPENSSL_LIBRARIES=${openssl_crypto_library}"
options="$options -DCMAKE_BUILD_TYPE=Release"
if [[ $skip_build = "" ]]; then
simulators="0 1"
else
simulators=""
fi
for simulator in $simulators;
do
build="build-${platform}"
install="install-${platform}"
if [[ $simulator = "1" ]]; then
build="${build}-simulator"
install="${install}-simulator"
ios_platform="SIMULATOR"
else
ios_platform="OS"
fi
echo "Platform = ${platform} Simulator = ${simulator}"
echo $ios_platform
rm -rf $build
mkdir -p $build
mkdir -p $install
cd $build
cmake $td_path $options -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DIOS_PLATFORM=${ios_platform} -DTON_ARCH= -DCMAKE_INSTALL_PREFIX=../${install}
CORE_COUNT=`sysctl -n hw.logicalcpu`
make -j$CORE_COUNT install || exit
cd ..
done
mkdir -p $platform
mkdir -p "out" build="build-${arch}"
cp -r "install-iOS/include" "out/" install="install-${arch}"
mkdir -p "out/lib"
for f in install-iOS/lib/*.a; do if [ "$arch" == "armv7" ]; then
lib_name=$(basename "$f") ios_platform="OSV7"
lipo -create "install-iOS/lib/$lib_name" "install-iOS-simulator/lib/$lib_name" -o "out/lib/$lib_name" elif [ "$arch" == "arm64" ]; then
done ios_platform="OS64"
elif [ "$arch" == "x86_64" ]; then
ios_platform="SIMULATOR"
else
echo "Unsupported architecture $arch"
exit 1
fi
rm -rf $build
mkdir -p $build
mkdir -p $install
cd $build
cmake $td_path $options -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" -DIOS_PLATFORM=${ios_platform} -DTON_ARCH= -DCMAKE_INSTALL_PREFIX=../${install}
CORE_COUNT=`sysctl -n hw.logicalcpu`
make -j$CORE_COUNT install || exit
cd ..
mkdir -p "out"
cp -r "$install/include" "out/"
mkdir -p "out/lib"
for f in $install/lib/*.a; do
lib_name=$(basename "$f")
cp "$install/lib/$lib_name" "out/lib/$lib_name"
done done

View File

@ -66,6 +66,22 @@ if (${IOS_PLATFORM} STREQUAL "OS")
# This causes the installers to properly locate the output libraries # This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos") set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
set (APPLE_IOS True)
elseif (${IOS_PLATFORM} STREQUAL "OSV7")
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
set (XCODE_IOS_PLATFORM iphoneos)
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
set (APPLE_IOS True)
elseif (${IOS_PLATFORM} STREQUAL "OS64")
set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
set (XCODE_IOS_PLATFORM iphoneos)
# This causes the installers to properly locate the output libraries
set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
set (APPLE_IOS True) set (APPLE_IOS True)
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR") elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
set (SIMULATOR_FLAG true) set (SIMULATOR_FLAG true)
@ -194,6 +210,10 @@ set (CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS su
# set the architecture for iOS # set the architecture for iOS
if (IOS_PLATFORM STREQUAL "OS") if (IOS_PLATFORM STREQUAL "OS")
set (IOS_ARCH "armv7;arm64") set (IOS_ARCH "armv7;arm64")
elseif (IOS_PLATFORM STREQUAL "OSV7")
set (IOS_ARCH "armv7")
elseif (IOS_PLATFORM STREQUAL "OS64")
set (IOS_ARCH "arm64")
elseif (IOS_PLATFORM STREQUAL "SIMULATOR") elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
set (IOS_ARCH "x86_64") set (IOS_ARCH "x86_64")
elseif (IOS_PLATFORM STREQUAL "WATCHOS") elseif (IOS_PLATFORM STREQUAL "WATCHOS")