Skip to content

Commit d498ff8

Browse files
committed
Add file
1 parent 47e39b8 commit d498ff8

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

packaging/build_ffmpeg.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:: This is stolen from torchaudio
1+
:: Taken from torchaudio
22
@echo off
33

44
set PROJ_FOLDER=%cd%

packaging/vc_env_helper.bat

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:: Taken from torchaudio
2+
@echo on
3+
4+
set VC_VERSION_LOWER=17
5+
set VC_VERSION_UPPER=18
6+
7+
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [%VC_VERSION_LOWER%^,%VC_VERSION_UPPER%^) -property installationPath`) do (
8+
if exist "%%i" if exist "%%i\VC\Auxiliary\Build\vcvarsall.bat" (
9+
set "VS15INSTALLDIR=%%i"
10+
set "VS15VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat"
11+
goto vswhere
12+
)
13+
)
14+
15+
:vswhere
16+
if "%VSDEVCMD_ARGS%" == "" (
17+
call "%VS15VCVARSALL%" x64 || exit /b 1
18+
) else (
19+
call "%VS15VCVARSALL%" x64 %VSDEVCMD_ARGS% || exit /b 1
20+
)
21+
22+
@echo on
23+
24+
if "%CU_VERSION%" == "xpu" call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
25+
26+
set DISTUTILS_USE_SDK=1
27+
28+
set args=%1
29+
shift
30+
:start
31+
if [%1] == [] goto done
32+
set args=%args% %1
33+
shift
34+
goto start
35+
36+
:done
37+
if "%args%" == "" (
38+
echo Usage: vc_env_helper.bat [command] [args]
39+
echo e.g. vc_env_helper.bat cl /c test.cpp
40+
)
41+
42+
%args% || exit /b 1

0 commit comments

Comments
 (0)