forked from microsoft/AirSim
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_run_all.sh
45 lines (35 loc) · 983 Bytes
/
install_run_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/bash
# get path of current script: https://stackoverflow.com/a/39340259/207661
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null
set -e
set -x
#confirm unreal install directory
UnrealDir=$1
if [[ !(-z "UnrealDir") ]]; then
UnrealDir="$SCRIPT_DIR/UnrealEngine"
fi
read -p "Unreal will be installed in $UnrealDir. To change it invoke script with path argument. Continue? " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
popd >/dev/null
exit 0
fi
#install unreal
if [[ !(-d "$UnrealDir") ]]; then
git clone -b 4.17 https://github.com/EpicGames/UnrealEngine.git "$UnrealDir"
pushd "$UnrealDir" >/dev/null
./Setup.sh
./GenerateProjectFiles.sh
make
popd >/dev/null
fi
#install airsim
./setup.sh
./build.sh
#start Unreal editor with Blocks project
pushd "$UnrealDir" >/dev/null
Engine/Binaries/Linux/UE4Editor "$SCRIPT_DIR/AirSim/Unreal/Environments/Blocks/Blocks.uproject" -game -log
popd >/dev/null
popd >/dev/null