2024-09-09 19:46:53 +00:00
|
|
|
if [[ "$1" == "--install" ]]; then
|
|
|
|
# install go > 1.23:
|
|
|
|
wget https://go.dev/dl/go1.23.1.linux-amd64.tar.gz
|
|
|
|
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.23.1.linux-amd64.tar.gz
|
|
|
|
export PATH=$PATH:/usr/local/go/bin
|
|
|
|
export PATH=$PATH:~/go/bin
|
|
|
|
go install golang.org/x/mobile/cmd/gomobile@latest
|
|
|
|
gomobile init
|
|
|
|
fi
|
|
|
|
|
2024-06-28 19:37:12 +00:00
|
|
|
# build mwebd:
|
2024-06-08 12:26:48 +00:00
|
|
|
git clone https://github.com/ltcmweb/mwebd
|
2024-07-17 16:51:30 +00:00
|
|
|
cd mwebd
|
2024-09-06 15:45:13 +00:00
|
|
|
git reset --hard f6ea8a9e3d348b01bb44f03a1cc4ad65b0abe935
|
2024-07-17 16:13:41 +00:00
|
|
|
gomobile bind -target=android -androidapi 21 .
|
2024-07-17 16:51:30 +00:00
|
|
|
mkdir -p ../../../cw_mweb/android/libs/
|
2024-06-28 19:37:12 +00:00
|
|
|
mv ./mwebd.aar $_
|
2024-07-17 16:13:41 +00:00
|
|
|
# cleanup:
|
2024-07-17 16:51:30 +00:00
|
|
|
cd ..
|
2024-07-17 16:13:41 +00:00
|
|
|
rm -rf mwebd
|