mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
build: Support building on Windows
This commit is contained in:
parent
7b192d7df2
commit
c72d0b64ef
2 changed files with 16 additions and 2 deletions
12
make-go.bash
12
make-go.bash
|
@ -70,12 +70,20 @@ if [ ! -e ../VERSION ]; then
|
|||
echo "$(git describe --tags)" > ../VERSION
|
||||
fi
|
||||
|
||||
./make.bash --no-banner
|
||||
BUILDER_EXT=bash
|
||||
case "$(uname)" in
|
||||
*MINGW* | *WIN32* | *CYGWIN*)
|
||||
BUILDER_EXT=bat
|
||||
;;
|
||||
esac
|
||||
|
||||
./make.${BUILDER_EXT} --no-banner
|
||||
|
||||
cp -a ../bin "${GOROOT_FINAL}"/
|
||||
cp -a ../pkg "${GOROOT_FINAL}"/
|
||||
cp -a ../src "${GOROOT_FINAL}"/
|
||||
|
||||
if [[ -e ./make.bash ]]; then
|
||||
if [[ -e ./make.${BUILDER_EXT} ]]; then
|
||||
pushd ../
|
||||
git clean -f
|
||||
popd
|
||||
|
|
|
@ -35,6 +35,12 @@ unset GOPATH #Set by build.go
|
|||
export GOROOT=${MYDIR}/ext/golang/dist/go-${GOOS}-${GOARCH}
|
||||
export PATH=${GOROOT}/bin:${PATH}
|
||||
|
||||
case "$(uname)" in
|
||||
*CYGWIN*)
|
||||
export GOROOT=`cygpath -w $GOROOT`
|
||||
;;
|
||||
esac
|
||||
|
||||
pushd ext/syncthing/src/github.com/syncthing/syncthing
|
||||
|
||||
_GOOS=$GOOS
|
||||
|
|
Loading…
Reference in a new issue