Files
UnrealEngineUWP/Engine/Build/BatchFiles/Linux/Setup.sh
Dmitry Rekman cae142b414 Added fixes for case sensitivity issues.
(missed in previous commit).

[CL 2360970 by Dmitry Rekman in Main branch]
2014-11-14 18:53:39 -05:00

98 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "$BASH_SOURCE")" ; pwd)
# args: wrong filename, correct filename
# expects to be run in Engine folder
CreateLinkIfNoneExists()
{
WrongName=$1
CorrectName=$2
pushd `dirname $CorrectName` > /dev/null
if [ ! -f `basename $CorrectName` ] && [ -f $WrongName ]; then
echo "$WrongName -> $CorrectName"
ln -sf $WrongName `basename $CorrectName`
fi
popd > /dev/null
}
# main
set -e
TOP_DIR=$(cd $SCRIPT_DIR/../../.. ; pwd)
cd ${TOP_DIR}
IS_GITHUB_BUILD=true
if [ -e Build/PerforceBuild.txt ]; then
IS_GITHUB_BUILD=false
fi
# Ubuntu/Debian/Mint
if [ "$(lsb_release --id)" = "Distributor ID: Ubuntu" -o "$(lsb_release --id)" = "Distributor ID: Debian" -o "$(lsb_release --id)" = "Distributor ID: LinuxMint" ]; then
# Install all necessary dependencies
DEPS="mono-xbuild \
mono-dmcs \
libmono-microsoft-build-tasks-v4.0-4.0-cil \
libmono-system-data-datasetextensions4.0-cil
libmono-system-web-extensions4.0-cil
libmono-system-management4.0-cil
libmono-system-xml-linq4.0-cil
libmono-corlib4.0-cil
libqt4-dev
dos2unix
cmake
"
for DEP in $DEPS; do
if ! dpkg -s $DEP > /dev/null 2>&1; then
echo "Attempting installation of missing package: $DEP"
set -x
sudo apt-get install -y $DEP
set +x
fi
done
fi
echo
if [ "$IS_GITHUB_BUILD" = true ]; then
echo Github build
echo Checking / downloading the latest archives
set +e
mono Binaries/DotNET/GitDependencies.exe --prompt "$@"
set -e
#echo Unpacking and massaging the files
#pushd Build/BatchFiles/Linux > /dev/null
#./UpdateDeps.sh
#popd > /dev/null
else
echo Perforce build
echo Assuming availability of up to date third-party libraries
fi
# Fixes for case sensitive filesystem.
echo Fixing inconsistent case in filenames.
for BASE in Content/Editor/Slate Content/Slate Documentation/Source/Shared/Icons; do
find $BASE -name "*.PNG" | while read PNG_UPPER; do
png_lower="$(echo "$PNG_UPPER" | sed 's/.PNG$/.png/')"
if [ ! -f $png_lower ]; then
PNG_UPPER=$(basename $PNG_UPPER)
echo "$png_lower -> $PNG_UPPER"
# link, and not move, to make it usable with Perforce workspaces
ln -sf `basename "$PNG_UPPER"` "$png_lower"
fi
done
done
CreateLinkIfNoneExists ../../engine/shaders/Fxaa3_11.usf ../Engine/Shaders/Fxaa3_11.usf
CreateLinkIfNoneExists ../../Engine/shaders/Fxaa3_11.usf ../Engine/Shaders/Fxaa3_11.usf
echo
pushd Build/BatchFiles/Linux > /dev/null
./BuildThirdParty.sh
popd > /dev/null
touch Build/OneTimeSetupPerformed