forked from VarLog/ue4-bash-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.sh
executable file
·39 lines (27 loc) · 886 Bytes
/
server.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
#!/usr/bin/env bash
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
. "$DIR/common/config.source"
cd "$UE4"
CAPITAL=$(capital "$1")
UPROJECT="$CAPITAL.uproject"
echo "Build and cook dedicated server: $PROJECTS/$1/$UPROJECT"
DIST="$PROJECTS/$1/ArchivedBuilds/Server"
mkdir -p $DIST
# MODE=Shipping
MODE=Development
PLATFORM="Mac"
echo MODE: $MODE
echo DIST: $DIST
echo PLATFORM: $PLATFORM
"$UE4/Engine/Build/BatchFiles/RunUAT.sh" BuildCookRun \
-project="$PROJECTS/$1/$UPROJECT" \
-nocompileeditor -nop4 \
-cook -stage -archive -archivedirectory="$DIST" \
-package -server -noclient -serverconfig="$MODE" -ue4exe=UE4Editor \
-compressed -prereqs \
-platform="$PLATFORM" -targetplatform="$PLATFORM" -serverplatform="$PLATFORM" \
-build -utf8output \
-messaging -ForceUnity \
-installed -unversionedcookedcontent \
"${@:2}"