add build android

This commit is contained in:
ffdfgdfg 2019-12-17 00:06:48 +08:00
parent ae28d41231
commit b558cc6d19
3 changed files with 17 additions and 1 deletions

View File

@ -52,6 +52,7 @@ deploy:
- windows_amd64_server.tar.gz
- npc_syno.spk
- npc_sdk.tar.gz
- android_client.apk
on:
tags: true
all_branches: true

14
build.android.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
#sudo apt-get install libgl1-mesa-dev xorg-dev
#go get github.com/ffdfgdfg/fyne-cross
#fyne-cross --targets=linux/amd64,windows/amd64,darwin/amd64 gui/npc/npc.go
go get -u fyne.io/fyne fyne.io/fyne/cmd/fyne
go mod vendor
cd vendor
cp -R * /go/src/
cd ..
rm -rf vendor
cd gui/npc
fyne package -os android -appID org.nps.client -icon ../../docs/logo.png
mv npc.apk ../../android_client.apk

View File

@ -1,4 +1,4 @@
#/bash/sh
#!/bash/sh
export VERSION=0.25.2
sudo apt-get install gcc-mingw-w64-i686
@ -163,6 +163,7 @@ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubun
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
docker --version
docker run --rm -i -w /app -v $(pwd):/app -e ANDROID_HOME=/usr/local/android_sdk ffdfgdfg/fyne-cross:android build.android.sh
git clone https://github.com/cnlh/spksrc.git ~/spksrc
mkdir ~/spksrc/nps && cp -rf ./* ~/spksrc/nps/
docker run -itd --name spksrc --env VERSION=$VERSION -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash