# Save this as: Generate-Manifest.ps1 # Usage: Run in the parent folder of GameBuild (where GameBuild exists) $manifest = @() $rootPath = Get-Location $manifestPath = Join-Path $rootPath "file_manifest.json" # Get all files recursively (excluding manifest itself) $files = Get-ChildItem -Recurse -File -Path $rootPath | Where-Object { $_.Name -ne "file_manifest.json" } foreach ($file in $files) { $hash = Get-FileHash -Algorithm SHA256 -Path $file.FullName $relativePath = $file.FullName.Replace((Resolve-Path ".\"), "").Replace("\", "/") $manifest += @{ path = $relativePath hash = $hash.Hash.ToLower() } } # Convert to JSON and write to file $json = $manifest | ConvertTo-Json -Depth 10 $json | Out-File -FilePath "file_manifest.json" -Encoding utf8 Write-Host " file_manifest.json generated at $manifestPath"