RN 0.85 + React 19 기반 apps/mobile-rn 프로젝트 생성. 6개 화면 이식 (Login, Dash, History, Record, Talk, Settings). @react-navigation/native + bottom-tabs 네비게이션 구성. Windows NDK CMake libc++_shared 링크 버그 워크아라운드 포함. Galaxy Fold (SM_F956N) 무선 디버깅 APK 설치 확인.
20 lines
833 B
Bash
20 lines
833 B
Bash
#!/bin/bash
|
|
# fix-windows-ndk.sh — Patches all ninja build files to add libc++_shared.so
|
|
# Workaround for Windows NDK CMake bug where c++_shared is not auto-linked
|
|
# Run this AFTER gradle configure but BEFORE gradle build
|
|
|
|
MOBILE_RN="$(cd "$(dirname "$0")/.." && pwd)"
|
|
NDK_DIR="$HOME/Android/Sdk/ndk/27.1.12297006"
|
|
LIBCPP="$NDK_DIR/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so"
|
|
LIBCPP_WIN=$(echo "$LIBCPP" | sed 's|/c/|C:/|;s|/|/|g')
|
|
|
|
echo "Patching ninja files with libc++_shared.so..."
|
|
|
|
find "$MOBILE_RN" -name "build.ninja" -path "*arm64-v8a*" 2>/dev/null | while read ninja; do
|
|
if grep -q "\-latomic" "$ninja" && ! grep -q "libc++_shared" "$ninja"; then
|
|
sed -i "s|-latomic -lm|\"$LIBCPP_WIN\" -latomic -lm|g" "$ninja"
|
|
echo " Patched: $ninja"
|
|
fi
|
|
done
|
|
|
|
echo "Done."
|