diff --git a/tools/release/windows-build.cmd b/tools/release/windows-build.cmd index 982f10b..98a6b8d 100644 --- a/tools/release/windows-build.cmd +++ b/tools/release/windows-build.cmd @@ -42,8 +42,18 @@ if errorlevel 1 ( exit /b 1 ) -rem Prevent Git Bash from converting/corrupting %LIB% and semicolon paths. +rem Prevent Git Bash from converting/corrupting the MSVC environment. +rem MSYS2_ARG_CONV_EXCL protects command-line ARGUMENTS; the actual +rem kernel32.lib LNK1104 is caused by MSYS rewriting the %LIB% ENVIRONMENT +rem variable (backslashes + semicolons), which requires MSYS2_ENV_CONV_EXCL. set "MSYS2_ARG_CONV_EXCL=*" +set "MSYS2_ENV_CONV_EXCL=*" + +if "%LIB%"=="" ( + echo [WARN] LIB is empty after vcvarsall - try a different WINSDK + echo e.g. set WINSDK=10.0.22621.0 +) +echo LIB=%LIB% rem Convert the repo path to forward slashes for Git Bash (%~dp0 is rem tools\release\ with a trailing backslash; ..\.. reaches the repo root).