1
0
Fork 0
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:
Audrius Butkevicius 2016-11-30 21:42:23 +00:00
parent 7b192d7df2
commit c72d0b64ef
2 changed files with 16 additions and 2 deletions

View file

@ -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

View file

@ -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