From cd1210554bbbbe47e3dfe86c4778ff25b0765ed1 Mon Sep 17 00:00:00 2001 From: Jeremy Simmons Date: Fri, 2 Jun 2017 21:09:40 -0600 Subject: [PATCH] amend build scripts to work with MSBUILD 14 --- build.bat | 4 +--- msbuildpath.bat | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build.bat b/build.bat index 4e6f018..e4a2f5c 100644 --- a/build.bat +++ b/build.bat @@ -1,5 +1,3 @@ @echo off - call msbuildpath.bat - -%MSBUILDDIR%msbuild.exe heightmap2stl-gui.csproj /p:Configuration=Release \ No newline at end of file +"%MSBUILDDIR%msbuild.exe" heightmap2stl-gui.csproj /p:Configuration=Release \ No newline at end of file diff --git a/msbuildpath.bat b/msbuildpath.bat index dad8f37..285ed3a 100644 --- a/msbuildpath.bat +++ b/msbuildpath.bat @@ -1,12 +1,12 @@ @echo off -reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath > nul 2>&1 +reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath > nul 2>&1 if ERRORLEVEL 1 goto MissingMSBuildRegistry -for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') do SET MSBUILDDIR=%%B +for /f "skip=2 tokens=2,*" %%A in ('reg.exe query "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath') do SET "MSBUILDDIR=%%B" -IF NOT EXIST %MSBUILDDIR%nul goto MissingMSBuildToolsPath -IF NOT EXIST %MSBUILDDIR%msbuild.exe goto MissingMSBuildExe +IF NOT EXIST "%MSBUILDDIR%" goto MissingMSBuildToolsPath +IF NOT EXIST "%MSBUILDDIR%msbuild.exe" goto MissingMSBuildExe exit /b 0