forked from microsoft/AirSim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_run_all.sh
executable file
·49 lines (39 loc) · 1.13 KB
/
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
46
47
48
49
#! /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.18 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
if [ "$(uname)" == "Darwin" ]; then
Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor "$SCRIPT_DIR/Unreal/Environments/Blocks/Blocks.uproject" -game -log
else
Engine/Binaries/Linux/UE4Editor "$SCRIPT_DIR/Unreal/Environments/Blocks/Blocks.uproject" -game -log
fi
popd >/dev/null
popd >/dev/null