-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-unreal.sh
61 lines (52 loc) · 2.33 KB
/
update-unreal.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
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# udpate-unreal.sh [ -check | -clean | -clean-quick]
# Downloads and compiles Unreal Engine from Epic's github account.
# - Use argument "-check" to check for an update.
# - Use argument "-clean" to do a full build.
# - Use argument "-clean-quick" to do a quick clean (eg. when updating pre-compiled headers)
#
# based on https://wiki.unrealengine.com/Building_On_Linux
# (see also https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Build/BatchFiles/Linux)
#
#
# Revision History:
# 2022-Apr-17 [email protected] - update to unreal 5 ( UE4Editor -> UnrealEditor )
# 2020-May-27 [email protected] - updated git to use github ssh.
# 2020-Jan-07 [email protected] - updated as per latest wiki instructions.
# 2017-Sep-25 [email protected] - added --force to git pull.
# 2017-Sep-14 [email protected] - changed "-clean-precompiled" argument to "-clean-quick".
if [[ $(id -u) -eq 0 ]] ;then echo "Error: Please don't run as root" >&2 ;exit 1 ;fi
UNREAL_DIR="/opt/UnrealEngine" # must be owned by you (don't use sudo)
set -e
cd "$UNREAL_DIR"
if [ "$1" == "-check" ] ;then
git remote update
git status
exit
else
git pull --force "[email protected]:EpicGames/UnrealEngine.git" release # must have linked your github account to your epic account and set up github ssh key.
fi
./Setup.sh
./GenerateProjectFiles.sh
if [ "$1" == "-clean" ] ;then
make CrashReportClient \
CrashReportClientEditor \
ShaderCompileWorker \
UnrealLightmass \
UnrealFrontend \
UnrealEditor \
UnrealInsights \
UnrealPak \
ARGS=-clean
elif [ "$1" == "-clean-quick" ] ;then # not updated since 4.0x
find Engine/Intermediate/Build/Linux/ -name PCH.Core.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name PCH.CoreUObject.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name PCH.Engine.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name PCH.UnrealEd.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name SharedPCH.Core.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name SharedPCH.CoreUObject.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name SharedPCH.Engine.h.gch -exec rm -v '{}' \;
find Engine/Intermediate/Build/Linux/ -name SharedPCH.UnrealEd.h.gch -exec rm -v '{}' \;
fi
make
make UnrealPak