Add prebuild directory and update git dot files
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user