commit 5a4fdd1e6486295dae34059f6c691686f718c93f parent df123b802a3509585b013c7346fc3ae121225dff Author: Darren Clarke <darren@redaranj.com> Date: Wed, 8 Nov 2023 22:10:31 +0100 Build path updates Diffstat:
| M | mobile/android/build.sh | | | 13 | +++++++------ |
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/mobile/android/build.sh b/mobile/android/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -MOBILE_DIR="mobile" +MOBILE_DIR="$(pwd)/mobile" ANDROID_DIR="${MOBILE_DIR}/android" TARGET_DIR="${ANDROID_DIR}/target" OUT_DIR="${ANDROID_DIR}/out" @@ -24,17 +24,18 @@ declare -A arch_dir_map=( # ["aarch64-linux-android"]="arm64-v8a" ) for architecture in "${!arch_dir_map[@]}"; do - TARGET_DIR="$(pwd)/${architecture}" - echo ${TARGET_DIR}} + ARCH_TARGET_DIR="${TARGET_DIR}/${architecture}" + echo ${ARCH_TARGET_DIR} + echo ${MOBILE_DIR} if [ "${BUILD_MODE}" == "release" ]; then - cross build --manifest-path "${MOBILE_DIR}/Cargo.toml" --target "$architecture" --target-dir="${TARGET_DIR}" --release + cross build --manifest-path "${MOBILE_DIR}/Cargo.toml" --target "$architecture" --target-dir="${ARCH_TARGET_DIR}" --release else - cross build --manifest-path "${MOBILE_DIR}/Cargo.toml" --target "$architecture" --target-dir="${TARGET_DIR}" + cross build --manifest-path "${MOBILE_DIR}/Cargo.toml" --target "$architecture" --target-dir="${ARCH_TARGET_DIR}" fi DESTINATION_DIR="${JNILIBS_DIR}/${arch_dir_map[$architecture]}" mkdir -p ${DESTINATION_DIR} - cp "${TARGET_DIR}/${BUILD_MODE}/${LIB_NAME}" "${DESTINATION_DIR}/${FIXED_LIB_NAME}" + cp "${ARCH_TARGET_DIR}/${BUILD_MODE}/${LIB_NAME}" "${DESTINATION_DIR}/${FIXED_LIB_NAME}" done