2024-03-06 02:32:15 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. ./config.sh
|
|
|
|
|
|
|
|
LIBWALLET_PATH="${EXTERNAL_MACOS_SOURCE_DIR}/libwallet"
|
2024-08-03 05:20:27 +00:00
|
|
|
LIBWALLET_URL="https://github.com/decred/libwallet.git"
|
2024-08-12 14:49:14 +00:00
|
|
|
LIBWALLET_VERSION="v1.1.0"
|
2024-03-06 02:32:15 +00:00
|
|
|
|
|
|
|
echo "======================= DECRED LIBWALLET ========================="
|
|
|
|
|
|
|
|
echo "Cloning DECRED LIBWALLET from - $LIBWALLET_URL"
|
|
|
|
if [ -e $LIBWALLET_PATH ]; then
|
|
|
|
rm -fr $LIBWALLET_PATH
|
|
|
|
fi
|
|
|
|
mkdir -p $LIBWALLET_PATH
|
2024-08-03 05:20:27 +00:00
|
|
|
git clone $LIBWALLET_URL $LIBWALLET_PATH
|
2024-03-06 02:32:15 +00:00
|
|
|
cd $LIBWALLET_PATH
|
2024-06-20 06:19:34 +00:00
|
|
|
git checkout $LIBWALLET_VERSION
|
2024-03-06 02:32:15 +00:00
|
|
|
|
|
|
|
if [ -e ./build ]; then
|
|
|
|
rm -fr ./build
|
|
|
|
fi
|
|
|
|
go build -buildmode=c-archive -o ./build/libdcrwallet.a ./cgo
|
|
|
|
|
|
|
|
CW_DECRED_DIR=${CW_ROOT}/cw_decred
|
|
|
|
HEADER_DIR=$CW_DECRED_DIR/lib/api
|
|
|
|
mv ${LIBWALLET_PATH}/build/libdcrwallet.h $HEADER_DIR
|
|
|
|
|
|
|
|
DEST_LIB_DIR=${CW_DECRED_DIR}/macos/External/lib
|
|
|
|
mkdir -p $DEST_LIB_DIR
|
|
|
|
mv ${LIBWALLET_PATH}/build/libdcrwallet.a $DEST_LIB_DIR
|
|
|
|
|
|
|
|
cd $CW_DECRED_DIR
|
2024-06-20 06:19:34 +00:00
|
|
|
dart run ffigen
|