diff --git a/README.md b/README.md index 8d272596c..2ee7a5ae3 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,9 @@ You can alternatively install the build from PlayStore or F-Droid. 2. Clone this repository with `git clone git@github.com:ente-io/photos-app.git` 3. Pull in all submodules with `git submodule update --init --recursive` 4. Enable repo git hooks `git config core.hooksPath hooks` -5. For Android, run `flutter build apk --release --flavor independent` -6. For iOS, run `flutter build ios` +5. Setup TensorFlowLite by executing `setup.sh` +6. For Android, run `flutter build apk --release --flavor independent` +7. For iOS, run `flutter build ios`
diff --git a/setup.sh b/setup.sh old mode 100644 new mode 100755 index dbf9578eb..ed07f5a1c --- a/setup.sh +++ b/setup.sh @@ -2,7 +2,14 @@ cd "$(dirname "$(readlink -f "$0")")" -URL="https://github.com/am15h/tflite_flutter_plugin/releases/download/" +IOS_URL="https://github.com/am15h/tflite_flutter_plugin/releases/download/v0.5.0/" +IOS_ASSET="TensorFlowLiteC.framework.zip" +IOS_FRAMEWORK="TensorFlowLiteC.framework" +IOS_DIR="ios/.symlinks/plugins/tflite_flutter/ios/" +MACOSX_METADATA_DIR="__MACOSX" + +ANDROID_URL="https://github.com/am15h/tflite_flutter_plugin/releases/download/" + TAG="v0.2.0" ANDROID_DIR="android/app/src/main/jniLibs/" @@ -24,9 +31,17 @@ do esac done +wget ${IOS_URL}${IOS_ASSET} +unzip ${IOS_ASSET} +rm -rf ${MACOSX_METADATA_DIR} +rm ${IOS_ASSET} +rm -rf "${IOS_DIR}/${IOS_FRAMEWORK}" +mv ${IOS_FRAMEWORK} ${IOS_DIR} + +exit download () { - wget "${URL}${TAG}/$1" + wget "${ANDROID_URL}${TAG}/$1" mkdir -p "${ANDROID_DIR}$2/" mv $1 "${ANDROID_DIR}$2/${ANDROID_LIB}" } @@ -45,4 +60,4 @@ download ${ARM_64} "arm64-v8a" fi download ${X86} "x86" -download ${X86_64} "x86_64" \ No newline at end of file +download ${X86_64} "x86_64"