mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Temp
This commit is contained in:
parent
33820a1882
commit
22abc4fa6c
@ -595,7 +595,8 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
secondaryColor: UIColor(rgb: 0x5e5e5e),
|
||||
accentColor: accentColor,
|
||||
destructiveColor: UIColor(rgb: 0xff3b30),
|
||||
disabledColor: UIColor(rgb: 0xd0d0d0)
|
||||
disabledColor: UIColor(rgb: 0xd0d0d0),
|
||||
baseFontSize: 17.0
|
||||
),
|
||||
actionSheet: ActionSheetControllerTheme(
|
||||
dimColor: UIColor(white: 0.0, alpha: 0.4),
|
||||
@ -611,7 +612,8 @@ final class AppDelegate: NSObject, UIApplicationDelegate {
|
||||
controlColor: UIColor(rgb: 0x7e8791),
|
||||
switchFrameColor: UIColor(rgb: 0xe0e0e0),
|
||||
switchContentColor: UIColor(rgb: 0x77d572),
|
||||
switchHandleColor: UIColor(rgb: 0xffffff)
|
||||
switchHandleColor: UIColor(rgb: 0xffffff),
|
||||
baseFontSize: 17.0
|
||||
)
|
||||
), strings: WalletStrings(
|
||||
primaryComponent: WalletStringsComponent(
|
||||
|
@ -19,7 +19,7 @@ objc_library(
|
||||
copts = [
|
||||
'-DAPP_CONFIG_API_ID=0',
|
||||
'-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_APPSTORE_BUILD=true',
|
||||
'-DAPP_CONFIG_APPSTORE_ID=0',
|
||||
|
@ -50,25 +50,10 @@ open class ListViewItemHeaderNode: ASDisplayNode {
|
||||
self.spring = ListViewItemSpring(stiffness: -280.0, damping: -24.0, mass: 0.85)
|
||||
}
|
||||
|
||||
if seeThrough {
|
||||
if (layerBacked) {
|
||||
super.init()
|
||||
self.setLayerBlock({
|
||||
return CASeeThroughTracingLayer()
|
||||
})
|
||||
} else {
|
||||
super.init()
|
||||
|
||||
self.setViewBlock({
|
||||
return CASeeThroughTracingView()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
super.init()
|
||||
|
||||
self.isLayerBacked = layerBacked
|
||||
}
|
||||
}
|
||||
|
||||
open func updateStickDistanceFactor(_ factor: CGFloat, transition: ContainedViewLayoutTransition) {
|
||||
}
|
||||
|
@ -109,11 +109,8 @@ openssl_libs = [
|
||||
"libcrypto.a",
|
||||
]
|
||||
|
||||
archs = ["arm64", "armv7", "x86_64"]
|
||||
|
||||
rules = [
|
||||
genrule(
|
||||
name = "openssl_build_" + arch,
|
||||
name = "openssl_build",
|
||||
srcs = [
|
||||
"build-openssl.sh",
|
||||
"openssl-1.1.1d.tar.gz",
|
||||
@ -121,28 +118,28 @@ rules = [
|
||||
"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 "") +
|
||||
"""
|
||||
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/{}/lib/{}\" \"$(location :{})\"\n".format(arch, arch, x, arch + "_" + x) for x in openssl_libs
|
||||
"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 if arch == "arm64" else []) +
|
||||
[arch + "_" + x for x in openssl_libs],
|
||||
outs = openssl_headers + openssl_libs,
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
]
|
||||
) for arch in archs
|
||||
]
|
||||
|
||||
genrule(
|
||||
name = "openssl_fat_libraries",
|
||||
srcs = [":" + arch + "_" + openssl_libs[0] for arch in archs],
|
||||
cmd_bash = "xcrun lipo {} -output {} -create".format(" ".join(["$(location :" + arch + "_" + openssl_libs[0] + ")" for arch in archs]), "$(location " + openssl_libs[0] + ")"),
|
||||
outs = openssl_libs,
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
)
|
||||
|
||||
genrule(
|
||||
|
@ -48,6 +48,16 @@ genrule(
|
||||
"""
|
||||
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 :iOS.cmake) "$(RULEDIR)/"
|
||||
tar -xzf $(location tonlib-src.tar.gz) -C "$(RULEDIR)/"
|
||||
@ -60,7 +70,7 @@ genrule(
|
||||
done
|
||||
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([
|
||||
"cp -f \"$(RULEDIR)/build/out/include/{}\" \"$(location Public/ton/include/{})\"".format(header, header) for header in ton_headers
|
||||
|
@ -6,6 +6,7 @@ set -e
|
||||
OUT_DIR="$(pwd)/$1"
|
||||
SOURCE_DIR="$(pwd)/$2"
|
||||
openssl_base_path="$(pwd)/$3"
|
||||
arch="$4"
|
||||
|
||||
if [ -z "$openssl_base_path" ]; then
|
||||
echo "Usage: sh build-ton.sh path/to/openssl"
|
||||
@ -25,8 +26,6 @@ mkdir -p "$OUT_DIR"
|
||||
mkdir -p "$OUT_DIR/build"
|
||||
cd "$OUT_DIR/build"
|
||||
|
||||
platforms="iOS"
|
||||
for platform in $platforms; do
|
||||
openssl_path="$openssl_base_path"
|
||||
echo "OpenSSL path = ${openssl_path}"
|
||||
openssl_crypto_library="${openssl_path}/lib/libcrypto.a"
|
||||
@ -36,24 +35,21 @@ for platform in $platforms; do
|
||||
options="$options -DOPENSSL_INCLUDE_DIR=${openssl_path}/include"
|
||||
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"
|
||||
|
||||
build="build-${arch}"
|
||||
install="install-${arch}"
|
||||
|
||||
if [ "$arch" == "armv7" ]; then
|
||||
ios_platform="OSV7"
|
||||
elif [ "$arch" == "arm64" ]; then
|
||||
ios_platform="OS64"
|
||||
elif [ "$arch" == "x86_64" ]; then
|
||||
ios_platform="SIMULATOR"
|
||||
else
|
||||
ios_platform="OS"
|
||||
echo "Unsupported architecture $arch"
|
||||
exit 1
|
||||
fi
|
||||
echo "Platform = ${platform} Simulator = ${simulator}"
|
||||
echo $ios_platform
|
||||
|
||||
rm -rf $build
|
||||
mkdir -p $build
|
||||
mkdir -p $install
|
||||
@ -62,15 +58,12 @@ for platform in $platforms; do
|
||||
CORE_COUNT=`sysctl -n hw.logicalcpu`
|
||||
make -j$CORE_COUNT install || exit
|
||||
cd ..
|
||||
done
|
||||
mkdir -p $platform
|
||||
|
||||
mkdir -p "out"
|
||||
cp -r "install-iOS/include" "out/"
|
||||
cp -r "$install/include" "out/"
|
||||
mkdir -p "out/lib"
|
||||
|
||||
for f in install-iOS/lib/*.a; do
|
||||
for f in $install/lib/*.a; do
|
||||
lib_name=$(basename "$f")
|
||||
lipo -create "install-iOS/lib/$lib_name" "install-iOS-simulator/lib/$lib_name" -o "out/lib/$lib_name"
|
||||
done
|
||||
cp "$install/lib/$lib_name" "out/lib/$lib_name"
|
||||
done
|
||||
|
@ -66,6 +66,22 @@ if (${IOS_PLATFORM} STREQUAL "OS")
|
||||
# This causes the installers to properly locate the output libraries
|
||||
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)
|
||||
elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
|
||||
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
|
||||
if (IOS_PLATFORM STREQUAL "OS")
|
||||
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")
|
||||
set (IOS_ARCH "x86_64")
|
||||
elseif (IOS_PLATFORM STREQUAL "WATCHOS")
|
||||
|
Loading…
x
Reference in New Issue
Block a user