diff --git a/scripts/build-apk-arm.sh b/scripts/build-apk-arm.sh index 7eb32c5..94cfb1a 100644 --- a/scripts/build-apk-arm.sh +++ b/scripts/build-apk-arm.sh @@ -1,6 +1,8 @@ # 仅构建arm的APK +cd "$( cd "$( dirname "$0" )" && pwd )/.." + cd go/mobile -cd ../.. gomobile bind -target=android/arm -o lib/Mobile.aar ./ +cd ../.. flutter build apk --target-platform android-arm diff --git a/scripts/build-apk-arm64.sh b/scripts/build-apk-arm64.sh index 883cf9d..d5623f9 100644 --- a/scripts/build-apk-arm64.sh +++ b/scripts/build-apk-arm64.sh @@ -1,5 +1,7 @@ # 仅构建arm64的APK +cd "$( cd "$( dirname "$0" )" && pwd )/.." + cd go/mobile gomobile bind -target=android/arm64 -o lib/Mobile.aar ./ cd ../.. diff --git a/scripts/build-apk-x64.sh b/scripts/build-apk-x64.sh new file mode 100644 index 0000000..655baf0 --- /dev/null +++ b/scripts/build-apk-x64.sh @@ -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 diff --git a/scripts/build-apk-x86.sh b/scripts/build-apk-x86.sh new file mode 100644 index 0000000..e95bbe2 --- /dev/null +++ b/scripts/build-apk-x86.sh @@ -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 diff --git a/scripts/build-ipa.sh b/scripts/build-ipa.sh index 92ae21b..8cf92ef 100644 --- a/scripts/build-ipa.sh +++ b/scripts/build-ipa.sh @@ -1,5 +1,7 @@ # 构建未签名的IPA +cd "$( cd "$( dirname "$0" )" && pwd )/.." + cd go/mobile gomobile bind -target=ios -o lib/Mobile.xcframework ./ cd ../.. diff --git a/scripts/build-macos-dmg.sh b/scripts/build-macos-dmg.sh new file mode 100644 index 0000000..7d14532 --- /dev/null +++ b/scripts/build-macos-dmg.sh @@ -0,0 +1,4 @@ +# 构建macos + +cd "$( cd "$( dirname "$0" )" && pwd )/.." +hover build darwin-dmg diff --git a/scripts/version.sh b/scripts/version.sh new file mode 100644 index 0000000..ed65234 --- /dev/null +++ b/scripts/version.sh @@ -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