Add prebuild directory and update git dot files

This commit is contained in:
Colin Sames
2026-04-03 17:47:53 +02:00
parent 7b07d01400
commit 09b97782e0
168 changed files with 154519 additions and 161085 deletions

View File

@@ -1,11 +1,26 @@
# One-time bootstrap: builds SDL3 from source and installs it into prebuilt/windows/.
# Run this once after cloning. Re-run only when upgrading SDL.
param(
[string]$BuildType = "Release"
[string]$SdlVersion = "3.2.10",
[string]$BuildType = "Release"
)
$ProjectRoot = Resolve-Path "$PSScriptRoot\.."
$SdlSource = "$ProjectRoot\external\SDL"
$BuildDir = "$ProjectRoot\out\build\_sdl_build\windows"
$BuildDir = "$ProjectRoot\out\build\_sdl_bootstrap\windows"
$PrebuiltDir = "$ProjectRoot\prebuilt\windows"
$SdlSource = "$BuildDir\SDL-src"
# Download SDL source if not already present
if (-not (Test-Path $SdlSource)) {
Write-Host "`n=== Downloading SDL3 $SdlVersion ===" -ForegroundColor Cyan
New-Item -ItemType Directory -Force -Path $BuildDir | Out-Null
$Archive = "$BuildDir\SDL-$SdlVersion.tar.gz"
Invoke-WebRequest -Uri "https://github.com/libsdl-org/SDL/archive/refs/tags/release-$SdlVersion.tar.gz" `
-OutFile $Archive
tar -xf $Archive -C $BuildDir
Rename-Item "$BuildDir\SDL-release-$SdlVersion" "SDL-src"
Remove-Item $Archive
}
function Build-SDL {
param([string]$LinkType)
@@ -17,7 +32,6 @@ function Build-SDL {
Write-Host "`n=== Building SDL3 ($LinkType) for Windows ===" -ForegroundColor Cyan
# Wipe any stale build directory to avoid corrupted cache issues
if (Test-Path $BuildOut) {
Write-Host "Removing stale build directory: $BuildOut" -ForegroundColor Yellow
Remove-Item -Recurse -Force $BuildOut