Rename ue4-blah to ue-blah since UE5 is supported

Also fix some docs
This commit is contained in:
Steve Streeting 2022-04-19 16:42:11 +01:00
parent f5dbbdacb7
commit 453bca9591
20 changed files with 40 additions and 597 deletions

View File

@ -8,7 +8,7 @@ I don't use this script very much any more because I'm using Live Coding now.
The script also cleans up Live Coding patches but there's fewer of those. The script also cleans up Live Coding patches but there's fewer of those.
``` ```
ue4-cleanup.ps1 [[-src:]sourcefolder] [Options] ue-cleanup.ps1 [[-src:]sourcefolder] [Options]
-src : Source folder (current folder if omitted) -src : Source folder (current folder if omitted)
: (should be root of project) : (should be root of project)

View File

@ -37,7 +37,7 @@ specific to your LFS server. It's not ideal.
My solution is to write a tool to make it easier to share BuiltData files My solution is to write a tool to make it easier to share BuiltData files
as a side-channel to the Git LFS repository. You simply provide a file share as a side-channel to the Git LFS repository. You simply provide a file share
(ideally a network drive, or a synced folder like Google Drive / Dropbox if you (ideally a network drive, or a synced folder like Google Drive / Dropbox if you
don't mind a little duplication) and use my script `ue4-datasync.ps1` to don't mind a little duplication) and use my script `ue-datasync.ps1` to
sync lighting data between team members. sync lighting data between team members.
Using Git LFS is a prerequisite, because it uses the OIDs from the .umap files Using Git LFS is a prerequisite, because it uses the OIDs from the .umap files
@ -46,13 +46,13 @@ the matching version of the BuiltData is used.
## Details ## Details
Note: this script will automatically close the UE4 editor if you have the Note: this script will automatically close the Unreal editor if you have the
project open, in order to prevent accidental issues such as unsaved changes or project open, in order to prevent accidental issues such as unsaved changes or
locked files. locked files.
``` ```
Usage: Usage:
ue4-datasync.ps1 [-mode:]<push|pull> [[-path:]syncpath] [Options] ue-datasync.ps1 [-mode:]<push|pull> [[-path:]syncpath] [Options]
-mode : Whether to push or pull the built data from your filesystem -mode : Whether to push or pull the built data from your filesystem
-root : Root folder to sync files to/from. Project name will be appended to this path. -root : Root folder to sync files to/from. Project name will be appended to this path.
@ -61,7 +61,7 @@ Usage:
: (should be root of project) : (should be root of project)
-prune : Clean up versions of the data older than the latest -prune : Clean up versions of the data older than the latest
-force : Copy ALL BuiltData files regardless of size/timestamp checks -force : Copy ALL BuiltData files regardless of size/timestamp checks
-nocloseeditor : Don't close UE4 editor (this will prevent download of updated files) -nocloseeditor : Don't close Unreal editor (this will prevent download of updated files)
-dryrun : Don't perform any actual actions, just report on what you would do -dryrun : Don't perform any actual actions, just report on what you would do
-verbose : Print more information -verbose : Print more information
-help : Print this help -help : Print this help
@ -85,7 +85,7 @@ what happens in each mode.
### Push mode ### Push mode
> Example: `ue4-datasync.ps1 push` > Example: `ue-datasync.ps1 push`
> >
> Assuming you run this in your project root and have defined the environment variable UESYNCROOT > Assuming you run this in your project root and have defined the environment variable UESYNCROOT
@ -107,7 +107,7 @@ umap on this shared drive, without it being in the git repo.
### Pull mode ### Pull mode
> Example: `ue4-datasync.ps1 pull` > Example: `ue-datasync.ps1 pull`
> >
> Assuming you run this in your project root and have defined the environment variable UESYNCROOT > Assuming you run this in your project root and have defined the environment variable UESYNCROOT
@ -145,7 +145,7 @@ you only do it for the `push` variant.
## Automating this ## Automating this
You can use `ue4-datasync.ps1` manually, calling it in `push` mode just after You can use `ue-datasync.ps1` manually, calling it in `push` mode just after
you push any map changes (assuming you've built the lighting), and in `pull` mode you push any map changes (assuming you've built the lighting), and in `pull` mode
on demand, as and when you know you want to pick up new lighting data that others on demand, as and when you know you want to pick up new lighting data that others
have built. have built.

View File

@ -4,7 +4,7 @@ We've found it useful to provide a simple script which can be run on artists'
machines to get the latest from Git, and make sure all the C++ components are machines to get the latest from Git, and make sure all the C++ components are
built. built.
It now also automatically calls `ue4-datasync.ps1 pull` if `UESYNCROOT` is defined It now also automatically calls `ue-datasync.ps1 pull` if `UESYNCROOT` is defined
in the environment. in the environment.
While the UE editor can sometimes do this successfully on startup as well, While the UE editor can sometimes do this successfully on startup as well,
@ -16,7 +16,7 @@ The script also automatically closes the UE editor if it's open on the same
project to make sure the build is successful. project to make sure the build is successful.
``` ```
ue4-get-latest.ps1 [[-src:]sourcefolder] [Options] ue-get-latest.ps1 [[-src:]sourcefolder] [Options]
-src : Source folder (current folder if omitted) -src : Source folder (current folder if omitted)
: (should be root of project) : (should be root of project)

View File

@ -20,7 +20,7 @@ We use a this content workflow in our UE game repositories:
isn't very good outside of Unreal right now isn't very good outside of Unreal right now
1. When exporting, output (`FBX`, `PNG`, `WAV` etc) goes in `$REPO/Content` (and subfolders) 1. When exporting, output (`FBX`, `PNG`, `WAV` etc) goes in `$REPO/Content` (and subfolders)
* These files are *ignored* in Git because they are derived data * These files are *ignored* in Git because they are derived data
* UE4 imports them to a `.uasset` which contains all their contents anyway * Unreal imports them to a `.uasset` which contains all their contents anyway
1. Imported content becomes `.uasset` in `$REPO/Content` 1. Imported content becomes `.uasset` in `$REPO/Content`
* These files are added to Git * These files are added to Git
* They are also tracked as Git LFS files * They are also tracked as Git LFS files
@ -30,13 +30,13 @@ Together the script below configures all of this automatically.
## The script ## The script
You run the script from a Powershell prompt, in the root of your UE4 project. You run the script from a Powershell prompt, in the root of your Unreal project.
``` ```
ue4-git-setup.ps1 [[-src:]sourcefolder] [Options] ue-git-setup.ps1 [[-src:]sourcefolder] [Options]
-src : Source folder (current folder if omitted) -src : Source folder (current folder if omitted)
: (should be root of your UE4 project) : (should be root of your Unreal project)
-dryrun : Don't perform any actual actions, just report on what you would do -dryrun : Don't perform any actual actions, just report on what you would do
-help : Print this help -help : Print this help
``` ```
@ -51,7 +51,7 @@ See the notes below for some practical details of running it.
* `git lfs migrate import --everything --include="*.uasset,*.umap,<others>"` * `git lfs migrate import --everything --include="*.uasset,*.umap,<others>"`
* This repo will need to be re-cloned by everyone but it's MUCH cleaner than changing to LFS mid-history * This repo will need to be re-cloned by everyone but it's MUCH cleaner than changing to LFS mid-history
1. Make a note of any custom .gitignore entries you have, the script will replace it 1. Make a note of any custom .gitignore entries you have, the script will replace it
1. Run `ue4-git-setup.ps1` in the root project folder 1. Run `ue-git-setup.ps1` in the root project folder
1. Add back any specialised .gitignores we didn't cover (might not need any) 1. Add back any specialised .gitignores we didn't cover (might not need any)
1. Push ALL BRANCHES of this new repo to the host of your choice 1. Push ALL BRANCHES of this new repo to the host of your choice

View File

@ -1,6 +1,6 @@
# Packaging Script # Packaging Script
The `ue4-package.ps1` script builds, cooks and packages your game into a folder, The `ue-package.ps1` script builds, cooks and packages your game into a folder,
much like using "File > Package Project" in the UE editor. However, it offers a much like using "File > Package Project" in the UE editor. However, it offers a
number of other features. number of other features.
@ -9,7 +9,7 @@ in the root of your Unreal project. Please see the [Package Config File docs](Pa
for a full description of this file. for a full description of this file.
``` ```
ue4-package.ps1 [-src:sourcefolder] [-major|-minor|-patch|-hotfix] [-keepversion] [-force] [-variant=VariantName] [-test] [-dryrun] ue-package.ps1 [-src:sourcefolder] [-major|-minor|-patch|-hotfix] [-keepversion] [-force] [-variant=VariantName] [-test] [-dryrun]
-src : Source folder (current folder if omitted), must contain packageconfig.json -src : Source folder (current folder if omitted), must contain packageconfig.json
-major : Increment major version i.e. [x++].0.0.0 -major : Increment major version i.e. [x++].0.0.0
@ -78,7 +78,7 @@ only a specific list, or all *excluding* a chosen few.
### 7. Package Variants ### 7. Package Variants
Rather than building / packaging just a single way, `ue4-package.ps1` supports Rather than building / packaging just a single way, `ue-package.ps1` supports
packaging multiple variants of your project. The variations can be: packaging multiple variants of your project. The variations can be:
* **Platform**: lets you build for Windows, Linux, Mac etc * **Platform**: lets you build for Windows, Linux, Mac etc

View File

@ -147,7 +147,7 @@ zipped packages will be created in.
*Optional Setting - string* *Optional Setting - string*
By default, scripts will locate your `.uproject` file automatically in the root of By default, scripts will locate your `.uproject` file automatically in the root of
your UE4 project folder. If for any reason you have more than one, you can your Unreal project folder. If for any reason you have more than one, you can
specify which to use with this setting. specify which to use with this setting.
## Package Variants ## Package Variants

View File

@ -13,7 +13,7 @@ automatically determine which maps to rebuild if you want, or you can
explicitly list them as arguments: explicitly list them as arguments:
``` ```
ue4-rebuild-lightmaps.ps1 [-src:sourcefolder] [-quality:(preview|medium|high|production)] [-maps Map1,Map2,Map3] [-dryrun] ue-rebuild-lightmaps.ps1 [-src:sourcefolder] [-quality:(preview|medium|high|production)] [-maps Map1,Map2,Map3] [-dryrun]
-src : Source folder (current folder if omitted) -src : Source folder (current folder if omitted)
-quality : Lightmap quality, preview/medium/high/production -quality : Lightmap quality, preview/medium/high/production

View File

@ -1,6 +1,6 @@
# Release Script # Release Script
The release script `ue4-release.ps1` takes previously packaged builds (see The release script `ue-release.ps1` takes previously packaged builds (see
[Packaging Script](./Package.md)) and uploads them to publishing services; [Packaging Script](./Package.md)) and uploads them to publishing services;
currently Itch.io and Steam. currently Itch.io and Steam.
@ -11,7 +11,7 @@ release on Itch.
This script uses configuration stored in [`packageconfig.json`](./PackageConfig.md). This script uses configuration stored in [`packageconfig.json`](./PackageConfig.md).
``` ```
ue4-release.ps1 [-version:ver|-latest] -variants:v1,v2 -services:steam,itch [-src:sourcefolder] [-dryrun] ue-release.ps1 [-version:ver|-latest] -variants:v1,v2 -services:steam,itch [-src:sourcefolder] [-dryrun]
-version:ver : Version to release; must have been packaged already -version:ver : Version to release; must have been packaged already
-latest : Instead of an explicit version, release one identified in project settings -latest : Instead of an explicit version, release one identified in project settings

View File

@ -1,174 +0,0 @@
# LEGACY: Subversion Information (ignore below if using Git)
## Steps to create a new SVN repo for a UE4 project
1. Create new repo on your Subversion server, note the URL e.g. https://foo/bar
1. Run `ue4-svn-create.ps1 [URL]` in the parent folder you want your project to live
1. This will result in a subfolder called "bar" by default due to URL suffix
> See [creation script usage](#subversion-repo-creation-script) to specify a different destination path
1. After it's finished the script will have created the trunk/branches/tags folders for you,
and then checked out the trunk for you into "bar"
1. You then need to copy the contents of your UE4 project into this folder
> (UE4 doesn't let you create projects in non-empty folders so if you haven't
created a project yet, create it somewhere else then move the contents)
## Updating an existing UE4 project
If you already have a UE4 project in Subversion, you can instead just run the
[in-place setup script](#subversion-repo-setup-script) instead to configure it
for the workflow discussed above. You'll just need to commit the changes
after the script has completed.
## What these scripts do
### Creation Script
1. **Creates trunk / branches / tags folders**
If they're missing, the script creates them and commits to the root.
1. **Checks out trunk**
This will become your working folder.
1. **Runs the setup script**
Performs all the steps from the [setup script](#-setup-script) below.
It then commits all these changes so the working copy is ready to use.
### Setup Script
1. **Ignore unnecessary folders**
It ignores folders in the root we don't need in Subversion:
* .vs
* Binaries
* Build
* DerivedDataCache
* Intermediate
* Saved
It sets the `svn:ignore` property in the root folder to do this. It will merge
with the contents of any existing property by default. `svn:ignore` is
not set recursively and does not get inherited (despite what TortoiseSVN
gives the impression of).
1. **Sets binary files to needs-lock**
By setting the `svn:auto-props` value for common binary types tracked in the
repo such as `.uasset` and `.umap`, it enforces locking on those files,
triggering UE4 to give you check out prompts when you edit them.
This property is set on the root folder and is inherited throughout the tree.
1. **Creates folder structure**
Subversion, and particularly TortoiseSVN has a "quirk" whereby inherited
properties are not respected for files inside a folder that isn't added to
SVN yet. This means that if you rely on `svn:global-ignores` being inherited
from a parent, a file inside a new folder that *should* be ignored is still
shown in the Add/Commit TSVN dialog, until its parent folder is added, at
which point it is hidden.
I maintain this is *extremely* dumb behaviour because you can easily add
files that should be ignored by accident, unless you manually add the folder
first. However a big TSVN thread from a few years back has defended this
bizarre approach as "by design". So to mitigate this, I pre-create the
majority of our preferred folder structure ahead of time.
Our preferred **workflow** is:
1. All content creation tool files in `$REPO/MediaSrc` (subfolders by type)
* These are typically in formats that UE4 might not read directly, so outside `Content`
* These files are *tracked* in SVN
1. When exporting, place output (`FBX`, `PNG`, `WAV` etc) in `$REPO/Content` (and subfolders)
* These files are *ignored* in SVN because they are derived data
* UE4 imports them to a `.uasset` which contains all their contents anyway
1. All `.uasset` post-imported content in `$REPO/Content` is *tracked* in SVN (binary)
So the tool pre-creates `MediaSrc`, `Content` and subfolders (if they don't already
exist), and adds them to Subversion ahead of time to head off as many quirks
as possible.
1. **Ignore derived export data in Content folder**
As discussed in the workflow section above, exported files like `PNG` and `FBX`
are not committed because they're duplicated data (source is in Maya/Blender/Photoshop files in `MediaSrc`, game-ready data is in `.uasset` files in `Content`). So we want
to ignore them underneath `Content`.
The `svn:ignore` property isn't helpful because it isn't inherited by subfolders,
and if you set it recursively it only applies to folders that already exist.
Although we've tried to help by creating most of the structure up-front, we
don't want to preclude creating new folders, and don't want everyone who
does so to have to remember to set the `svn:ignore` up.
So instead we use `svn:global-ignores`, a newer property that is inherited
by children (although as noted above it behaves a little oddly before you add
folders to SVN, but at least you don't have to set the property again). Any
`PNG`, `FBX` files you export into `Content` for import will be ignored, and
you can just commit the `.uasset` files, and the original sources in `MediaSrc`.
The export files can be considered temporary.
> We set `svn:global-ignores` for all the common intermediate formats *only*
> on the `Content` folder. This is so that if, for some reason, you don't have
> a typical content creator file for an asset and for some reason you want to
> store the `PNG` or `FBX` for it manually (instead of just the `.uasset`, which is all
> the game needs), you can put those files in `MediaSrc` if you want, and copy
> them to `Content` for importing as a substitute for the normal export workflow.
>
> In practice I don't think you need to do this, because you can export `.uasset`
> files anyway. Probably better to just put orphaned files like this directly in
> `Content` and only commit the post-import `.uasset`. But the option is there.
## Script Reference
### Repo Creation Script
This constructs the entirety of the starting repository from a Subversion URL
(which should contain an empty repository, or at most empty trunk/branches/tags
subfolders).
Usage:
```
ue4-svn-create.ps1 [-urn:]svnurl [[-path:]checkoutpath] [Options]
-url : Subversion URL; the ROOT path (should be empty)
-path : Checkout path; if omitted append last part of URL to current dir
-help : Print this help
```
It calls the [setup script below](#subversion-repo-setup-script),
plus creating the trunk/branches/tags structure, and checking out trunk for you.
It also commits all the changes so your repo is ready to go.
Unreal doesn't let you create a new project inside a directory with contents,
so create your new project elsewhere then copy it into this new trunk checkout.
Unfortunately there's no way to avoid this because we need folders to exist
to set SVN properties on them.
### Repo Setup Script
This is a second-level script to intialise the structure of an existing Subversion
trunk checkout for UE4. Run in the root of that trunk checkout - it will work
for existing UE4 folders or blank repositories.
None of the changes are committed so you can review them.
Usage:
```
ue4-svn-setup.ps1 [[-src:]sourcefolder] [Options]
-src : Source folder (current folder if omitted)
: (should be root of trunk in new repo)
-skipstructurecheck
: Skip the check that makes sure you're in trunk
-overwriteprops
: Replace all properties instead of merging
: Will overwrite svn:ignore, svn:global-ignores, svn:auto-props
-dryrun : Don't perform any actual actions, just report on what you would do
-help : Print this help
```

View File

@ -1,111 +0,0 @@
[CmdletBinding()] # Fail on unknown args
param (
[string]$url,
[string]$path,
[switch]$help = $false
)
function Print-Usage {
Write-Output "Steve's UE4 Subversion Repo Creation Tool"
Write-Output " Create the structure for a new SVN repo & setup for UE4"
Write-Output " It will create trunk/branches/tags, then checkout trunk & setup UE4"
Write-Output " Run this if you have a completely blank server side repo & no checkout"
Write-Output "Usage:"
Write-Output " ue4-svn-create.ps1 [-urn:]svnurl [[-path:]checkoutpath] [Options]"
Write-Output " "
Write-Output " -url : Subversion URL; the ROOT path (should be empty)"
Write-Output " -path : Checkout path; if omitted append last part of URL to current dir"
Write-Output " -help : Print this help"
}
function Delete-Recursive {
param (
[string]$pathtodelete
)
# Remove-Item -Recurse doesn't work properly so do this manually
# -Force to Get-ChildItem includes hidden files, -Force to Remove-Item allows readonly delete
Get-ChildItem $pathtodelete -Recurse -Force | Remove-Item -Force -Recurse
Remove-Item -Force $pathtodelete # remove parent too
}
if ($help) {
Print-Usage
Exit 0
}
if ($url.Length -eq 0) {
Write-Output "ERROR: Missing Subversion URL argument"
Exit 1
}
$ErrorActionPreference = "Stop"
# Parse URL
$svnurl = [uri]$url
if ($path.Length -eq 0) {
$path = $svnurl.Segments[$svnurl.Segments.Length-1]
Write-Verbose "INFO: Checkout path not specified, using '$path'"
}
# Check $path doesn't exist
if (Test-Path $path) {
Write-Output "ERROR: Directory at '$path' already exists"
Exit 2
}
# Checkout SVN root
Write-Output "Checking out $url to $path"
svn checkout $url $path > $null
Push-Location $path
# check empty
if ($(Get-ChildItem .).Length -gt 0) {
# it's OK if the contents are trunk/branches/tags
# .svn is not listed by default since hidden but allow anyway
$allowed = @("trunk", "branches", "tags", ".svn")
foreach ($sub in $(Get-ChildItem .)) {
if (-not $sub -in $allowed) {
Write-Output "ERROR: Subversion root is not empty (bad entry: '$sub')"
Pop-Location
Delete-Recursive $path
Exit 2
}
}
}
Write-Output "Creating trunk/branches/tags folders"
$commit = $false
foreach ($dir in @("trunk", "branches", "tags")) {
if (-not $(Test-Path $dir)) {
New-Item $dir -ItemType Directory > $null
svn add $dir > $null
$commit = $true
}
}
if ($commit) {
svn commit -m "Created basic trunk/branches/tags structure"
}
Pop-Location
# Now delete and checkout trunk
Delete-Recursive $path
svn checkout $url/trunk $path > $null
Push-Location $path
# Call setup script from our location
& $PSScriptRoot/ue4-svn-setup.ps1
# That doesn't commit, so do that now
svn commit -m "UE4 setup for Subversion" > $null
Pop-Location

View File

@ -1,261 +0,0 @@
[CmdletBinding()] # Fail on unknown args
param (
[string]$src,
# Ignore project structure problems
[switch]$skipstructurecheck = $false,
[switch]$overwriteprops = $false,
[switch]$dryrun = $false,
[switch]$help = $false
)
function Print-Usage {
Write-Output "Steve's UE4 Subversion Repo Setup Tool"
Write-Output " Run this if you already have a SVN trunk checkout"
Write-Output "Usage:"
Write-Output " ue4-svn-setup.ps1 [[-src:]sourcefolder] [Options]"
Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " : (should be root of trunk in new repo)"
Write-Output " -skipstructurecheck"
Write-Output " : Skip the check that makes sure you're in trunk"
Write-Output " -overwriteprops"
Write-Output " : Replace all properties instead of merging"
Write-Output " : Will overwrite svn:ignore, svn:global-ignores, svn:auto-props"
Write-Output " -dryrun : Don't perform any actual actions, just report on what you would do"
Write-Output " -help : Print this help"
}
$root_svnignore = @"
.vs
Binaries
Build
DerivedDataCache
Intermediate
Saved
"@
$root_globalignores = @"
*.blend1
"@
$content_globalignores = @"
*.bmp
*.png
*.jpg
*.tif
*.tiff
*.tga
*.fbx
*.exr
*.mp3
*.wav
"@
$root_autoprops = @"
*.uasset = svn:needs-lock=*
*.umap = svn:needs-lock=*
"@
$content_folders = @"
Content/
Content/Animation
Content/Blueprints
Content/Blueprints/UI
Content/Fonts
Content/Maps
Content/Materials
Content/Meshes
Content/Particles
Content/Textures
Content/Textures/UI
"@
$mediasrc_folders = @"
MediaSrc
MediaSrc/Audio
MediaSrc/Audio/FX
MediaSrc/Audio/Music
MediaSrc/Meshes
MediaSrc/Textures
MediaSrc/Textures/UI
"@
function Set-Svn-Props {
param (
[string]$propname,
[string]$values,
[string]$path
)
if (-not $overwriteprops) {
# We need to merge our props with whatever is already present
# Can't believe SVN doesn't have a command for this (facepalm)
# We need to continue on error if property doesn't exist
$ErrorActionPreference = "SilentlyContinue"
$oldvalues = (svn propget $propname $path 2>$null)
$ErrorActionPreference = "Stop"
$oldarray = $oldvalues -split "\r?\n"
$newarray = $values -split "\r?\n"
# remove duplicates & Empties and sort both arrays so we can insert
$oldarray = $oldarray | Where-Object {$_} | Select-Object -Unique | Sort-Object
$newarray = $newarray | Where-Object {$_} | Select-Object -Unique | Sort-Object
# create modifiable list for merged
$finallist = [System.Collections.ArrayList]@()
$oldidx = 0
foreach ($newitem in $newarray) {
# If this is a X = Y row, then we only match the X part
$match = $newitem
$iskeyvalue = $($newitem -contains "=")
if ($iskeyvalue) {
$match = $newitem.split("=")[0].trim()
}
$insertednewitem = $false
while (-not $insertednewitem) {
if ($oldidx -lt $oldarray.Length) {
$olditem = $oldarray[$oldidx]
$oldmatch = $olditem
if ($iskeyvalue) {
$oldmatch = $olditem.split("=")[0].trim()
}
if ($match -eq $oldmatch) {
# use new value
$finallist.Add($newitem) > $null # ArrayList.Add returns index & prints it
++$oldidx
$insertednewitem = $true
} elseif ($match -gt $oldmatch) {
$finallist.Add($olditem) > $null
++$oldidx
} else {
$finallist.Add($newitem) > $null
$insertednewitem = $true
}
} else {
# run out of old items, just append new
$finallist.Add($newitem) > $null
$insertednewitem = $true
}
}
}
while ($oldidx -lt $oldarray.Length) {
## Add any trailing old items
$finallist.Add($oldarray[$oldidx++])
}
# Convert to final values
$values = $($finallist -join "`n")
Write-Verbose "Merged values for $propname on '$path': `n$values"
}
if ($dryrun) {
Write-Output "PROPS: Would have set $propname on '$path' to: `n$values"
} else {
svn propset $propname "$values" $path
}
}
function Create-Svn-Folder {
param (
[string]$fld
)
if (-not $(Test-Path $fld)) {
Write-Output "FIXED: $fld folder did not exist, creating"
if (-not $dryrun) {
New-Item -Path $fld -ItemType Directory > $null
}
}
$statline = svn status -v --depth=empty $fld
if ($statline) {
$status = $statline[0]
} else {
$status = '?'
}
if ($status -eq 'I' -or $status -eq '?') {
Write-Output "FIXED: $fld directory is not tracked in SVN, adding"
if (-not $dryrun) {
# Add but don't add any contents yet because we may need to ignore them
svn add --depth=empty $fld > $null
}
}
}
if ($help) {
Print-Usage
Exit 0
}
if ($src.Length -eq 0) {
$src = "."
Write-Verbose "-src not specified, assuming current directory"
}
$ErrorActionPreference = "Stop"
if ($src -ne ".") {
Push-Location $src
if ($LASTEXITCODE -ne 0) {
Write-Output "ERROR: Unable to change directory to '$src', exiting"
Exit 1
}
}
$svnurl = svn info --show-item 'url'
if ($LASTEXITCODE -ne 0) {
Write-Output "ERROR: 'svn info' failed, not a Subversion repository?'"
Exit 1
}
if (-not $skipstructurecheck) {
# check that we're in the trunk folder, if not, stop & warn about project structure (disable with option)
$svnleaf = Split-Path -Path $svnurl -Leaf
if ($svnleaf -ne "trunk") {
Write-Output "ERROR: SVN URL $svnurl is not at the root of trunk"
Exit 1
}
Write-Verbose "SVN URL is $svnurl, all OK"
}
try {
# Create Content & subfolders of Content so that they already exist & properties work
foreach ($cf in $content_folders -split "\r?\n") {
Create-Svn-Folder $cf
}
foreach ($msf in $mediasrc_folders -split "\r?\n") {
Create-Svn-Folder $msf
}
# Ignore root folders we don't need
Set-Svn-Props "svn:ignore" $root_svnignore "."
# Add global ignores to root
Set-Svn-Props "svn:global-ignores" $root_globalignores "."
# Globally ignore non .uasset files inside Content
# Because we'll put all source files in MediaSource and export into Content for UE import
# We don't need both the exported version and the uasset
# We'll use the svn 1.8+ global-ignores inherited property so it applies to all subfolders created later
# Regular ignore even with --recursive only sets on folders that exist already
Set-Svn-Props "svn:global-ignores" $content_globalignores "Content"
# Now set up svn:needs-lock in auto-props
Set-Svn-Props "svn:auto-props" $root_autoprops "."
} catch {
Write-Output $_.Exception.Message
Exit 9
}
if ($src -ne ".") { Pop-Location }

View File

@ -22,7 +22,7 @@ param (
function Write-Usage { function Write-Usage {
Write-Output "Steve's Unreal Blueprint recompile tool" Write-Output "Steve's Unreal Blueprint recompile tool"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-blueprint-recompile.ps1 [-src:sourcefolder] [-bpdir:blueprintdir] [-dryrun]" Write-Output " ue-blueprint-recompile.ps1 [-src:sourcefolder] [-bpdir:blueprintdir] [-dryrun]"
Write-Output " " Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)" Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " -bpdir : Path to Blueprints relative to your Content dir, defaults to 'Blueprints'" Write-Output " -bpdir : Path to Blueprints relative to your Content dir, defaults to 'Blueprints'"

View File

@ -11,7 +11,7 @@ function Print-Usage {
Write-Output "Steve's Unreal Build Tool" Write-Output "Steve's Unreal Build Tool"
Write-Output " This is a WIP, only builds for dev right now" Write-Output " This is a WIP, only builds for dev right now"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-build.ps1 [[-mode:]<dev|test|prod>] [[-src:]sourcefolder] [Options]" Write-Output " ue-build.ps1 [[-mode:]<dev|test|prod>] [[-src:]sourcefolder] [Options]"
Write-Output " " Write-Output " "
Write-Output " -mode : Build mode" Write-Output " -mode : Build mode"
Write-Output " : dev = build Development Editor, dlls only (default)" Write-Output " : dev = build Development Editor, dlls only (default)"

View File

@ -10,7 +10,7 @@ function Print-Usage {
Write-Output "Steve's Unreal Project Cleanup Tool" Write-Output "Steve's Unreal Project Cleanup Tool"
Write-Output " Clean up hot-reload DLLs & prune LFS to free space. Will close Unreal editor!" Write-Output " Clean up hot-reload DLLs & prune LFS to free space. Will close Unreal editor!"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-cleanup.ps1 [[-src:]sourcefolder] [Options]" Write-Output " ue-cleanup.ps1 [[-src:]sourcefolder] [Options]"
Write-Output " " Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)" Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " : (should be root of project)" Write-Output " : (should be root of project)"

View File

@ -14,7 +14,7 @@ function Print-Usage {
Write-Output "Steve's UE Map BuiltData Sync Tool" Write-Output "Steve's UE Map BuiltData Sync Tool"
Write-Output " Avoid storing Map_BuiltData.uasset files in source control, sync them directly instead" Write-Output " Avoid storing Map_BuiltData.uasset files in source control, sync them directly instead"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-datasync.ps1 [-mode:]<push|pull> [[-path:]syncpath] [Options]" Write-Output " ue-datasync.ps1 [-mode:]<push|pull> [[-path:]syncpath] [Options]"
Write-Output " " Write-Output " "
Write-Output " -mode : Whether to push or pull the built data from your filesystem" Write-Output " -mode : Whether to push or pull the built data from your filesystem"
Write-Output " -root : Root folder to sync files to/from. Project name will be appended to this path." Write-Output " -root : Root folder to sync files to/from. Project name will be appended to this path."
@ -23,7 +23,7 @@ function Print-Usage {
Write-Output " : (should be root of project)" Write-Output " : (should be root of project)"
Write-Output " -prune : Clean up versions of the data older than the latest" Write-Output " -prune : Clean up versions of the data older than the latest"
Write-Output " -force : Copy ALL BuiltData files regardless of size/timestamp checks" Write-Output " -force : Copy ALL BuiltData files regardless of size/timestamp checks"
Write-Output " -nocloseeditor : Don't close UE4 editor before pulling (may prevent success)" Write-Output " -nocloseeditor : Don't close Unreal editor before pulling (may prevent success)"
Write-Output " -dryrun : Don't perform any actual actions, just report on what you would do" Write-Output " -dryrun : Don't perform any actual actions, just report on what you would do"
Write-Output " -help : Print this help" Write-Output " -help : Print this help"
Write-Output " " Write-Output " "

View File

@ -10,7 +10,7 @@ function Print-Usage {
Write-Output "Steve's Unreal Get Latest Tool" Write-Output "Steve's Unreal Get Latest Tool"
Write-Output " Get latest from repo and build for dev. Will close Unreal editor!" Write-Output " Get latest from repo and build for dev. Will close Unreal editor!"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-get-latest.ps1 [[-src:]sourcefolder] [Options]" Write-Output " ue-get-latest.ps1 [[-src:]sourcefolder] [Options]"
Write-Output " " Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)" Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " : (should be root of project)" Write-Output " : (should be root of project)"
@ -78,7 +78,7 @@ try {
$cleanupargs += "-dryrun" $cleanupargs += "-dryrun"
} }
# Use Invoke-Expression so we can use a string as options # Use Invoke-Expression so we can use a string as options
Invoke-Expression "&'$PSScriptRoot/ue4-cleanup.ps1' $cleanupargs" Invoke-Expression "&'$PSScriptRoot/ue-cleanup.ps1' $cleanupargs"
# Stopped using rebase because it's a PITA when it goes wrong # Stopped using rebase because it's a PITA when it goes wrong
Write-Output "Pulling latest from Git..." Write-Output "Pulling latest from Git..."
@ -97,20 +97,9 @@ try {
} }
} }
} else { } else {
# Assume svn # Support Perforce?
# Hard coded for Subversion right now throw "Get Latest only supports Git right now"
if ($dryrun) {
Write-Output "Checking for updates we WOULD do:"
svn status --show-updates
} else {
Write-Output "Updating to latest..."
svn up
}
if ($LASTEXITCODE -ne 0) {
throw "Subversion update failed, see above"
}
} }
# Now build # Now build
@ -122,7 +111,7 @@ try {
$cmdargs += "-dryrun" $cmdargs += "-dryrun"
} }
# Use Invoke-Expression so we can use a string as options # Use Invoke-Expression so we can use a string as options
Invoke-Expression "&'$PSScriptRoot/ue4-build.ps1' dev $cmdargs" Invoke-Expression "&'$PSScriptRoot/ue-build.ps1' dev $cmdargs"
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
throw "Build process failed, see above" throw "Build process failed, see above"
@ -138,7 +127,7 @@ try {
$cmdargs += "-dryrun" $cmdargs += "-dryrun"
} }
# Use Invoke-Expression so we can use a string as options # Use Invoke-Expression so we can use a string as options
Invoke-Expression "&'$PSScriptRoot/ue4-datasync.ps1' pull $cmdargs" Invoke-Expression "&'$PSScriptRoot/ue-datasync.ps1' pull $cmdargs"
} }

View File

@ -9,11 +9,11 @@ param (
) )
function Print-Usage { function Print-Usage {
Write-Output "Steve's UE4 Git Repo Setup Tool" Write-Output "Steve's Unreal Git Repo Setup Tool"
Write-Output " Run this on your just-created UE4 project folder." Write-Output " Run this on your just-created Unreal project folder."
Write-Output " .gitattributes and .gitignore will be overwritten" Write-Output " .gitattributes and .gitignore will be overwritten"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-git-setup.ps1 [[-src:]sourcefolder] [Options]" Write-Output " ue-git-setup.ps1 [[-src:]sourcefolder] [Options]"
Write-Output " " Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)" Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " : (should be root of trunk in new repo)" Write-Output " : (should be root of trunk in new repo)"
@ -148,7 +148,7 @@ if ($help) {
if (-not (Get-Module -ListAvailable -Name PsIni)) { if (-not (Get-Module -ListAvailable -Name PsIni)) {
Write-Output "Missing module: PsIni" Write-Output "Missing module: PsIni"
Write-Output "This script uses PsIni to update the UE4 DefaultEngine.ini" Write-Output "This script uses PsIni to update DefaultEngine.ini"
Write-Output "Install it using 'Install-Module PsIni [-Scope CurrentUser]'" Write-Output "Install it using 'Install-Module PsIni [-Scope CurrentUser]'"
Exit 2 Exit 2
} }

View File

@ -35,7 +35,7 @@ param (
function Write-Usage { function Write-Usage {
Write-Output "Steve's Unreal packaging tool" Write-Output "Steve's Unreal packaging tool"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-package.ps1 [-src:sourcefolder] [-major|-minor|-patch|-hotfix] [-keepversion] [-force] [-variant=VariantName] [-test] [-dryrun]" Write-Output " ue-package.ps1 [-src:sourcefolder] [-major|-minor|-patch|-hotfix] [-keepversion] [-force] [-variant=VariantName] [-test] [-dryrun]"
Write-Output " " Write-Output " "
Write-Output " -src : Source folder (current folder if omitted), must contain packageconfig.json" Write-Output " -src : Source folder (current folder if omitted), must contain packageconfig.json"
Write-Output " -major : Increment major version i.e. [x++].0.0.0" Write-Output " -major : Increment major version i.e. [x++].0.0.0"

View File

@ -24,7 +24,7 @@ param (
function Write-Usage { function Write-Usage {
Write-Output "Steve's Unreal lightmap rebuilding tool" Write-Output "Steve's Unreal lightmap rebuilding tool"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-rebuild-lightmaps.ps1 [-src:sourcefolder] [-quality:(preview|medium|high|production)] [-maps Map1,Map2,Map3] [-dryrun]" Write-Output " ue-rebuild-lightmaps.ps1 [-src:sourcefolder] [-quality:(preview|medium|high|production)] [-maps Map1,Map2,Map3] [-dryrun]"
Write-Output " " Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)" Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " -quality : Lightmap quality, preview/medium/high/production" Write-Output " -quality : Lightmap quality, preview/medium/high/production"

View File

@ -26,7 +26,7 @@ param (
function Write-Usage { function Write-Usage {
Write-Output "Steve's Unreal release tool" Write-Output "Steve's Unreal release tool"
Write-Output "Usage:" Write-Output "Usage:"
Write-Output " ue4-release.ps1 [-version:ver|-latest] -variant:var -services:steam,itch [-src:sourcefolder] [-dryrun]" Write-Output " ue-release.ps1 [-version:ver|-latest] -variant:var -services:steam,itch [-src:sourcefolder] [-dryrun]"
Write-Output " " Write-Output " "
Write-Output " -version:ver : Version to release; must have been packaged already" Write-Output " -version:ver : Version to release; must have been packaged already"
Write-Output " -latest : Instead of an explicit version, release one identified in project settings" Write-Output " -latest : Instead of an explicit version, release one identified in project settings"