Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
fix build var
Browse files Browse the repository at this point in the history
  • Loading branch information
g45t345rt committed Feb 22, 2024
1 parent c4eeb90 commit 8d1b18b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build_gio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ OUTPUT="./build/g45w_${GOOS}_${GOARCH}"

source ./build_vars.sh

if [ ! $MIN_SDK ]; then
MIN_SDK=0
fi

if [ $GOOS = "windows" ]; then
OUTPUT+=".exe"
fi

if [ $GOOS = "android" ]; then
if [ ! $MIN_SDK ]; then
if [ $MIN_SDK -eq 0 ]; then
MIN_SDK=21 # https://en.wikipedia.org/wiki/Android_version_history
fi
echo "MIN_SDK: ${MIN_SDK}"
OUTPUT+=".apk"
fi

Expand Down Expand Up @@ -57,4 +60,5 @@ fi
# signKey = flag.String("signkey", "", "specify the path of the keystore to be used to sign Android apk files.")
# signPass = flag.String("signpass", "", "specify the password to decrypt the signkey.")

echo "MIN_SDK: ${MIN_SDK}"
gogio -name $NAME -target $GOOS -arch $GOARCH -minsdk $MIN_SDK -x -ldflags "$FLAGS" -appid $APPID -version $VERSION -o "$OUTPUT" .

0 comments on commit 8d1b18b

Please sign in to comment.