Skip to content

Instantly share code, notes, and snippets.

@sensvos
Created April 26, 2023 05:08
Show Gist options
  • Save sensvos/751ee1c8592a117fc1ec20c07200dbcc to your computer and use it in GitHub Desktop.
Save sensvos/751ee1c8592a117fc1ec20c07200dbcc to your computer and use it in GitHub Desktop.
$Source = Get-Content Setup.bat
@"
echo Installing prerequisites...
start /wait Engine\Extras\Redist\en-us\UE4PrereqSetup_x64.exe /quiet
if not exist .\Engine\Binaries\Win64\UnrealVersionSelector-Win64-Shipping.exe goto :no_unreal_version_selector
.\Engine\Binaries\Win64\UnrealVersionSelector-Win64-Shipping.exe /register
"@ -split '\r?\n|\r' | ? { $_.Length } | % {
$Source = $Source -replace ('^(' + [Regex]::Escape($_) + ')$'), "rem ${_}"
}
$Source | Set-Content Setup.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment