diff --git a/runprebuild.bat b/runprebuild.bat index 3ee1648c63..e5d7cb882c 100755 --- a/runprebuild.bat +++ b/runprebuild.bat @@ -5,23 +5,23 @@ bin\Prebuild.exe /target vs2015 setlocal ENABLEEXTENSIONS set VALUE_NAME=MSBuildToolsPath +if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% +if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% + rem Try to find VS2019 for %%e in (Enterprise Professional Community) do ( if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" ( - set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\" + set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild" goto :found ) ) rem try find vs2017 -if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% -if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% - for %%e in (Enterprise Professional Community) do ( if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" ( - set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\" + set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild" goto :found ) ) @@ -40,7 +40,7 @@ if defined FOUNDGREP ( rem try vs2015 FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO ( - set ValueValue=%%C + set ValueValue=%%C\msbuild goto :found ) @@ -54,6 +54,6 @@ goto :done :found @echo Found msbuild at %ValueValue% @echo Creating compile.bat - @echo %ValueValue%\msbuild opensim.sln > compile.bat + @echo %ValueValue% opensim.sln > compile.bat :done \ No newline at end of file