-
Notifications
You must be signed in to change notification settings - Fork 3
/
release_apple.sh
executable file
·104 lines (84 loc) · 3.74 KB
/
release_apple.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#! /usr/bin/env bash
set -e
VERSION=$(grep -E ".*LibVersion::version.*\"" src/cpp/PeerConnectionImpl.cpp)
VERSION=$(echo ${VERSION} | cut -d " " -f 5 | cut -d "\"" -f 2)
#export DEVELOPER_DIR=/Applications/Xcode_14.1.app/Contents/Developer/
rm -rf build/iOS build/iOS-Sim build/tvOS build/tvOS-Sim build/macOS \
libs/datachannel_wrapper.xcframework
cmake -S src -B build/iOS -G Xcode \
-DCMAKE_SYSTEM_NAME=iOS \
-DOPENSSL_APPLE_OS_PREFIX=iOS \
-DNO_WEBSOCKET=ON -DNO_MEDIA=ON -DNO_EXAMPLES=ON -DNO_TESTS=ON \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
xcodebuild -quiet -project build/iOS/datachannel_wrapper.xcodeproj \
-configuration Release \
-sdk iphoneos \
-target datachannel_wrapper
cmake -S src -B build/iOS-Sim -G Xcode \
-DCMAKE_SYSTEM_NAME=iOS \
-DOPENSSL_APPLE_OS_PREFIX=iOS-Sim \
-DNO_WEBSOCKET=ON -DNO_MEDIA=ON -DNO_EXAMPLES=ON -DNO_TESTS=ON \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
xcodebuild -quiet -project build/iOS-Sim/datachannel_wrapper.xcodeproj \
-configuration Release \
-sdk iphonesimulator \
-target datachannel_wrapper
cmake -S src -B build/tvOS -G Xcode \
-DCMAKE_SYSTEM_NAME=tvOS \
-DOPENSSL_APPLE_OS_PREFIX=tvOS \
-DNO_WEBSOCKET=ON -DNO_MEDIA=ON -DNO_EXAMPLES=ON -DNO_TESTS=ON \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
xcodebuild -quiet -project build/tvOS/datachannel_wrapper.xcodeproj \
-configuration Release \
-sdk appletvos \
-target datachannel_wrapper
cmake -S src -B build/tvOS-Sim -G Xcode \
-DCMAKE_SYSTEM_NAME=tvOS \
-DOPENSSL_APPLE_OS_PREFIX=tvOS-Sim \
-DNO_WEBSOCKET=ON -DNO_MEDIA=ON -DNO_EXAMPLES=ON -DNO_TESTS=ON \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0
xcodebuild -quiet -project build/tvOS-Sim/datachannel_wrapper.xcodeproj \
-configuration Release \
-sdk appletvsimulator \
-target datachannel_wrapper
cmake -S src -B build/macOS -G Xcode \
-DCMAKE_SYSTEM_NAME=Darwin \
-DOPENSSL_APPLE_OS_PREFIX=macOS \
-DNO_WEBSOCKET=ON -DNO_MEDIA=ON -DNO_EXAMPLES=ON -DNO_TESTS=ON \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13
xcodebuild -quiet -project build/macOS/datachannel_wrapper.xcodeproj \
-configuration Release \
-sdk macosx \
-target datachannel_wrapper
xcodebuild -create-xcframework -framework build/iOS/Release-iphoneos/datachannel_wrapper.framework \
-framework build/iOS-Sim/Release-iphonesimulator/datachannel_wrapper.framework \
-framework build/tvOS/Release-appletvos/datachannel_wrapper.framework \
-framework build/tvOS-Sim/Release-appletvsimulator/datachannel_wrapper.framework \
-framework build/macOS/Release/datachannel_wrapper.framework \
-output libs/datachannel_wrapper.xcframework
INSTALL_DIR=~/Downloads/libdc-Apple-${VERSION}
mkdir -p ${INSTALL_DIR}/symbols/iOS \
${INSTALL_DIR}/symbols/iOS-Sim \
${INSTALL_DIR}/symbols/tvOS \
${INSTALL_DIR}/symbols/tvOS-Sim \
${INSTALL_DIR}/symbols/macOS
cp -R libs/datachannel_wrapper.xcframework ${INSTALL_DIR}/
cp -R build/iOS/Release-iphoneos/datachannel_wrapper.framework.dSYM \
${INSTALL_DIR}/symbols/iOS/
cp -R build/iOS-Sim/Release-iphonesimulator/datachannel_wrapper.framework.dSYM \
${INSTALL_DIR}/symbols/iOS-Sim/
cp -R build/tvOS/Release-appletvos/datachannel_wrapper.framework.dSYM \
${INSTALL_DIR}/symbols/tvOS/
cp -R build/tvOS-Sim/Release-appletvsimulator/datachannel_wrapper.framework.dSYM \
${INSTALL_DIR}/symbols/tvOS-Sim/
cp -R build/macOS/Release/datachannel_wrapper.framework.dSYM \
${INSTALL_DIR}/symbols/macOS/
pushd ~/Downloads/
zip -ry ${INSTALL_DIR}.zip libdc-Apple-${VERSION}
popd
rm -rf ${INSTALL_DIR}