From ac8cc908670b77130247e15322137cf80c76fa16 Mon Sep 17 00:00:00 2001 From: Gerhard Olsson Date: Fri, 26 Apr 2019 01:38:42 +0200 Subject: [PATCH] wip review comments --- frontend.bat | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend.bat b/frontend.bat index de1dcb2..2eac4d1 100644 --- a/frontend.bat +++ b/frontend.bat @@ -458,7 +458,8 @@ rem :: https://github.com/3F/hMSBuild/issues/8 set vswfilter=!vswPriority! :_vswAttempt -call :dbgprint "attempts with filter: " vswfilter vswPreRel vswbin +call :dbgprint "attempts with filter: " vswfilter vswPreRel +call :dbgprint " using: " vswbin set "vspath=" & set "vsver=" for /F "usebackq tokens=1* delims=: " %%a in (`"!vswbin!" -nologo !vswPreRel! -requires !vswfilter! Microsoft.Component.MSBuild`) do ( @@ -523,17 +524,17 @@ for /F "tokens=1,2 delims=." %%a in ("!vsver!") do ( rem https://github.com/3F/hMSBuild/issues/3 set vsver=%%~a.0 ) -REM Workaround for VS2019, may use 'vswhere -find' instead -if !vsver! geq 16.0 set vsver=Current -set _msbp=!vspath!\MSBuild\!vsver!\Bin +REM VS2019 changes the path +if !vsver! geq 16 set vsver=Current + +if not exist "!vspath!\MSBuild\!vsver!\Bin" set "%3=" & exit /B 0 +set _msbp=!vspath!\MSBuild\!vsver!\Bin call :dbgprint "found path via vswhere: " _msbp -if not defined notamd64 ( if exist "!_msbp!\amd64" ( call :dbgprint "found /amd64" - set _msbp=!_msbp!\amd64 -) + set _msbp=!_msbp!\amd64 ) call :msbfound _msbp _msbp @@ -609,7 +610,7 @@ if not defined notamd64 ( :: 7z & amd64\msbuild - https://github.com/3F/vsSolutionBuildEvent/issues/38 set _noamd=!_msbp:Framework64=Framework! -set _noamd=!_noamd:amd64=! +set _noamd=!_noamd:\amd64=! if exist "!_noamd!" ( call :dbgprint "Return 32bit version because of -notamd64 key."