diff --git a/doc/Package.md b/doc/Package.md index 20b6cc0..eb25d90 100644 --- a/doc/Package.md +++ b/doc/Package.md @@ -21,6 +21,7 @@ for a full description of this file. -variants Name1,Name2,Name3 : Build only named variants instead of DefaultVariants from packageconfig.json -test : Testing mode, separate builds, allow dirty working copy + -browse : After packaging, browse the output folder -dryrun : Don't perform any actual actions, just report on what you would do -help : Print this help @@ -118,3 +119,7 @@ more than one subfolder in the package folder, which is only the case when you build a dedicated client & server. In that case there will be separate zips for each, e.g. `MyGame_1.1.2.0_PublicSteamWin64_WindowsClient.zip` and `MyGame_1.1.2.0_PublicSteamWin64_WindowsServer.zip` +### 10. Optionally Browse Packaged Output + +If you supply the optional argument `-browse`, your file manager will be asked to +open the folder containing the newly packaged output, if it completed successfully. \ No newline at end of file diff --git a/ue4-package.ps1 b/ue4-package.ps1 index 0afc4c4..63a03be 100644 --- a/ue4-package.ps1 +++ b/ue4-package.ps1 @@ -17,6 +17,8 @@ param ( [array]$variants, # Testing mode; skips clean checks, tags [switch]$test = $false, + # Browse the output directory in file explorer after packaging + [switch]$browse = $false, # Dry-run; does nothing but report what *would* have happened [switch]$dryrun = $false, [switch]$help = $false @@ -46,6 +48,7 @@ function Write-Usage { Write-Output " -variants Name1,Name2,Name3" Write-Output " : Build only named variants instead of DefaultVariants from packageconfig.json" Write-Output " -test : Testing mode, separate builds, allow dirty working copy" + Write-Output " -browse : After packaging, browse the output folder" Write-Output " -dryrun : Don't perform any actual actions, just report on what you would do" Write-Output " -help : Print this help" Write-Output " " @@ -290,6 +293,10 @@ try { } } + if ($browse -and -not $dryrun) { + Invoke-Item $(Join-Path $config.OutputDir $versionNumber) + } + } catch { Write-Output $_.Exception.Message @@ -297,5 +304,4 @@ catch { Exit 9 } - Write-Output "~-~-~ UE4 Packaging Helper Completed OK ~-~-~"