nps/build.android.sh

35 lines
862 B
Bash
Raw Normal View History

2019-12-16 08:47:07 -08:00
#/bin/bash
2019-12-16 08:06:48 -08:00
2019-12-18 00:07:36 -08:00
cd /go
2019-12-29 08:22:50 -08:00
apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev -y
2020-02-11 05:37:05 -08:00
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
2019-12-29 08:22:50 -08:00
#fyne package -os android fyne.io/fyne/cmd/hello
echo "fyne install success"
2020-01-08 05:57:14 -08:00
mkdir -p /go/src/ehang.io/nps
cp -R /app/* /go/src/ehang.io/nps
cd /go/src/ehang.io/nps
2019-12-29 08:22:50 -08:00
#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"
2020-01-08 05:57:14 -08:00
cd /go/src/ehang.io/nps
2019-12-16 08:06:48 -08:00
go mod vendor
cd vendor
2019-12-16 23:31:25 -08:00
cp -R * /go/src
2019-12-16 08:06:48 -08:00
cd ..
rm -rf vendor
2019-12-18 00:07:36 -08:00
#rm -rf ~/.cache/*
2019-12-29 08:22:50 -08:00
echo "vendor success"
2019-12-16 08:06:48 -08:00
cd gui/npc
2019-12-18 00:07:36 -08:00
fyne package -appID org.nps.client -os android -icon ../../docs/logo.png
2019-12-16 23:31:25 -08:00
mv npc.apk /app/android_client.apk
2020-02-11 05:37:05 -08:00
echo "android build success"