aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rwxr-xr-xscripts/ue_build_linux/get_ue_toolchain.sh16
-rwxr-xr-xscripts/ue_build_linux/ue_build.sh20
3 files changed, 23 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 440007516..5df846db8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,6 @@
##
- Improvement: Oidc token executable is now launched hidden when launch from inside zenserver (oplog import/export)
+- Improvement: Helper scripts `get_ue_toolchain.h` and `ue_build.sh` can now be used without passing an argument to them. If you don't specify a toolchain directory then the default of `.tmp-ue-toolchain` is used
## 5.7.5
- Bugfix: Parsing of `zen oplog-import` `--oidctoken-exe-path` option fixed
diff --git a/scripts/ue_build_linux/get_ue_toolchain.sh b/scripts/ue_build_linux/get_ue_toolchain.sh
index dab87cf88..c2538b09a 100755
--- a/scripts/ue_build_linux/get_ue_toolchain.sh
+++ b/scripts/ue_build_linux/get_ue_toolchain.sh
@@ -5,21 +5,23 @@ ZEN_ROOT=$(realpath $SCRIPT_DIR/../..)
die() { echo "ERROR: $1"; exit; }
-if [ -z $1 ]; then
+toolchain_dir="${1:-${ZEN_ROOT}/.tmp-ue-toolchain}"
+
+if [[ $toolchain_dir == "--help" ]]; then
echo "usage: $(basename ${BASH_SOURCE[0]}) <output_dir>"
exit
fi
-if [ -e $1 ]; then
- rmdir $1
+if [ -e $toolchain_dir ]; then
+ rmdir $toolchain_dir
if [ $? -gt 0 ]; then
- die "$1 is not empty"
+ die "$toolchain_dir is not empty"
exit
fi
fi
-mkdir -p $1
-cd $1
+mkdir -p $toolchain_dir
+cd $toolchain_dir
mkdir -p tmp
cd tmp
@@ -27,7 +29,7 @@ cd tmp
CLANG_VERSION=v25_clang-18.1.0-rockylinux8
TOOLCHAIN_PLATFORM=x86_64-unknown-linux-gnu
-echo "Fetching UE toolchain $CLANG_VERSION..."
+echo "Fetching UE toolchain $CLANG_VERSION into '$toolchain_dir'..."
wget -q --show-progress http://cdn.unrealengine.com/Toolchain_Linux/native-linux-$CLANG_VERSION.tar.gz
echo "Extracting toolchain $TOOLCHAIN_PLATFORM..."
diff --git a/scripts/ue_build_linux/ue_build.sh b/scripts/ue_build_linux/ue_build.sh
index 4613dd5ec..690f9f661 100755
--- a/scripts/ue_build_linux/ue_build.sh
+++ b/scripts/ue_build_linux/ue_build.sh
@@ -1,22 +1,28 @@
#!/bin/bash
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+ZEN_ROOT=$(realpath $SCRIPT_DIR/../..)
+
die() { echo ERROR: $1; exit 1; }
-# Validate input
-if [ -z $1 ]; then
- echo "usage: $0 <ue_toolchain_dir>"
- exit 1
+if [[ $1 == "--help" ]]; then
+ echo "usage: $0 <ue_toolchain_dir> (defaults to ${ZEN_ROOT}/.tmp-ue-toolchain)"
+ exit
fi
-if ! [ -d $1 ]; then
+toolchain_dir="${1:-${ZEN_ROOT}/.tmp-ue-toolchain}"
+
+# Validate input
+
+if ! [ -d $toolchain_dir ]; then
die "$1 is not a directory"
fi
-if ! [ -e $1/bin/clang++ ]; then
+if ! [ -e $toolchain_dir/bin/clang++ ]; then
die "$1/bin/clang++ does not exist"
fi
-export UE_TOOLCHAIN_DIR=$(realpath $1)
+export UE_TOOLCHAIN_DIR=$(realpath $toolchain_dir)
export CC="clang"
export CXX="clang++"
export LD="clang++"