Skip to content

Commit

Permalink
Better Linux upgrade steps
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Apr 28, 2018
1 parent 58a20b0 commit 4ede21d
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.sh
Expand Up @@ -15,7 +15,7 @@ if [[ ! -d "llvm-source-50" ]]; then
echo "https://github.com/Microsoft/AirSim/blob/master/docs/unreal_upgrade.md"
exit 1
else
echo "The llvm-souce-50 folder was not found! Mystery indeed.""
echo "The llvm-souce-50 folder was not found! Mystery indeed."
fi
fi

Expand Down
15 changes: 15 additions & 0 deletions clean_rebuild.sh
@@ -0,0 +1,15 @@
#! /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 -x

git clean -ffdx
git pull

set -e

./setup.sh
./build.sh
9 changes: 4 additions & 5 deletions docs/unreal_upgrade.md
@@ -1,5 +1,4 @@

# Upgrading to UE 4.18 and Visual Studio 2017
# Upgrading to Unreal Engine 4.18

These instructions applies if you are already using AirSim on Unreal Engine 4.16. If you never installed AirSim, please see [How to get it](https://github.com/microsoft/airsim#how-to-get-it).

Expand All @@ -14,9 +13,9 @@ These instructions applies if you are already using AirSim on Unreal Engine 4.16
6. Run `build.cmd` to build everything.

### For Linux Users
1. Rename or delete your exiting folder for Unreal 4.17.
2. Rename or delete your existing folder for AirSim repo.
2. Follow [Install steps for Linux](https://github.com/Microsoft/AirSim/blob/master/docs/build_linux.md#install-and-build).
1. From your AirSim repo folder, run 'clean_rebuild.sh`.
2. Rename or delete your exiting folder for Unreal Engine.
3. Follow step 1 and 2 to [install Unreal Engine 4.18](https://github.com/Microsoft/AirSim/blob/master/docs/build_linux.md#install-and-build).

## Upgrading Your Custom Unreal Project
If you have your own Unreal project created in older version of Unreal Engine then you need to upgrade your project to Unreal 4.18. To do this,
Expand Down
2 changes: 1 addition & 1 deletion install_run_all.sh
Expand Up @@ -23,7 +23,7 @@ fi

#install unreal
if [[ !(-d "$UnrealDir") ]]; then
git clone -b 4.17 https://github.com/EpicGames/UnrealEngine.git "$UnrealDir"
git clone -b 4.18 https://github.com/EpicGames/UnrealEngine.git "$UnrealDir"
pushd "$UnrealDir" >/dev/null

./Setup.sh
Expand Down
34 changes: 34 additions & 0 deletions install_unreal.sh
@@ -0,0 +1,34 @@
#! /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
6 changes: 3 additions & 3 deletions setup.sh
@@ -1,15 +1,15 @@
#! /bin/bash

set -x
set -e

if [[ -d "llvm-source-39" ]]; then
echo "Hello there! We just upgraded AirSim to Unreal Engine 4.18."
echo "Here are few easy steps for upgrade so everything is new and shiny :)"
echo "https://github.com/Microsoft/AirSim/blob/master/docs/unreal_upgrade.md"
exit 1
fi

set -x
set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR" >/dev/null

Expand Down

0 comments on commit 4ede21d

Please sign in to comment.