-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-on-mac-ios.sh
executable file
·43 lines (34 loc) · 1.08 KB
/
build-on-mac-ios.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
#!/usr/bin/env bash
set -e
export LIBSODIUM_FULL_BUILD=true
readonly IOS_MIN_VERSION=6.0
# ===========================
# macOs, iOs
# ===========================
# [brew] install dependencies
# packages='libtool autoconf automake'
# brew update
# for pkg in ${packages}; do
# if brew list -1 | grep -q "^${pkg}\$"; then
# echo "Package '$pkg' is installed"
# #brew upgrade $pkg
# else
# echo "Package '$pkg' is not installed"
# brew install $pkg
# fi
# done
# brew upgrade ${packages} || true
# [variable]
ROOT=$(pwd)
DIR_DEST=${ROOT}/output
DIR_LIBSODIUM=${ROOT}/libsodium
# [src] libsodium
git clone --branch 1.0.20-RELEASE --depth 1 https://github.com/jedisct1/libsodium.git $DIR_LIBSODIUM && cd $DIR_LIBSODIUM
## override to prevent vision build
cp $ROOT/modified_apple-xcframework.sh $DIR_LIBSODIUM/dist-build/apple-xcframework.sh
# [generate]
## generate for ios
./autogen.sh -s
./dist-build/apple-xcframework.sh
mkdir -p $DIR_DEST/Plugins/iOS
cp -r $DIR_LIBSODIUM/libsodium-apple/Clibsodium.xcframework $DIR_DEST/Plugins/iOS/Clibsodium.xcframework