sh: Adapt multi-platforms

This commit is contained in:
Calcitem 2021-07-11 16:08:01 +08:00
parent ed7a864882
commit 998d6992bb
No known key found for this signature in database
GPG Key ID: C596FAD04B1A465B
4 changed files with 36 additions and 5 deletions

View File

@ -8,4 +8,10 @@ git clean -fdx
mv ../key.jks src/ui/flutter_app/android/
mv ../key.properties src/ui/flutter_app/android/
./flutter-windows-init.sh
if [ "$(uname)" == "Darwin" ]; then
echo "TODO: macOS"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
echo "TODO: Lniux"
else
./flutter-windows-init.sh
fi

View File

@ -1,4 +1,12 @@
#!/bin/bash
"${ANDROID_NDK_HOME}/ndk-stack.cmd" -sym "../build/app/intermediates/cmake/debug/obj/arm64-v8a" -dump bt.txt
"${ANDROID_NDK_HOME}/ndk-stack.cmd" -sym "../build/app/intermediates/cmake/debug/obj/armeabi-v7a" -dump bt.txt
NDK_STACK=ndk-stack.cmd
if [ "$(uname)" == "Darwin" ]; then
NDK_STACK=ndk-stack
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
NDK_STACK=ndk-stack
fi
"${ANDROID_NDK_HOME}/${NDK_STACK}" -sym "../build/app/intermediates/cmake/debug/obj/arm64-v8a" -dump bt.txt
"${ANDROID_NDK_HOME}/${NDK_STACK}" -sym "../build/app/intermediates/cmake/debug/obj/armeabi-v7a" -dump bt.txt

View File

@ -1,4 +1,12 @@
#!/bin/bash
cd ~/AppData/Local/Android/Sdk/platform-tools || exit
PLATFORM_TOOLS=~/AppData/Local/Android/Sdk/platform-tools
if [ "$(uname)" == "Darwin" ]; then
PLATFORM_TOOLS=~/Library/Android/sdk/platform-tools
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
PLATFORM_TOOLS=~/Android/sdk/platform-tools
fi
cd ${PLATFORM_TOOLS} || exit
./adb shell monkey -v -p com.calcitem.sanmill --pct-touch 100 --pct-trackball 0 --pct-nav 0 --pct-majornav 0 --pct-syskeys 0 --pct-anyevent 0 --throttle 500 10000000

View File

@ -1,4 +1,13 @@
#!/bin/bash
cd ~/AppData/Local/Android/Sdk/platform-tools || exit
PLATFORM_TOOLS=~/AppData/Local/Android/Sdk/platform-tools
if [ "$(uname)" == "Darwin" ]; then
PLATFORM_TOOLS=~/Library/Android/sdk/platform-tools
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
PLATFORM_TOOLS=~/Android/sdk/platform-tools
fi
cd ${PLATFORM_TOOLS} || exit
./adb shell kill $(./adb shell ps | grep monkey | xargs | cut -d' ' -f2)