aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build.bat
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-04-25 13:25:12 +0200
committerSimon Rozman <simon@rozman.si>2019-04-25 13:26:37 +0200
commit80d9e21a1802a1bc5413ba17859b80bf94354c8c (patch)
tree27b22999f80f068e34b4b291e1abb04d09be0ee5 /build.bat
parentREADME: list Signtool as dependency (diff)
downloadwireguard-windows-80d9e21a1802a1bc5413ba17859b80bf94354c8c.tar.xz
wireguard-windows-80d9e21a1802a1bc5413ba17859b80bf94354c8c.zip
build: revert back to %PATH% for mingw
This mostly reverts commit 60f1e0f2e055bd7f9222bb77e8d5893333b76c43. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'build.bat')
-rw-r--r--build.bat7
1 files changed, 5 insertions, 2 deletions
diff --git a/build.bat b/build.bat
index 51b32482..020709b3 100644
--- a/build.bat
+++ b/build.bat
@@ -63,11 +63,14 @@ if exist .deps\prepared goto :build
goto :eof
:build_plat
- set CC=%STARTDIR%\.deps\%~2-w64-mingw32-native\bin\%~2-w64-mingw32-gcc.exe
+ set OLDPATH2=%PATH%
+ set PATH=%STARTDIR%\.deps\%~2-w64-mingw32-native\bin;%PATH%
+ set CC=%~2-w64-mingw32-gcc.exe
set GOARCH=%~3
mkdir %1 >NUL 2>&1
echo [+] Assembling resources %1
- "%STARTDIR%\.deps\%~2-w64-mingw32-native\bin\windres.exe" -i resources.rc -o resources.syso -O coff || exit /b %errorlevel%
+ windres.exe -i resources.rc -o resources.syso -O coff || exit /b %errorlevel%
echo [+] Building program %1
go build -ldflags="-H windowsgui -s -w" -v -o "%~1\wireguard.exe" || exit /b %errorlevel%
+ set PATH=%OLDPATH2%
goto :eof