make.bash 596 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -e
  3. if [ ! -f make.bash ]; then
  4. echo 'make.bash must be run from $GOPATH/src/github.com/Psiphon-Labs/psiphon-tunnel-core/ConsoleClient'
  5. exit 1
  6. fi
  7. # Make sure we have our dependencies
  8. echo 'go-getting dependencies...'
  9. go get -d -v ./...
  10. echo 'Building windows-386 executable...'
  11. CGO_ENABLED=1 GOOS=windows GOARCH=386 \
  12. go build -a -v -o psiphon-tunnel-core.exe
  13. upx --best psiphon-tunnel-core.exe
  14. mkdir -p windows_386
  15. mv -f psiphon-tunnel-core.exe windows_386/psiphon-tunnel-core.exe
  16. echo 'Windows executable can be found at: windows_386/psiphon-tunnel-core.exe'