Skip to content

Commit

Permalink
Unify casing in Batch files, remove VS 2017 installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex committed Jan 5, 2023
1 parent 5f3864f commit 3d208f3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 55 deletions.
8 changes: 2 additions & 6 deletions windows/internal/check_deps.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,14 @@ IF "%BUILD_VISION%" == "" (
)
)

IF NOT EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
echo Visual Studio %VC_YEAR% C++ BuildTools is required to compile PyTorch on Windows
exit /b 1
)

set VC_VERSION_LOWER=17
set VC_VERSION_UPPER=18
IF "%VC_YEAR%" == "2017" (
set VC_VERSION_LOWER=15
set VC_VERSION_UPPER=16
)
IF "%VC_YEAR%" == "2019" (
if "%VC_YEAR%" == "2019" (
set VC_VERSION_LOWER=16
set VC_VERSION_UPPER=17
)
Expand Down
3 changes: 0 additions & 3 deletions windows/internal/cuda_install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ if not exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_
popd

echo Installing VS integration...
if "%VC_YEAR%" == "2017" (
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets\BuildCustomizations"
)
if "%VC_YEAR%" == "2019" (
xcopy /Y "%SRC_DIR%\temp_build\cuda\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations"
)
Expand Down
10 changes: 3 additions & 7 deletions windows/internal/env_fix.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@

setlocal

IF NOT EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
echo Visual Studio %VC_YEAR% C++ BuildTools is required to compile PyTorch on Windows
exit /b 1
)

set VC_VERSION_LOWER=17
set VC_VERSION_UPPER=18
IF "%VC_YEAR%" == "2017" (
set VC_VERSION_LOWER=15
set VC_VERSION_UPPER=16
)
IF "%VC_YEAR%" == "2019" (
if "%VC_YEAR%" == "2019" (
set VC_VERSION_LOWER=16
set VC_VERSION_UPPER=17
)
Expand All @@ -31,7 +27,7 @@ for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio

:vswhere

IF "%VS15VCVARSALL%"=="" (
if "%VS15VCVARSALL%"=="" (
echo Visual Studio %VC_YEAR% C++ BuildTools is required to compile PyTorch on Windows
exit /b 1
)
Expand Down
5 changes: 0 additions & 5 deletions windows/internal/smoke_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ goto end
:libtorch
echo "install and test libtorch"

if "%VC_YEAR%" == "2017" powershell internal\vs2017_install.ps1
if "%VC_YEAR%" == "2019" powershell internal\vs2019_install.ps1
if "%VC_YEAR%" == "2022" powershell internal\vs2022_install.ps1

Expand All @@ -160,10 +159,6 @@ pushd tmp\libtorch

set VC_VERSION_LOWER=17
set VC_VERSION_UPPER=18
IF "%VC_YEAR%" == "2017" (
set VC_VERSION_LOWER=15
set VC_VERSION_UPPER=16
)
IF "%VC_YEAR%" == "2019" (
set VC_VERSION_LOWER=16
set VC_VERSION_UPPER=17
Expand Down
7 changes: 1 addition & 6 deletions windows/internal/vc_install_helper.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
if "%VC_YEAR%" == "2017" powershell windows/internal/vs2017_install.ps1
if "%VC_YEAR%" == "2019" powershell windows/internal/vs2019_install.ps1
if "%VC_YEAR%" == "2022" powershell windows/internal/vs2022_install.ps1

set VC_VERSION_LOWER=17
set VC_VERSION_UPPER=18
IF "%VC_YEAR%" == "2017" (
set VC_VERSION_LOWER=15
set VC_VERSION_UPPER=16
)
IF "%VC_YEAR%" == "2019" (
if "%VC_YEAR%" == "2019" (
set VC_VERSION_LOWER=16
set VC_VERSION_UPPER=17
)
Expand Down
28 changes: 0 additions & 28 deletions windows/internal/vs2017_install.ps1

This file was deleted.

0 comments on commit 3d208f3

Please sign in to comment.