Files
UnrealEngineUWP/Engine/Extras/Containers/Examples/PixelStreaming/run.sh
aurel cordonnier 50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00

41 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Determine which release of the Unreal Engine we will be running container images for
UNREAL_ENGINE_RELEASE="4.27"
if [[ ! -z "$1" ]]; then
UNREAL_ENGINE_RELEASE="$1"
fi
# Determine whether we are instructing Docker Compose to rebuild the project container image even if it already exists
COMPOSE_FLAGS=""
if [[ "$*" == *"--rebuild"* ]]; then
COMPOSE_FLAGS="--build"
fi
# Determine whether we are forcing the use of TURN relaying (useful for testing purposes)
EXTRA_PEERCONNECTION_OPTIONS=""
if [[ "$*" == *"--force-turn"* ]]; then
EXTRA_PEERCONNECTION_OPTIONS=', "iceTransportPolicy": "relay"'
fi
# Verify that either curl or wget is available
if which curl 1>/dev/null; then
HTTPS_COMMAND="curl -s"
elif which wget 1>/dev/null; then
HTTPS_COMMAND="wget -O - -q"
else
echo "Please install curl or wget"
exit 1
fi
# Retrieve the public IP address of the host system
PUBLIC_IP=$($HTTPS_COMMAND 'https://api.ipify.org')
# Run the Pixel Streaming example
export UNREAL_ENGINE_RELEASE
export EXTRA_PEERCONNECTION_OPTIONS
export PUBLIC_IP
export PWD=$(pwd)
docker-compose up $COMPOSE_FLAGS