Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394# Comprehensive fix for FMOD build issues# Run as Administrator
#Requires -RunAsAdministrator
Write-Host "=========================================" -ForegroundColor CyanWrite-Host "Fixing FMOD Build Issues" -ForegroundColor CyanWrite-Host "=========================================" -ForegroundColor CyanWrite-Host ""
$ProjectRoot = "C:\Perforce\SpiderLily\SL_main"$FMODPlugin = "$ProjectRoot\Plugins\FMODStudio"
# 1. Fix all corrupted generated filesWrite-Host "Step 1: Fixing corrupted generated includes..." -ForegroundColor Yellow
$corruptedFiles = @( "$FMODPlugin\Intermediate\Build\Win64\UnrealGame\Inc\FMODStudio\UHT\FMODCallbackHandler.gen.cpp", "$FMODPlugin\Intermediate\Build\Win64\UnrealEditor\Inc\FMODStudio\UHT\FMODCallbackHandler.gen.cpp")
foreach ($file in $corruptedFiles) { if (Test-Path $file) { $content = Get-Content -Path $file -Raw if ($content -match 'allbackHandler\.h') { $fixed = $content -replace '"allbackHandler\.h"', '"FMODCallbackHandler.h"' Set-Content -Path $file -Value $fixed -NoNewline Write-Host "[OK] Fixed: $file" -ForegroundColor Green } }}
Write-Host ""
# 2. Check for missing FMOD librariesWrite-Host "Step 2: Checking FMOD libraries..." -ForegroundColor Yellow
$fmodLibs = @( "$FMODPlugin\Binaries\Win64\fmodL_vc.lib", "$FMODPlugin\Binaries\Win64\fmodstudioL_vc.lib", "$FMODPlugin\Binaries\Win64\fmodL.dll", "$FMODPlugin\Binaries\Win64\fmodstudioL.dll")
$missingLibs = @()foreach ($lib in $fmodLibs) { if (!(Test-Path $lib)) { Write-Host "[MISSING] $lib" -ForegroundColor Red $missingLibs += $lib } else { Write-Host "[OK] Found: $(Split-Path $lib -Leaf)" -ForegroundColor Green }}
Write-Host ""
if ($missingLibs.Count -gt 0) { Write-Host "[ERROR] Missing FMOD library files!" -ForegroundColor Red Write-Host "" Write-Host "These files should be in Perforce. Force sync:" -ForegroundColor Yellow Write-Host " cd C:\Perforce" -ForegroundColor Gray Write-Host " p4 sync -f //SpiderLily/Plugins/FMODStudio/Binaries/Win64/..." -ForegroundColor Gray Write-Host "" Write-Host "Or check if you have the correct Perforce workspace view." -ForegroundColor Yellow} else { Write-Host "[OK] All FMOD libraries present" -ForegroundColor Green}
Write-Host ""Write-Host "Step 3: Preventing regeneration..." -ForegroundColor Yellow
# Mark the fixed files as read-only to prevent UHT from regenerating themforeach ($file in $corruptedFiles) { if (Test-Path $file) { Set-ItemProperty -Path $file -Name IsReadOnly -Value $true Write-Host "[OK] Marked read-only: $(Split-Path $file -Leaf)" -ForegroundColor Green }}
Write-Host ""Write-Host "=========================================" -ForegroundColor CyanWrite-Host "Fix Complete" -ForegroundColor CyanWrite-Host "=========================================" -ForegroundColor CyanWrite-Host ""
if ($missingLibs.Count -eq 0) { Write-Host "Next: Retry the build" -ForegroundColor Green Write-Host " powershell.exe -ExecutionPolicy Bypass -File ""\\wsl.localhost\Ubuntu\home\me\aesthetic-computer\windows\build-false-work.ps1""" -ForegroundColor Gray} else { Write-Host "Next: Sync missing FMOD files from Perforce first" -ForegroundColor Yellow}
Write-Host ""