Files
UnrealEngineUWP/Engine/Build/BatchFiles/Linux/SetupDotnet.sh
brandon schaefer 4c4f3df620 Update libssl/libcrypto to actually work with dotnet.
Previous lib was broken

#jira UE-148107
#rb Ryan.Hummer
#preflight 6266f0c85e0d3c60d8d81e8e

#ROBOMERGE-OWNER: brandon.schaefer
#ROBOMERGE-AUTHOR: brandon.schaefer
#ROBOMERGE-SOURCE: CL 19908317 in //UE5/Release-5.0/... via CL 19910321
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19911580 by brandon schaefer in ue5-main branch]
2022-04-25 19:17:41 -04:00

52 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
# Copyright Epic Games, Inc. All Rights Reserved.
START_DIR=`pwd`
cd "$1"
IS_DOTNET_INSTALLED=0
DOTNET_VERSION_PATH=$(command -v dotnet) || true
if [ "$UE_USE_SYSTEM_DOTNET" == "1" ] && [ ! $DOTNET_VERSION_PATH == "" ] && [ -f $DOTNET_VERSION_PATH ]; then
# If dotnet is installed, check that it has a new enough version of the SDK
DOTNET_SDKS=(`dotnet --list-sdks | grep -P "(\d*)\.(\d*)\..* \[(.*)\]"`)
for DOTNET_SDK in $DOTNET_SDKS
do
if [ ${DOTNET_SDK[0]} -gt 3 ]; then
IS_DOTNET_INSTALLED=1
fi
if [ ${DOTNET_SDK[0]} -eq 3 ]; then
if [ ${DOTNET_SDK[1]} -ge 1 ]; then
IS_DOTNET_INSTALLED=1
fi
fi
done
if [ $IS_DOTNET_INSTALLED -eq 0 ]; then
echo Unable to find installed dotnet sdk of version 3.1 or newer
fi
fi
# Setup bundled Dotnet if cannot use installed one
if [ $IS_DOTNET_INSTALLED -eq 0 ]; then
echo Setting up bundled DotNet SDK
CUR_DIR=`pwd`
export UE_DOTNET_DIR="$CUR_DIR/../../../Binaries/ThirdParty/DotNet/6.0.200/linux"
export PATH="$UE_DOTNET_DIR:$PATH"
export DOTNET_ROOT="$UE_DOTNET_DIR"
# We need to make sure point to our bundled libssl1, as ubuntu 22.04 is dropping libssl1 from the universe
# as well as force override for DotNet 6 to use 1.1 over 3 as we dont have that bundled atm
# Currently broken, need to fix!
export CLR_OPENSSL_VERSION_OVERRIDE=1.1
export LD_LIBRARY_PATH="$CUR_DIR/../../../Binaries/ThirdParty/OpenSSL/Unix/lib/x86_64-unknown-linux-gnu:$LD_LIBRARY_PATH"
# Depend on our bundled ICU vs the system. This causes issues on system that dont have the few hard coded ICU versions dotnet looks for
export DOTNET_SYSTEM_GLOBALIZATION_APPLOCALICU=":64.1"
export LD_LIBRARY_PATH="$CUR_DIR/../../../Binaries/ThirdParty/ICU/icu4c-64_1/lib/Unix/x86_64-unknown-linux-gnu:$LD_LIBRARY_PATH"
else
export IS_DOTNET_INSTALLED=$IS_DOTNET_INSTALLED
fi
cd "$START_DIR"