Skip to content

Instantly share code, notes, and snippets.

@RootKiller
Created April 27, 2024 12:35
Show Gist options
  • Save RootKiller/1c76b5c0ba564bb1e66b41249b0eb4db to your computer and use it in GitHub Desktop.
Save RootKiller/1c76b5c0ba564bb1e66b41249b0eb4db to your computer and use it in GitHub Desktop.
Set of files used for generating Unreal Project files via BAT compatible with Epic Games Launcher version of the Engine. I use it with 10x extension that works with both compiled and launcher engine projects.
@echo off
rem Run PowerShell script that has actual logic, it is much easier to write power shell vs batch.
Powershell.exe -executionpolicy remotesigned -File %~dp0GenerateProjectFiles.Internal.ps1
exit 0
$GenerateProjectFilesToolPath = (Get-ItemProperty -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Unreal.ProjectFile\shell\rungenproj\command).'(default)'
Get-ChildItem -Path $PSScriptRoot\. -Filter *.uproject -File -Name | ForEach-Object {
$ProjectPath = "$PSScriptRoot\$_"
Write-Output "Discovered Unreal Project: '$ProjectPath'. Trying to generate project files..."
$FinalGenerateProjectFilesToolPath = $GenerateProjectFilesToolPath.replace("%1", $ProjectPath)
Invoke-Expression "& $FinalGenerateProjectFilesToolPath"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment