Skip to content

Update build.yaml

Update build.yaml #12

Workflow file for this run

name: Build VS2022 D3D9 Project
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.3.1
with:
vs-version: '17.0'
- name: Install Visual Studio components
shell: powershell
run: |
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_buildtools.exe" -OutFile "vs_buildtools.exe"
Start-Process -FilePath "vs_buildtools.exe" -ArgumentList "--quiet", "--wait", "--norestart", "--nocache", "--installPath", "`"${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools`"", "--add", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "--add", "Microsoft.VisualStudio.Component.Windows10SDK" -NoNewWindow -Wait
Remove-Item -Path "vs_buildtools.exe"
- name: Get MSVC Version
shell: powershell
run: |
$MSVCVersion = (Get-ChildItem "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC").Name | Select-Object -Last 1
echo "MSVC_VERSION=$MSVCVersion" >> $env:GITHUB_ENV
Write-Host "Found MSVC Version: $MSVCVersion"
- name: Download DirectX SDK
run: |
Invoke-WebRequest -Uri "https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe" -OutFile "DXSDK_Jun10.exe"
- name: Install DirectX SDK
run: |
Start-Process -FilePath "DXSDK_Jun10.exe" -ArgumentList "/U /Q" -Wait
Write-Host "DirectX SDK Installation completed"
- name: Build Solution
shell: cmd
run: |
set INCLUDE=%INCLUDE%;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\%MSVC_VERSION%\include
set LIB=%LIB%;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\%MSVC_VERSION%\lib\x64
msbuild external-cheat-base.sln /p:Configuration=Release /p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.22000.0 /p:IncludePath="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\%MSVC_VERSION%\include;C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um" /p:LibraryPath="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\%MSVC_VERSION%\lib\x64;C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.22000.0\um\x64"