4646 cache-dependency-path : ' build/python/requirements.txt'
4747 cache : ' pip'
4848
49+ - name : Install components
50+ run : |
51+ Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
52+ $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
53+ $components= @(
54+ "Microsoft.VisualStudio.Component.VC.v141.x86.x64"
55+ "Microsoft.VisualStudio.Component.VC.v141.ATL"
56+ "Microsoft.VisualStudio.Component.WinXP"
57+ )
58+ [string]$workloadArgs = $components | ForEach-Object {" --add " + $_}
59+ $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
60+ # should be run twice
61+ $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
62+ $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
4963 - uses : ilammy/msvc-dev-cmd@v1
5064 name : Setup msvc environment
5165 with :
66+ toolset : " 14.1"
5267 arch : ${{ steps.setup.outputs.msvc_arch }}
5368
5469 - id : version
@@ -156,7 +171,7 @@ jobs:
156171 - name : CMake (installer_lib)
157172 working-directory : tmp/installer_lib
158173 run : |
159- cmake ../../installer_lib -G "Visual Studio 17" -A ${{ steps.setup.outputs.platform }} -DBOOST_ROOT=${{ steps.paths.outputs.static_boost_root }} -DBOOST_LIBRARYDIR=${{ steps.paths.outputs.static_boost_librarydir }}
174+ cmake ../../installer_lib -T v141 - G "Visual Studio 17" -A ${{ steps.setup.outputs.platform }} -DBOOST_ROOT=${{ steps.paths.outputs.static_boost_root }} -DBOOST_LIBRARYDIR=${{ steps.paths.outputs.static_boost_librarydir }}
160175
161176 - name : Build installer_lib
162177 working-directory : tmp/installer_lib
@@ -166,7 +181,7 @@ jobs:
166181 - name : CMake (NSCP)
167182 working-directory : tmp/nscp
168183 run : |
169- cmake ../.. -G "Visual Studio 17" -A ${{ steps.setup.outputs.platform }}
184+ cmake ../.. -T v141 - G "Visual Studio 17" -A ${{ steps.setup.outputs.platform }}
170185
171186 - name : Build nsclient
172187 working-directory : tmp/nscp
0 commit comments