-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathue-build.ps1
More file actions
64 lines (51 loc) · 2.05 KB
/
Copy pathue-build.ps1
File metadata and controls
64 lines (51 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[CmdletBinding()] # Fail on unknown args
param (
[string]$mode,
[string]$src,
[switch]$nocloseeditor = $false,
[switch]$dryrun = $false,
[switch]$help = $false
)
function Print-Usage {
Write-Output "Steve's Unreal Build Tool"
Write-Output "Usage:"
Write-Output " ue-build.ps1 [[-mode:]<dev|test|prod>] [[-src:]sourcefolder] [Options]"
Write-Output " "
Write-Output " -mode : Build mode"
Write-Output " : dev = build Development Editor, dlls only (default)"
Write-Output " : cleandev = build Development Editor CLEANLY"
Write-Output " : test = build Development and pacakge for test"
Write-Output " : prod = build Shipping and package for production"
Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " : (should be root of project)"
Write-Output " -nocloseeditor : Don't close Unreal editor (this will prevent DLL cleanup)"
Write-Output " -dryrun : Don't perform any actual actions, just report on what you would do"
Write-Output " -help : Print this help"
Write-Output " "
Write-Output "Environment Variables:"
Write-Output " UEINSTALL : Use a specific Unreal install."
Write-Output " : Default is to find one based on project version, under UEROOT"
Write-Output " UEROOT : Parent folder of all binary Unreal installs (detects version). "
Write-Output " : Default C:\Program Files\Epic Games"
Write-Output " "
}
$ErrorActionPreference = "Stop"
if ($help) {
Print-Usage
Exit 0
}
if (-not $mode) {
$mode = "dev"
}
if ($src.Length -eq 0) {
$src = "."
Write-Verbose "-src not specified, assuming current directory"
}
if (-not ($mode -in @('dev', 'cleandev', 'test', 'prod'))) {
Print-Usage
Write-Output "ERROR: Invalid mode argument: $mode"
Exit 3
}
. $PSScriptRoot\inc\buildcmd.ps1
$result = Build-Project -mode $mode -src $src -nocloseeditor:$nocloseeditor -dryrun:$dryrun
Exit $result