add scripts

This commit is contained in:
niuhuan 2022-02-11 10:06:19 +08:00
parent fab6604bb5
commit 77122d883f
7 changed files with 39 additions and 1 deletions

View File

@ -1,6 +1,8 @@
# 仅构建arm的APK # 仅构建arm的APK
cd "$( cd "$( dirname "$0" )" && pwd )/.."
cd go/mobile cd go/mobile
cd ../..
gomobile bind -target=android/arm -o lib/Mobile.aar ./ gomobile bind -target=android/arm -o lib/Mobile.aar ./
cd ../..
flutter build apk --target-platform android-arm flutter build apk --target-platform android-arm

View File

@ -1,5 +1,7 @@
# 仅构建arm64的APK # 仅构建arm64的APK
cd "$( cd "$( dirname "$0" )" && pwd )/.."
cd go/mobile cd go/mobile
gomobile bind -target=android/arm64 -o lib/Mobile.aar ./ gomobile bind -target=android/arm64 -o lib/Mobile.aar ./
cd ../.. cd ../..

8
scripts/build-apk-x64.sh Normal file
View File

@ -0,0 +1,8 @@
# 仅构建x86_64的APK
cd "$( cd "$( dirname "$0" )" && pwd )/.."
cd go/mobile
gomobile bind -target=android/amd64 -o lib/Mobile.aar ./
cd ../..
flutter build apk --target-platform android-x64

8
scripts/build-apk-x86.sh Normal file
View File

@ -0,0 +1,8 @@
# 仅构建x86的APK
cd "$( cd "$( dirname "$0" )" && pwd )/.."
cd go/mobile
gomobile bind -target=android/386 -o lib/Mobile.aar ./
cd ../..
flutter build apk --target-platform android-x86

View File

@ -1,5 +1,7 @@
# 构建未签名的IPA # 构建未签名的IPA
cd "$( cd "$( dirname "$0" )" && pwd )/.."
cd go/mobile cd go/mobile
gomobile bind -target=ios -o lib/Mobile.xcframework ./ gomobile bind -target=ios -o lib/Mobile.xcframework ./
cd ../.. cd ../..

View File

@ -0,0 +1,4 @@
# 构建macos
cd "$( cd "$( dirname "$0" )" && pwd )/.."
hover build darwin-dmg

12
scripts/version.sh Normal file
View File

@ -0,0 +1,12 @@
# 设置版本号
cd "$( cd "$( dirname "$0" )" && pwd )/.."
if [ "$1" == "set" ] ; then
if [ "$2" != "" ] ; then
echo $2 > lib/assets/version.txt
fi
elif [ "$1" == "unset" ]; then
rm -f lib/assets/version.txt
fi