From 2f5cdaf136877c278c3ce4c48ae0d432f6bb2adb Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 13 Nov 2020 22:49:03 +0100 Subject: [PATCH] Clean up platforms - Rename WatchOS platform to Watch - Drop Apple Watch armv7k - Use "MacOSX" sys_id in targets .conf --- assets/{WatchOS => Watch}/Info.plist | 0 build-libssl.sh | 4 ++-- config/20-all-platforms.conf | 18 +++++++++--------- create-openssl-framework.sh | 25 ++++++++++--------------- 4 files changed, 21 insertions(+), 26 deletions(-) rename assets/{WatchOS => Watch}/Info.plist (100%) diff --git a/assets/WatchOS/Info.plist b/assets/Watch/Info.plist similarity index 100% rename from assets/WatchOS/Info.plist rename to assets/Watch/Info.plist diff --git a/build-libssl.sh b/build-libssl.sh index efce011..183f9fd 100755 --- a/build-libssl.sh +++ b/build-libssl.sh @@ -549,8 +549,8 @@ fi # Build tvOS library if selected for build if [ ${#LIBSSL_WATCHOS[@]} -gt 0 ]; then echo "Build library for watchOS..." - lipo -create ${LIBSSL_WATCHOS[@]} -output "${CURRENTPATH}/lib/libssl-WatchOS.a" - lipo -create ${LIBCRYPTO_WATCHOS[@]} -output "${CURRENTPATH}/lib/libcrypto-WatchOS.a" + lipo -create ${LIBSSL_WATCHOS[@]} -output "${CURRENTPATH}/lib/libssl-Watch.a" + lipo -create ${LIBCRYPTO_WATCHOS[@]} -output "${CURRENTPATH}/lib/libcrypto-Watch.a" fi # Build tvOS library if selected for build diff --git a/config/20-all-platforms.conf b/config/20-all-platforms.conf index bc30e14..17fe047 100644 --- a/config/20-all-platforms.conf +++ b/config/20-all-platforms.conf @@ -68,9 +68,9 @@ my %targets = (); }, # Simulator (arm64) "ios-sim-cross-arm64" => { - inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ], - cflags => add("-target arm64-apple-ios13.0-simulator"), - sys_id => "iOS", + inherit_from => [ "darwin64-arm64-cc", "ios-cross-base" ], + cflags => add("-target arm64-apple-ios13.0-simulator"), + sys_id => "iOS", }, ## Apple macOS @@ -88,12 +88,12 @@ my %targets = (); # Device (x86_64) "macos64-x86_64" => { inherit_from => [ "darwin64-x86_64-cc", "macos-base" ], - sys_id => "macOS", + sys_id => "MacOSX", }, # Device (arm64) "macos64-arm64" => { - inherit_from => [ "darwin64-arm64-cc", "macos-base" ], - sys_id => "macOS", + inherit_from => [ "darwin64-arm64-cc", "macos-base" ], + sys_id => "MacOSX", }, # Catalyst (x86_64) "mac-catalyst-x86_64" => { @@ -103,9 +103,9 @@ my %targets = (); }, # Catalyst (arm64) "mac-catalyst-arm64" => { - inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ], - cflags => add("-target arm64-apple-ios13.0-macabi "), - sys_id => "MacOSX", + inherit_from => [ "darwin64-arm64-cc", "mac-catalyst-base" ], + cflags => add("-target arm64-apple-ios13.0-macabi "), + sys_id => "MacOSX", }, ## Apple WatchOS diff --git a/create-openssl-framework.sh b/create-openssl-framework.sh index fd14470..ecdaa82 100755 --- a/create-openssl-framework.sh +++ b/create-openssl-framework.sh @@ -21,22 +21,22 @@ if [ -d $FWROOT ]; then rm -rf $FWROOT fi -ALL_SYSTEMS=("iPhone" "AppleTV" "MacOSX" "Catalyst" "WatchOS") +ALL_SYSTEMS=("iPhone" "AppleTV" "MacOSX" "Catalyst" "Watch") function check_bitcode() { local FWDIR=$1 if [[ $FWTYPE == "dynamic" ]]; then - BITCODE_PATTERN="__LLVM" + BITCODE_PATTERN="__LLVM" else - BITCODE_PATTERN="__bitcode" - fi + BITCODE_PATTERN="__bitcode" + fi - if otool -l "$FWDIR/$FWNAME" | grep "${BITCODE_PATTERN}" >/dev/null; then - echo "INFO: $FWDIR contains Bitcode" - else - echo "INFO: $FWDIR doesn't contain Bitcode" - fi + if otool -l "$FWDIR/$FWNAME" | grep "${BITCODE_PATTERN}" >/dev/null; then + echo "INFO: $FWDIR contains Bitcode" + else + echo "INFO: $FWDIR doesn't contain Bitcode" + fi } # Inspect Mach-O load commands to get minimum SDK version. @@ -187,12 +187,7 @@ if [ $FWTYPE == "dynamic" ]; then for SYS in ${ALL_SYSTEMS[@]}; do SYSDIR="$FWROOT/$SYS" FWDIR="$SYSDIR/$FWNAME.framework" - - if [[ $SYS == "WatchOS" ]]; then - DYLIBS=(bin/Watch*/$FWNAME.dylib) - else - DYLIBS=(bin/${SYS}*/$FWNAME.dylib) - fi + DYLIBS=(bin/${SYS}*/$FWNAME.dylib) if [[ ${#DYLIBS[@]} -gt 0 && -e ${DYLIBS[0]} ]]; then echo "Creating framework for $SYS"