From 390f85d8dc43b10862fb666d1bd8bb23c0aafb5a Mon Sep 17 00:00:00 2001 From: Joshua Huburn Date: Wed, 1 Apr 2020 12:47:52 +0100 Subject: [PATCH 1/3] Use build_home for symlinking the unreal engine with var $unreal_engine_symlink_dir --- ci/setup-and-build.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ci/setup-and-build.ps1 b/ci/setup-and-build.ps1 index fa4d2a49..a39c0006 100644 --- a/ci/setup-and-build.ps1 +++ b/ci/setup-and-build.ps1 @@ -5,7 +5,9 @@ param( [string] $deployment_launch_configuration = "one_worker_test.json", [string] $deployment_snapshot_path = "snapshots/FPS-Start_Small.snapshot", [string] $deployment_cluster_region = "eu", - [string] $project_name = "unreal_gdk" + [string] $project_name = "unreal_gdk", + [string] $build_home = (Get-Item "$($PSScriptRoot)").parent.parent.FullName, ## The root of the entire build. Should ultimately resolve to "C:\b\\". + [string] $unreal_engine_symlink_dir = "$build_home\UnrealEngine" ) . "$PSScriptRoot\common.ps1" @@ -50,8 +52,7 @@ pushd "$exampleproject_home" # Use the cached engine version or set it up if it has not been cached yet. Start-Event "set-up-engine" "build-unreal-gdk-example-project-:windows:" - $engine_directory = "${exampleproject_home}\UnrealEngine" - &"$($gdk_home)\ci\get-engine.ps1" -unreal_path "$engine_directory" + &"$($gdk_home)\ci\get-engine.ps1" -unreal_path "$unreal_engine_symlink_dir" Finish-Event "set-up-engine" "build-unreal-gdk-example-project-:windows:" From 6bf442030069117e8f7415d813e9f4ca275ee1dc Mon Sep 17 00:00:00 2001 From: Joshua Huburn Date: Wed, 1 Apr 2020 13:12:48 +0100 Subject: [PATCH 2/3] Fix up engine_directory usage --- ci/setup-and-build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/setup-and-build.ps1 b/ci/setup-and-build.ps1 index a39c0006..57511acb 100644 --- a/ci/setup-and-build.ps1 +++ b/ci/setup-and-build.ps1 @@ -57,13 +57,13 @@ pushd "$exampleproject_home" Finish-Event "set-up-engine" "build-unreal-gdk-example-project-:windows:" Start-Event "associate-uproject-with-engine" "build-unreal-gdk-example-project-:windows:" - pushd $engine_directory + pushd $unreal_engine_symlink_dir $unreal_version_selector_path = "Engine\Binaries\Win64\UnrealVersionSelector.exe" $find_engine_process = Start-Process -Wait -PassThru -NoNewWindow -FilePath $unreal_version_selector_path -ArgumentList @(` "-switchversionsilent", ` "${exampleproject_home}\Game\GDKShooter.uproject", ` - "$engine_directory" + "$unreal_engine_symlink_dir" ) if ($find_engine_process.ExitCode -ne 0) { From 837e8b002f383ccbd6218884086ab85381e2f4c9 Mon Sep 17 00:00:00 2001 From: Joshua Huburn Date: Wed, 1 Apr 2020 14:54:44 +0100 Subject: [PATCH 3/3] Update relative paths and incorrect Engine paths --- ci/setup-and-build.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/setup-and-build.ps1 b/ci/setup-and-build.ps1 index 57511acb..1f0741e7 100644 --- a/ci/setup-and-build.ps1 +++ b/ci/setup-and-build.ps1 @@ -98,7 +98,7 @@ pushd "$exampleproject_home" # Invoke the GDK commandlet to generate schema and snapshot. Note: this needs to be run prior to cooking Start-Event "generate-schema" "build-unreal-gdk-example-project-:windows:" - pushd "UnrealEngine/Engine/Binaries/Win64" + pushd "${unreal_engine_symlink_dir}/Engine/Binaries/Win64" Start-Process -Wait -PassThru -NoNewWindow -FilePath ((Convert-Path .) + "\UE4Editor.exe") -ArgumentList @(` "$($exampleproject_home)/Game/GDKShooter.uproject", ` "-run=GenerateSchemaAndSnapshots", ` @@ -139,7 +139,7 @@ pushd "$exampleproject_home" Finish-Event "build-linux-worker" "build-unreal-gdk-example-project-:windows:" Start-Event "build-android-client" "build-unreal-gdk-example-project-:windows:" - $unreal_uat_path = "${exampleproject_home}\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat" + $unreal_uat_path = "${unreal_engine_symlink_dir}\Engine\Build\BatchFiles\RunUAT.bat" $build_server_proc = Start-Process -PassThru -NoNewWindow -FilePath $unreal_uat_path -ArgumentList @(` "-ScriptsForProject=$($exampleproject_home)/Game/GDKShooter.uproject", ` "BuildCookRun", ` @@ -152,7 +152,7 @@ pushd "$exampleproject_home" "-archivedirectory=$($exampleproject_home)/cooked-android", ` "-package", ` "-clientconfig=Development", ` - "-ue4exe=$($exampleproject_home)/UnrealEngine/Engine/Binaries/Win64/UE4Editor-Cmd.exe", ` + "-ue4exe=$($unreal_engine_symlink_dir)/Engine/Binaries/Win64/UE4Editor-Cmd.exe", ` "-pak", ` "-prereqs", ` "-nodebuginfo", `