Skip to content

Commit 44f7c17

Browse files
committed
Win: add Win32 platform setup to windows_build action
1 parent cbb324b commit 44f7c17

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/actions/windows_build/action.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ inputs:
3838
compatibility:
3939
description: 'Toolset compatibility -e.g. _xp(Win32)'
4040
required: false
41-
default: ''
41+
default: ''
4242
msbuild-options:
4343
description: 'Additional MSBuild options -e.g. /p:TargetUniversalCRTVersion=10.0.10586.0(Win32)'
4444
required: false
@@ -49,6 +49,23 @@ runs:
4949
steps:
5050
- shell: pwsh
5151
run: |
52+
if (${{ inputs.platform }} -eq 'Win32')
53+
{
54+
echo "::group::Win32 MSVS 2015 VC v140 Build Tools"
55+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
56+
InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
57+
ComponentsToAdd= @("Microsoft.VisualStudio.Component.VC.140")
58+
[string]$WorkloadArgs = $ComponentsToAdd | 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
63+
echo "::endgroup::"
64+
echo "::group::Win32 Windows 8.1 SDK"
65+
Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=323507 -OutFile sdksetup.exe -UseBasicParsing
66+
Start-Process -Wait sdksetup.exe -ArgumentList "/q", "/norestart", "/features", "OptionId.WindowsDesktopSoftwareDevelopmentKit" # Optional feature: , "OptionId.NetFxSoftwareDevelopmentKit"
67+
echo "::endgroup::"
68+
}
5269
$env:PovBuildDefs = 'POV_RAY_IS_AUTOBUILD=${{ inputs.pov-ray-is-autobuild }};'
5370
$env:PovBuildDefs += 'POV_RAY_BUILD_ID="${{ inputs.pov-ray-build-id }}";'
5471
$env:PovBuildDefs += 'VERSION_BASE="${{ inputs.version-base }}";'

0 commit comments

Comments
 (0)