Last active
February 19, 2024 07:27
-
-
Save BigBallard/854515e00e5183635f762f6330530553 to your computer and use it in GitHub Desktop.
Windows BGFX build powershell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PREREQUISITS | |
# Make sure 'msbuild' is in your path | |
# Make sure 'git' is installed and in Path | |
# Make sure 'Visual Studio 2022' is installed with the desktop development package | |
$projPath = $PSScriptRoot | |
Write-Host "Pulling source code..." | |
git clone https://github.com/bkaradzic/bx.git bx | |
git clone https://github.com/bkaradzic/bimg.git bimg | |
git clone https://github.com/bkaradzic/bgfx.git bgfx | |
Write-Host "Building project..." | |
cd bgfx | |
..\bx\tools\bin\windows\genie --with-tools --with-shared-lib vs2022 | |
MSBuild .\.build\projects\vs2022\bgfx.sln /property:Configuration=Release | |
cd $projPath | |
Write-Host "Gathering artifacts..." | |
$bgfxBuildPath = "$projPath\bgfx\.build\win32_vs2022\bin\bgfx-shared-libRelease.dll" | |
$bgfxIncludePath = "$projPath\bgfx\include\bgfx" | |
Copy-Item -Force -Path $bgfxIncludePath -Destination build\include -Recurse | |
Copy-Item -Force -Path $bgfxBuildPath build\bgfx.dll | |
Write-Host "Cleaning up workspace..." | |
Remove-Item -Recurse -Force bgfx | |
Remove-Item -Recurse -Force bimg | |
Remove-Item -Recurse -Force bx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment