diff --git a/ci/setup-and-build.ps1 b/ci/setup-and-build.ps1 index 721dfda4..0370fc38 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,19 +52,18 @@ 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:" 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) { @@ -97,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" $schema_gen_proc = Start-Process -PassThru -NoNewWindow -FilePath ((Convert-Path .) + "\UE4Editor.exe") -ArgumentList @(` "$($exampleproject_home)/Game/GDKShooter.uproject", ` "-run=GenerateSchemaAndSnapshots", ` @@ -144,7 +145,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", ` @@ -157,7 +158,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", `