-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·48 lines (35 loc) · 1.07 KB
/
build.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
#!/bin/bash
XCF_DIR=`pwd`
XCF_INCLUDE="$XCF_DIR/include"
mkdir -p $XCF_INCLUDE
set -e
buildIden3Lib() {
echo "Building iden3 C library..."
IDEN3CLIB_DIR="$XCF_DIR/../c-polygonid"
IDEN3CLIB_LIBS="$XCF_DIR/iden3clib/libs"
IDEN3CLIB_TARGET="Iden3CLibrary.xcframework"
cd $XCF_DIR
rm -f $IDEN3CLIB_LIBS/*.a
rm -Rf $IDEN3CLIB_TARGET
cd $IDEN3CLIB_DIR
git pull
make ios-simulator
make ios
make darwin-arm64
cp ios/libpolygonid.h "$XCF_INCLUDE"
mkdir -p $IDEN3CLIB_LIBS
cp ios/libpolygonid-darwin-arm64.a $IDEN3CLIB_LIBS/libpolygonid-macos.a
cp ios/libpolygonid-ios.a $IDEN3CLIB_LIBS/libpolygonid-ios.a
cp ios/libpolygonid-ios-simulator.a $IDEN3CLIB_LIBS/libpolygonid-ios-sim.a
echo "Building xcframework..."
cd "$XCF_DIR"
xcodebuild -verbose -create-xcframework \
-output $IDEN3CLIB_TARGET \
-library $IDEN3CLIB_LIBS/libpolygonid-macos.a \
-headers ./include/ \
-library $IDEN3CLIB_LIBS/libpolygonid-ios-sim.a \
-headers ./include/ \
-library $IDEN3CLIB_LIBS/libpolygonid-ios.a \
-headers ./include/
}
buildIden3Lib