diff --git a/internal/etw/_fixtures/Taskfile.yml b/internal/etw/_fixtures/Taskfile.yml index 308d8c85a..5b507c42b 100644 --- a/internal/etw/_fixtures/Taskfile.yml +++ b/internal/etw/_fixtures/Taskfile.yml @@ -2,8 +2,6 @@ version: '3' vars: SYSWHISPERS3_REPO: https://github.com/klezVirus/SysWhispers3.git - VISUAL_STUDIO_EDITION: Enterprise - VISUAL_STUDIO_VERSION: 2022 tasks: direct-syscall: @@ -12,7 +10,7 @@ tasks: cmds: - git clone {{ .SYSWHISPERS3_REPO }} - python SysWhispers3/syswhispers.py -a x64 -c msvc -p common -o syscalls - - cmd.exe /c 'C:\"Program Files"\"Microsoft Visual Studio"\{{ .VISUAL_STUDIO_VERSION }}\{{ .VISUAL_STUDIO_EDITION }}\VC\Auxiliary\Build\vcvars64.bat && nmake -f Makefile.msvc' + - cmd.exe /c "{{.ROOT_DIR}}\build.bat Makefile.msvc" silent: true indirect-syscall: @@ -21,7 +19,7 @@ tasks: cmds: - git clone {{ .SYSWHISPERS3_REPO }} - python SysWhispers3/syswhispers.py -a x64 -c msvc -p common -m jumper_randomized -o syscalls - - cmd.exe /c 'C:\"Program Files"\"Microsoft Visual Studio"\{{ .VISUAL_STUDIO_VERSION }}\{{ .VISUAL_STUDIO_EDITION }}\VC\Auxiliary\Build\vcvars64.bat && nmake -f Makefile.msvc' + - cmd.exe /c "{{.ROOT_DIR}}\build.bat Makefile.msvc" silent: true all: diff --git a/internal/etw/_fixtures/build.bat b/internal/etw/_fixtures/build.bat new file mode 100644 index 000000000..d66efae7b --- /dev/null +++ b/internal/etw/_fixtures/build.bat @@ -0,0 +1,12 @@ +@echo off + +for /f "usebackq delims=" %%i in ( + `"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath` +) do set "VSINSTALLDIR=%%i\" + +echo [INFO] VS install path: %VSINSTALLDIR% + +call "%VSINSTALLDIR%VC\Auxiliary\Build\vcvars64.bat" +if errorlevel 1 exit /b 1 + +nmake -f %1