BitMechanic / UnrealXistTools

Xist's Unreal C++ Build & Dev Tools (PowerShell 7)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unreal Xist Tools

Xist's Unreal C++ Build & Dev Tools. Requires PowerShell 7+.

Main Branch: https://github.com/XistGG/UnrealXistTools/

Setup

  • Make sure you are using PowerShell 7+
    • winget install Microsoft.PowerShell
  • Clone this repository
  • Add this repository clone folder to your $env:PATH

Build Tools

IDE Tools

Engine Tools

Project Tools

  • UProject.ps1
    • Get Project Settings
  • UProjectFile.ps1
    • Get the .uproject file associated with a path (current directory by default)
  • UProjectSln.ps1
    • Get the .sln file associated with a path (current directory by default)

P4 Tools

  • P4EncodePath.ps1
    • Encode (or -Decode) paths for P4
  • P4ImportBulk.ps1
    • Import a massive number of files into a new depot without breaking P4 (tested by importing 800k+ files from UDN P4 //UE5/Release-5.2)
  • P4Info.ps1
    • Makes it real easy to extract p4 info values

UProjectClean.ps1

view source: UProjectClean.ps1

  • Delete all Binaries (generated data)
  • Delete all Intermediate (generated data)
  • Delete all *.sln (generated data)
  • Delete all .idea (if you set -Idea switch)
  • Delete all DerivedDataCache (if you set -DDC switch)
  • Generate Project Files

Supports the -Debug flag, add it to any command to gain more insight.

Usage Examples

Clean the project in the current directory:

UProjectClean.ps1

Clean a specific MyGame.uproject:

UProjectClean.ps1 MyGame.uproject

UEdit.ps1

view source: UEdit.ps1

Start Unreal Editor: Open the .uproject associated with the current directory.

Alias for UnrealVersionSelector.ps1 -Editor $(&UProjectFile.ps1 -Path:$Path).FullName

Note that as this uses UnrealVersionSelector under the hood, you must have compiled your editor and project in Development Editor mode. When opening a project in editor, the underlying UVS requires that we use a Development editor.

Supports the -Debug flag, add it to any command to gain more insight.

Usage Examples

Open the .uproject file in the current directory:

UEdit.ps1

Open the .uproject file in the specified directory:

UEdit.ps1 path/to/project

UnrealVersionSelector.ps1

view source: UnrealVersionSelector.ps1

  • Allows developer to refer to .uproject files via relative paths
  • Infers the name of .uproject files based on current directory
  • Executes Epic's UnrealVersionSelector.exe for base functionality

Supports the -Debug flag, add it to any command to gain more insight.

See -Help for Usage.

Usage Examples

Generate project files:

UnrealVersionSelector.ps1 -ProjectFiles

Choose which Engine to use:

UnrealVersionSelector.ps1 -SwitchVersion

Choose a Specific Engine:

UnrealVersionSelector.ps1 -SwitchVersionSilent /Project/Root/Engine/Binaries/../..

Rider.ps1

view source: Rider.ps1

Start Rider: Open the .uproject associated with the current directory.

Supports the -Debug flag, add it to any command to gain more insight.

Usage Examples

Open the .uproject file in the current directory:

Rider.ps1

Open the .sln file in the current directory:

Rider.ps1 -sln

VS.ps1

view source: VS.ps1

Start Visual Studio: Open the .sln associated with the current directory.

Supports the -Debug flag, add it to any command to gain more insight.

Usage Examples

Open the .sln file in the current directory:

VS.ps1

Diff 2 files (for example can be used from p4v as the diff tool)

VS.ps1 -diff file1 file2

MigrateUEMarketplacePlugin.ps1

view source: MigrateUEMarketplacePlugin.ps1

Required Arguments:

  • -Plugin Name
  • -From PathToSourceEngineRoot
  • -To PathToDestinationEngineRoot

Optional Arguments:

  • -Debug
    • If present, this switch causes additional debugging output to be written
  • -Force
    • If the destination plugin already exists, forcefully remove it and overwrite with the newly built plugin
    • If this switch is not present, the script will abort rather than overwrite an existing plugin

Usage Examples

MigrateUEMarketplacePlugin.ps1 -Plugin AutoSizeComments -From "E:/EpicLauncher/UE_5.1" -To "E:/MyEngine_5.2" -Debug -Force
MigrateUEMarketplacePlugin.ps1 -Plugin BlueprintAssist -From "E:/EpicLauncher/UE_5.1" -To "E:/MyEngine_5.2" -Debug -Force
MigrateUEMarketplacePlugin.ps1 -Plugin VisualStudioTools -From "E:/EpicLauncher/UE_5.1" -To "E:/MyEngine_5.2" -Debug -Force

In the above example, you would have told the Epic Games Launcher to install UE 5.1 into the folder E:/EpicLauncher/UE_5.1 and you would have installed these plugins from the UE Marketplace into the UE 5.1 Engine.

These commands would then copy 3 plugins from the UE Marketplace into your custom engine at E:/MyEngine_5.2 including AutoSizeComments, BlueprintAssist and VisualStudioTools.

UEngine.ps1

view source: UEngine.ps1

  • By default selects the engine used by the current or named project
  • -List lists all available custom engines
  • -Name selects from available custom engines
  • -NewName renames an engine to your choice of names
  • -Project selects the engine associated with the given .uproject

See -Help for more Usage info.

Usage Examples

Display a list of all custom engines on this system:

UEngine.ps1 -List

Rename the OldRandomGUIDName custom engine as MyEngine

UEngine.ps1 OldRandomGUIDName -NewName MyEngine

UProject.ps1

view source: UProject.ps1

Returns JSON parsed contents of $UProjectFile as a PowerShell Object

Supports the -Debug flag, add it to any command to gain more insight.

Usage

View the current .uproject in terminal:

UProject.ps1

Get the Engine Association of a specific .uproject:

$(UProject.ps1 project.uproject).EngineAssociation

UProjectFile.ps1

view source: UProjectFile.ps1

Returns the .uproject file relevant to the -Path (implicit first string parameter, or current directory by default).

Example: /project/project.uproject

Supports the -Debug switch. Enable it to see debug info to help you understand how the .uproject is being assigned.

Usage

Select the default .uproject for the current directory:

UProjectFile.ps1

Select the default .uproject in the specified directory:

UProjectFile.ps1 /project

Select a specific .uproject:

UProjectFile.ps1 project.uproject

UProjectSln.ps1

view source: UProjectSln.ps1

Returns the .sln file relevant to the -Path (implicit first string parameter, or current directory by default).

Example: /project/project.sln

Supports the -Debug switch. Enable it to see debug info to help you understand how the .sln is being assigned.

Usage

Select the default .sln for the current directory:

UProjectSln.ps1

Select the default .sln in the specified directory:

UProjectSln.ps1 /project

Select a specific .sln:

UProjectSln.ps1 project.sln

P4EncodePath.ps1

view source: P4EncodePath.ps1

Encodes or Decodes a P4 path. See -Help for more details.

See P4 filespecs for more info regarding P4 path encoding requirements.

See -Help for Usage.

P4ImportBulk.ps1

view source: P4ImportBulk.ps1

Import a massive number of files into a new depot without breaking P4.

As of Jan-2023 I am unable to get P4 to successfully import UDN in one commit. Perhaps it is related to RAM availability?

With this script, I can break the 800k+ files into batches and submit those, which works great.

Supports the -Debug flag, add it to any command to gain more insight.

See -Help for Usage.

P4Info.ps1

view source: P4Info.ps1

Extracts p4 info output into a Dictionary, which it returns as the result.

You can then grab specific keys if you want, for example:

$P4Username = (P4Info.ps1)."User name"

You can also use this to initialize .p4config files like:

P4Info.ps1 -Config > .p4config

Try the -Debug switch to see the parse info.

About

Xist's Unreal C++ Build & Dev Tools (PowerShell 7)

License:MIT License


Languages

Language:PowerShell 100.0%