From 86e0a52bb9cdb1d5814ec4936e50bb093acbccf8 Mon Sep 17 00:00:00 2001 From: ffdfgdfg Date: Mon, 30 Dec 2019 00:22:50 +0800 Subject: [PATCH] fix android build --- build.android.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/build.android.sh b/build.android.sh index 02c97fe5..d9f81416 100644 --- a/build.android.sh +++ b/build.android.sh @@ -4,18 +4,36 @@ #fyne-cross --targets=linux/amd64,windows/amd64,darwin/amd64 gui/npc/npc.go cd /go -go get -u fyne.io/fyne fyne.io/fyne/cmd/fyne - +apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev -y +#go get -u fyne.io/fyne/cmd/fyne fyne.io/fyne +mkdir -p /go/src/fyne.io +cd src/fyne.io +git clone https://github.com/fyne-io/fyne.git +cd fyne +git checkout v1.2.0 +go install -v ./cmd/fyne +#fyne package -os android fyne.io/fyne/cmd/hello +echo "fyne install success" mkdir -p /go/src/github.com/cnlh/nps cp -R /app/* /go/src/github.com/cnlh/nps cd /go/src/github.com/cnlh/nps +#go get -u fyne.io/fyne fyne.io/fyne/cmd/fyne +rm cmd/npc/sdk.go +#go get -u ./... +#go mod tidy +#rm -rf /go/src/golang.org/x/mobile +echo "tidy success" +cd /go/src/github.com/cnlh/nps go mod vendor cd vendor cp -R * /go/src cd .. rm -rf vendor #rm -rf ~/.cache/* +echo "vendor success" cd gui/npc +#rm -rf /go/src/golang.org/x/mobile +#go get -u fyne.io/fyne/cmd/fyne@v1.2.0 #export ANDROID_NDK_HOME=/usr/local/android_sdk/ndk-bundle fyne package -appID org.nps.client -os android -icon ../../docs/logo.png mv npc.apk /app/android_client.apk