You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Add universal_mac target - Remove dead core2 architecture flag #rb laura.hermanns #jira UE-145025 #rnx #preflight n/a [CL 19785353 by will damon in ue5-main branch]
62 lines
1.8 KiB
Bash
Executable File
62 lines
1.8 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
PATH="/Applications/CMake.app/Contents/bin":"$PATH"
|
|
|
|
CUR_DIR=`pwd`
|
|
|
|
cd $CUR_DIR
|
|
|
|
if [ ! -d ninja ]; then
|
|
git clone https://github.com/ninja-build/ninja.git && cd ninja
|
|
git checkout release
|
|
|
|
./configure.py --bootstrap
|
|
|
|
cd ..
|
|
fi
|
|
|
|
PATH="$CUR_DIR/ninja":"$PATH"
|
|
export PATH
|
|
export MACOSX_DEPLOYMENT_TARGET=10.14
|
|
|
|
cd ShaderConductor
|
|
|
|
# p4 edit $THIRD_PARTY_CHANGELIST lib/Mac/...
|
|
|
|
# Compile for Mac
|
|
SRC_DIR="Build"
|
|
DST_DIR="../../../../Binaries/ThirdParty/ShaderConductor/Mac"
|
|
|
|
if [ "$#" -eq 1 ] && [ "$1" == "-debug" ]; then
|
|
# Debug
|
|
if [ "$BUILD_UNIVERSAL" = true ] ; then
|
|
python3 BuildAll.py ninja clang mac_universal Debug
|
|
SRC_DIR="$SRC_DIR/ninja-osx-clang-mac_universal-Debug"
|
|
else
|
|
python3 BuildAll.py ninja clang x64 Debug
|
|
SRC_DIR="$SRC_DIR/ninja-osx-clang-x64-Debug"
|
|
fi
|
|
else
|
|
# Release
|
|
if [ "$BUILD_UNIVERSAL" = true ] ; then
|
|
python3 BuildAll.py ninja clang mac_universal RelWithDebInfo
|
|
SRC_DIR="$SRC_DIR/ninja-osx-clang-mac_universal-RelWithDebInfo"
|
|
else
|
|
python3 BuildAll.py ninja clang x64 RelWithDebInfo
|
|
SRC_DIR="$SRC_DIR/ninja-osx-clang-x64-RelWithDebInfo"
|
|
fi
|
|
fi
|
|
|
|
# Copy binary files from source to destination
|
|
cp -f "$SRC_DIR/Lib/libdxcompiler.dylib" "$DST_DIR/libdxcompiler.dylib"
|
|
cp -f "$SRC_DIR/Lib/libShaderConductor.dylib" "$DST_DIR/libShaderConductor.dylib"
|
|
cp -f "$SRC_DIR/Bin/ShaderConductorCmd" "$DST_DIR/ShaderConductorCmd"
|
|
|
|
# Replace dummy RPATH value, so ShaderConductor can manually load libdxcompiler.dylib via the 'dlopen' API
|
|
install_name_tool -rpath RPATH_DUMMY ../ThirdParty/ShaderConductor/Mac "$DST_DIR/libShaderConductor.dylib"
|
|
install_name_tool -rpath RPATH_DUMMY ../ThirdParty/ShaderConductor/Mac "$DST_DIR/libdxcompiler.dylib"
|
|
|
|
# Link DWARF debug symbols
|
|
dsymutil "$DST_DIR/libdxcompiler.dylib"
|
|
dsymutil "$DST_DIR/libShaderConductor.dylib"
|