aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/installer/build.bat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-02 11:29:05 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-07 11:31:53 +0200
commitf91a962d6461e3e72b83041e4cebfb3acf5c1e40 (patch)
treecb5853f4f9e37168bee063a55f19ffe9b83d853d /installer/build.bat
parentbuild: support building wg(8) (diff)
downloadwireguard-windows-f91a962d6461e3e72b83041e4cebfb3acf5c1e40.tar.xz
wireguard-windows-f91a962d6461e3e72b83041e4cebfb3acf5c1e40.zip
build: remove .exe suffix from command invocations
And set pathext to .exe to be explicit. Also, we're not going to do sfx. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--installer/build.bat17
1 files changed, 9 insertions, 8 deletions
diff --git a/installer/build.bat b/installer/build.bat
index ef6b2a6d..1ea450f0 100644
--- a/installer/build.bat
+++ b/installer/build.bat
@@ -2,6 +2,9 @@
rem SPDX-License-Identifier: MIT
rem Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
+set OLDPATHEXT=%PATHEXT%
+set PATHEXT=.exe
+
for /f "tokens=3" %%a in ('findstr /r "WIREGUARD_WINDOWS_VERSION_STRING.*[0-9.]*" ..\version.h') do set WIREGUARD_VERSION=%%a
set WIREGUARD_VERSION=%WIREGUARD_VERSION:"=%
@@ -35,16 +38,14 @@ if exist .deps\prepared goto :build
call :msi x86 x86 || goto :error
call :msi amd64 x64 || goto :error
if exist ..\sign.bat call ..\sign.bat
- if "%SigningCertificate%"=="" goto :build_sfx
- if "%TimestampServer%"=="" goto :build_sfx
+ if "%SigningCertificate%"=="" goto :out
+ if "%TimestampServer%"=="" goto :out
echo [+] Signing
- signtool.exe sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "WireGuard Setup" "dist\wireguard-*-%WIREGUARD_VERSION%.msi" || goto :error
-
-:build_sfx
- rem TODO: Build SFX bundle with all MSIs.
+ signtool sign /sha1 "%SigningCertificate%" /fd sha256 /tr "%TimestampServer%" /td sha256 /d "WireGuard Setup" "dist\wireguard-*-%WIREGUARD_VERSION%.msi" || goto :error
:out
set WIX=%OLDWIX%
+ set PATHEXT=%OLDPATHEXT%
cd %STARTDIR%
exit /b %errorlevel%
@@ -61,7 +62,7 @@ if exist .deps\prepared goto :build
:msi
echo [+] Compiling %1
- "%WIX%bin\candle.exe" %WIX_CANDLE_FLAGS% -dPlatform="%~1" -out "%~1\wireguard.wixobj" -arch %2 wireguard.wxs || exit /b %errorlevel%
+ "%WIX%bin\candle" %WIX_CANDLE_FLAGS% -dPlatform="%~1" -out "%~1\wireguard.wixobj" -arch %2 wireguard.wxs || exit /b %errorlevel%
echo [+] Linking %1
- "%WIX%bin\light.exe" %WIX_LIGHT_FLAGS% -out "dist\wireguard-%~1-%WIREGUARD_VERSION%.msi" "%~1\wireguard.wixobj" || exit /b %errorlevel%
+ "%WIX%bin\light" %WIX_LIGHT_FLAGS% -out "dist\wireguard-%~1-%WIREGUARD_VERSION%.msi" "%~1\wireguard.wixobj" || exit /b %errorlevel%
goto :eof