Skip to content

Commit

Permalink
removed dependencies on ios script
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto-instnt committed Sep 3, 2024
1 parent b38488c commit 8f4656b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 42 deletions.
5 changes: 5 additions & 0 deletions aries/wrappers/uniffi-aries-vcx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ More documentation can be found [here](https://rust-lang.github.io/rustup/cross-

5. Run the helper build script.

### Android
```bash
sh aries/wrappers/uniffi-aries-vcx/scripts/android.build.cargo.ndk.sh
```
### iOS
```bash
sh aries/wrappers/uniffi-aries-vcx/scripts/ios.build.cargo.sh
```

NB: Before running the demo application you need to generate the language bindings.

Expand Down
42 changes: 0 additions & 42 deletions aries/wrappers/uniffi-aries-vcx/scripts/ios.build.cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,6 @@
rm -R ${UNIFFI_ROOT}/core/src/vcx.swift ${UNIFFI_ROOT}/core/src/vcxFFI.*
}

download_and_unzip_if_missed() {
expected_directory="$1"
url="$2"
fname="tmp_$(date +%s)_$expected_directory.zip"
if [ ! -d "${expected_directory}" ] ; then
echo "Downloading ${GREEN}${url}${RESET} as ${GREEN}${fname}${RESET}"
wget -q -O ${fname} "${url}"
echo "Unzipping ${GREEN}${fname}${RESET}"
unzip -qqo "${fname}"
rm "${fname}"
echo "${GREEN}Done!${RESET}"
else
echo "${BLUE}Skipping download ${url}${RESET}. Expected directory ${expected_directory} was found"
fi
}

setup_linked_dependencies() {
mkdir -p $IOS_BUILD_DEPS_DIR
# download deps
pushd "${IOS_BUILD_DEPS_DIR}"
download_and_unzip_if_missed "openssl_$TARGET_NICKNAME" "https://repo.sovrin.org/ios/libindy/deps/openssl/openssl_$TARGET_NICKNAME.zip"
download_and_unzip_if_missed "libsodium_$TARGET_NICKNAME" "https://repo.sovrin.org/ios/libindy/deps/sodium/libsodium_$TARGET_NICKNAME.zip"
download_and_unzip_if_missed "libzmq_$TARGET_NICKNAME" "https://repo.sovrin.org/ios/libindy/deps/zmq/libzmq_$TARGET_NICKNAME.zip"
popd

# main env vars that need to be set
export OPENSSL_DIR=${IOS_BUILD_DEPS_DIR}/openssl_${TARGET_NICKNAME}
export SODIUM_DIR=${IOS_BUILD_DEPS_DIR}/libsodium_${TARGET_NICKNAME}
export LIBZMQ_DIR=${IOS_BUILD_DEPS_DIR}/libzmq_${TARGET_NICKNAME}

# secondary env vars that need to be set
export SODIUM_LIB_DIR=${SODIUM_DIR}/lib
export SODIUM_INCLUDE_DIR=${SODIUM_DIR}/include
export SODIUM_STATIC=1
export LIBZMQ_LIB_DIR=${LIBZMQ_DIR}/lib
export LIBZMQ_INCLUDE_DIR=${LIBZMQ_DIR}/include
export LIBZMQ_PREFIX=${LIBZMQ_DIR}
export OPENSSL_LIB_DIR=${OPENSSL_DIR}/lib
export OPENSSL_STATIC=1
}

build_uniffi_for_demo() {
echo "Running build_uniffi_for_demo..."
export UNIFFI_ROOT="${ARIES_VCX_ROOT}/aries/wrappers/uniffi-aries-vcx"
Expand All @@ -79,5 +38,4 @@
}

generate_bindings
#setup_linked_dependencies
build_uniffi_for_demo

0 comments on commit 8f4656b

Please sign in to comment.