Skip to content

Commit

Permalink
amend build scripts to work with MSBUILD 14
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysimmons committed Jun 3, 2017
1 parent 4459d83 commit cd12105
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@echo off

call msbuildpath.bat

%MSBUILDDIR%msbuild.exe heightmap2stl-gui.csproj /p:Configuration=Release
"%MSBUILDDIR%msbuild.exe" heightmap2stl-gui.csproj /p:Configuration=Release
8 changes: 4 additions & 4 deletions msbuildpath.bat
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit cd12105

Please sign in to comment.