From bd001125625e7bb456b98c95ae8a15ba1c1ede9e Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sun, 22 May 2022 20:08:37 +0300 Subject: [PATCH] update windows build script Signed-off-by: R4SAS --- build/build_mingw.cmd | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/build/build_mingw.cmd b/build/build_mingw.cmd index 6540f833..8ee6e565 100644 --- a/build/build_mingw.cmd +++ b/build/build_mingw.cmd @@ -52,22 +52,28 @@ REM converting configuration files to DOS format (make usable in Windows Notepad %xSH% "unix2dos contrib/i2pd.conf contrib/tunnels.conf contrib/tunnels.d/* contrib/webconsole/style.css" >> build\build.log 2>&1 REM Prepare binary signing command if signing key and password provided -if defined SIGNKEY ( - if defined SIGNPASS ( - echo Signing options found - - for %%X in (signtool.exe) do (set xSIGNTOOL=%%~$PATH:X) - if not defined xSIGNTOOL ( - if not defined SIGNTOOL ( - echo Error: Can't find signtool. Please provide path to binary using SIGNTOOL variable. - exit /b 1 - ) else ( - set "xSIGNTOOL=%SIGNTOOL%" - ) +if defined SIGN ( + echo Signing enabled + + for %%X in (signtool.exe) do (set xSIGNTOOL=%%~$PATH:X) + if not defined xSIGNTOOL ( + if not defined SIGNTOOL ( + echo Error: Can't find signtool. Please provide path to binary using SIGNTOOL variable. + exit /b 1 + ) else ( + set "xSIGNTOOL=%SIGNTOOL%" ) + ) + + if defined SIGNKEY ( + set "xSIGNKEYOPTS=/f ^"%SIGNKEY%^"" + ) - set "xSIGNOPTS=sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /f ^"%SIGNKEY%^" /p ^"%SIGNPASS%^"" + if defined SIGNPASS ( + set "xSIGNPASSOPTS=/p ^"%SIGNPASS%^"" ) + + set "xSIGNOPTS=sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 %SIGNKEYOPTS% %SIGNPASSOPTS%" ) REM starting building