Difference between revisions of "Software/ThirdParty/Guides/Epic/UnrealEngine"

From RCS Wiki
Jump to navigation Jump to search
Line 243: Line 243:
 
mv libSimulationControllerPROFILE_x64.a libSimulationControllerPROFILE.a
 
mv libSimulationControllerPROFILE_x64.a libSimulationControllerPROFILE.a
 
mv libSimulationController_x64.a libSimulationController.a
 
mv libSimulationController_x64.a libSimulationController.a
 +
mv libPsFastXmlCHECKED_x64.a libPsFastXmlCHECKED
 +
mv libPsFastXmlDEBUG_x64.a libPsFastXmlDEBUG
 +
mv libPsFastXmlPROFILE_x64.a libPsFastXmlPROFILE
 +
mv libPsFastXml_x64.a libPsFastXml
 +
mv libPxTaskCHECKED_x64.a libPxTaskCHECKED
 +
mv libPxTaskDEBUG_x64.a libPxTaskDEBUG
 +
mv libPxTaskPROFILE_x64.a libPxTaskPROFILE
 +
mv libPxTask_x64.a libPxTask
 
cd $UE4_ROOT_DIR
 
cd $UE4_ROOT_DIR
  

Revision as of 02:52, 18 August 2018

Unreal Engine 4 on Debian Buster, OpenPOWER Edition

Required OS dependencies

clang-4.0 dos2unix autotools-dev automake cmake libtool libc++-dev libc++abi-dev libx11-dev libxext-dev libegl1-mesa-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev libxinerama-dev libxkbcommon-dev libxrandr-dev libxrender-dev libvulkan-dev libxcursor-dev libxt-dev libxi-dev libxv-dev libwebsockets-dev freeglut3-dev wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto-scrnsaver-dev x11proto-xinerama-dev

Required OS setup

update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-4.0 100
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-4.0 100

Build Instructions

=================================================================================
UE4
https://www.unrealengine.com/en-US/ue4-on-github

Use POWER version from:
https://github.com/kb9vqf/UnrealEngine
=================================================================================

Build process:

# Environment
export TARGET_ARCH=powerpc64le-unknown-linux-gnu
export UE4_ROOT_DIR=$PWD

# Low level shared libraries and applications
cd Engine/Source/ThirdParty/elftoolchain/build/Linux/libelf
./build_native
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/elftoolchain/build/Linux/libdwarf
./build_native
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/Breakpad/build/Linux
./BuildBreakpad.sh
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/zlib
../libcurl/BUILD.EPIC.sh
cd OpenSSL/OpenSSL_1_0_2h
./config
TARGET_ARCH= make depend
TARGET_ARCH= make
mkdir ../../../OpenSSL/1_0_2h/lib/Linux/${TARGET_ARCH}
cp -Rp libcrypto.a ../../../OpenSSL/1_0_2h/lib/Linux/${TARGET_ARCH}/
cp -Rp libssl.a ../../../OpenSSL/1_0_2h/lib/Linux/${TARGET_ARCH}/
cd ../..
cd zlib/v1.2.8/build
TARGET_ARCH= ./Build.sh
mkdir ../lib/Linux/${TARGET_ARCH}
cp -Rp libz.a ../lib/Linux/${TARGET_ARCH}/
cp -Rp libz_fPIC.a ../lib/Linux/${TARGET_ARCH}/
cd ../..
cd libcurl/curl-7_48_0
./buildconf
LDFLAGS=-L${PWD}/../../OpenSSL/OpenSSL_1_0_2h LD_LIBRARY_PATH=${PWD}/../../OpenSSL/OpenSSL_1_0_2h ./configure --with-zlib=${PWD}/../../zlib/v1.2.8 --with-ssl=${PWD}/../../OpenSSL/OpenSSL_1_0_2h --prefix=$PWD --enable-static --enable-shared --enable-threaded-resolver --enable-hidden-symbols --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --disable-telnet --disable-tftp --disable-dict --disable-pop3 --disable-imap --disable-smtp --disable-gopher --disable-manual --disable-idn
LDFLAGS=-L${PWD}/../../OpenSSL/OpenSSL_1_0_2h LD_LIBRARY_PATH=${PWD}/../../OpenSSL/OpenSSL_1_0_2h make
mkdir ../../../libcurl/7_48_0/lib/Linux/${TARGET_ARCH}
cp -Rp lib/.libs/libcurl.a ../../../libcurl/7_48_0/lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/FreeType2/FreeType2-2.6
cmake .
make
mkdir Lib/Linux/${TARGET_ARCH}
cp -Rp libfreetype.a Lib/Linux/${TARGET_ARCH}/
cp -Rp libfreetype_fPIC.a Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libPNG/libPNG-1.5.2
cmake -DPNG_STATIC=ON .
make
mkdir lib/Linux/${TARGET_ARCH}
cp -Rp libpng15.a lib/Linux/${TARGET_ARCH}/libpng.a
cd $UE4_ROOT_DIR
cd Engine/Source/Programs/BreakpadSymbolEncoder
./BuildBreakpadSymbolEncoderLinux.sh
cp -Rp BreakpadSymbolEncoder ../../../Binaries/Linux/BreakpadSymbolEncoder
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/glslang/Build/Linux
./build.sh
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/MikkTSpace
cmake .
make
mkdir lib/Linux/${TARGET_ARCH}
cp -Rp libMikkTSpace.a lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/CEF3/cef_binary_3.2623.1395.g3034273_linux64
cp -Rp ../cef_source/cef_paths2.gypi .
cd ../Build/Linux/
./build.sh
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/VHACD/build/Linux
mkdir ../../Lib/Linux/${TARGET_ARCH}/
make
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libWebSockets/libwebsockets_src
cmake .
make
mkdir -p ../libwebsockets/lib/Linux/${TARGET_ARCH}/Release/
cp -Rp lib/libwebsockets.a ../libwebsockets/lib/Linux/${TARGET_ARCH}/Release/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/ForsythTriOO
cmake -DCMAKE_BUILD_TYPE=Release .
make
mkdir Lib/Linux/${TARGET_ARCH}/
cp -Rp libForsythTriOptimizer.a Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/Kiss_FFT/kiss_fft129
mkdir -p Lib/Linux/Release/${TARGET_ARCH}/
cmake .
make clean
make
cp -Rp ../Lib/Linux/Release/${TARGET_ARCH}/*.a Lib/Linux/Release/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/SpeedTree/SpeedTreeSDK-v7.0/Source/Core/Linux
mkdir -p ../../../Lib/Linux/${TARGET_ARCH}/Release
cp -Rp ../../../../Lib/Linux/${TARGET_ARCH}/Release/*.a ../../../Lib/Linux/${TARGET_ARCH}/Release/
cmake .
make clean
make
cd $UE4_ROOT_DIR

# Header fixup
cd Engine/Source/ThirdParty/zlib/v1.2.8/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/OpenSSL/1_0_2h/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libcurl/7_48_0/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/libWebSockets/libwebsockets/include/Linux/
cp -Rp x86_64-unknown-linux-gnu powerpc64le-unknown-linux-gnu
cd $UE4_ROOT_DIR

# Mid level shared libraries and general setup
./Setup.sh
./GenerateProjectFiles.sh

# ICU fixup
cd Engine/Source/ThirdParty/ICU/icu4c-53_1/Linux/powerpc64le-unknown-linux-gnu
mkdir lib
mv *.a lib
cd $UE4_ROOT_DIR

# Opus fixup
cd Engine/Source/ThirdParty/libOpus/opus-1.1
mkdir Linux/${TARGET_ARCH}
cp -Rp .libs/libopus.a Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR

# NVIDIA PhysX build
mkdir -p Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cd Engine/Source/ThirdParty/PhysX3/PhysX_3.4/Source/compiler/cmake/linux
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_BUILD_TYPE=Debug .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_BUILD_TYPE=Checked .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_BUILD_TYPE=Profile .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_BUILD_TYPE=Release .
make
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp pxshared_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR
cd Engine/Source/ThirdParty/PhysX3/APEX_1.4/compiler/cmake/linux
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DCMAKE_BUILD_TYPE=Debug .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DCMAKE_BUILD_TYPE=Checked .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DCMAKE_BUILD_TYPE=Profile .
make
GW_DEPS_ROOT="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3" cmake -DCMAKE_MODULE_PATH="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Externals/CMakeModules" -DPHYSX_ROOT_DIR="$UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/PhysX_3.4" -DCMAKE_BUILD_TYPE=Release .
make
cp -Rp *.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cp -Rp physx_bin/*.a $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
cd $UE4_ROOT_DIR

# Fixup NVIDIA PhysX
cd $UE4_ROOT_DIR/Engine/Source/ThirdParty/PhysX3/Lib/Linux/${TARGET_ARCH}/
mv libPhysX3CharacterKinematicCHECKED_x64.a libPhysX3CharacterKinematicCHECKED.a
mv libPhysX3CharacterKinematicDEBUG_x64.a libPhysX3CharacterKinematicDEBUG.a
mv libPhysX3CharacterKinematicPROFILE_x64.a libPhysX3CharacterKinematicPROFILE.a
mv libPhysX3CharacterKinematic_x64.a libPhysX3CharacterKinematic.a
mv libPhysX3CHECKED_x64.a libPhysX3CHECKED.a
mv libPhysX3CommonCHECKED_x64.a libPhysX3CommonCHECKED.a
mv libPhysX3CommonDEBUG_x64.a libPhysX3CommonDEBUG.a
mv libPhysX3CommonPROFILE_x64.a libPhysX3CommonPROFILE.a
mv libPhysX3Common_x64.a libPhysX3Common.a
mv libPhysX3CookingCHECKED_x64.a libPhysX3CookingCHECKED.a
mv libPhysX3CookingDEBUG_x64.a libPhysX3CookingDEBUG.a
mv libPhysX3CookingPROFILE_x64.a libPhysX3CookingPROFILE.a
mv libPhysX3Cooking_x64.a libPhysX3Cooking.a
mv libPhysX3DEBUG_x64.a libPhysX3DEBUG.a
mv libPhysX3GpuCHECKED_x64.a libPhysX3GpuCHECKED.a
mv libPhysX3GpuDEBUG_x64.a libPhysX3GpuDEBUG.a
mv libPhysX3GpuPROFILE_x64.a libPhysX3GpuPROFILE.a
mv libPhysX3Gpu_x64.a libPhysX3Gpu.a
mv libPhysX3PROFILE_x64.a libPhysX3PROFILE.a
mv libPhysX3_x64.a libPhysX3.a
mv libPxFoundationCHECKED_x64.a libPxFoundationCHECKED.a
mv libPxFoundationDEBUG_x64.a libPxFoundationDEBUG.a
mv libPxFoundationPROFILE_x64.a libPxFoundationPROFILE.a
mv libPxFoundation_x64.a libPxFoundation.a
mv libPxPvdSDKCHECKED_x64.a libPxPvdSDKCHECKED.a
mv libPxPvdSDKDEBUG_x64.a libPxPvdSDKDEBUG.a
mv libPxPvdSDKPROFILE_x64.a libPxPvdSDKPROFILE.a
mv libPxPvdSDK_x64.a libPxPvdSDK.a
mv libLowLevelAABBCHECKED_x64.a libLowLevelAABBCHECKED.a
mv libLowLevelAABBDEBUG_x64.a libLowLevelAABBDEBUG.a
mv libLowLevelAABBPROFILE_x64.a libLowLevelAABBPROFILE.a
mv libLowLevelAABB_x64.a libLowLevelAABB.a
mv libLowLevelCHECKED_x64.a libLowLevelCHECKED.a
mv libLowLevelClothCHECKED_x64.a libLowLevelClothCHECKED.a
mv libLowLevelClothDEBUG_x64.a libLowLevelClothDEBUG.a
mv libLowLevelClothPROFILE_x64.a libLowLevelClothPROFILE.a
mv libLowLevelCloth_x64.a libLowLevelCloth.a
mv libLowLevelDEBUG_x64.a libLowLevelDEBUG.a
mv libLowLevelDynamicsCHECKED_x64.a libLowLevelDynamicsCHECKED.a
mv libLowLevelDynamicsDEBUG_x64.a libLowLevelDynamicsDEBUG.a
mv libLowLevelDynamicsPROFILE_x64.a libLowLevelDynamicsPROFILE.a
mv libLowLevelDynamics_x64.a libLowLevelDynamics.a
mv libLowLevelParticlesCHECKED_x64.a libLowLevelParticlesCHECKED.a
mv libLowLevelParticlesDEBUG_x64.a libLowLevelParticlesDEBUG.a
mv libLowLevelParticlesPROFILE_x64.a libLowLevelParticlesPROFILE.a
mv libLowLevelParticles_x64.a libLowLevelParticles.a
mv libLowLevelPROFILE_x64.a libLowLevelPROFILE.a
mv libLowLevel_x64.a libLowLevel.a
mv libPhysX3ExtensionsCHECKED_x64.a libPhysX3ExtensionsCHECKED.a
mv libPhysX3ExtensionsDEBUG_x64.a libPhysX3ExtensionsDEBUG.a
mv libPhysX3ExtensionsPROFILE_x64.a libPhysX3ExtensionsPROFILE.a
mv libPhysX3Extensions_x64.a libPhysX3Extensions.a
mv libPhysX3VehicleCHECKED_x64.a libPhysX3VehicleCHECKED.a
mv libPhysX3VehicleDEBUG_x64.a libPhysX3VehicleDEBUG.a
mv libPhysX3VehiclePROFILE_x64.a libPhysX3VehiclePROFILE.a
mv libPhysX3Vehicle_x64.a libPhysX3Vehicle.a
mv libSceneQueryCHECKED_x64.a libSceneQueryCHECKED.a
mv libSceneQueryDEBUG_x64.a libSceneQueryDEBUG.a
mv libSceneQueryPROFILE_x64.a libSceneQueryPROFILE.a
mv libSceneQuery_x64.a libSceneQuery.a
mv libSimulationControllerCHECKED_x64.a libSimulationControllerCHECKED.a
mv libSimulationControllerDEBUG_x64.a libSimulationControllerDEBUG.a
mv libSimulationControllerPROFILE_x64.a libSimulationControllerPROFILE.a
mv libSimulationController_x64.a libSimulationController.a
mv libPsFastXmlCHECKED_x64.a libPsFastXmlCHECKED
mv libPsFastXmlDEBUG_x64.a libPsFastXmlDEBUG
mv libPsFastXmlPROFILE_x64.a libPsFastXmlPROFILE
mv libPsFastXml_x64.a libPsFastXml
mv libPxTaskCHECKED_x64.a libPxTaskCHECKED
mv libPxTaskDEBUG_x64.a libPxTaskDEBUG
mv libPxTaskPROFILE_x64.a libPxTaskPROFILE
mv libPxTask_x64.a libPxTask
cd $UE4_ROOT_DIR

# Build engine
make

# Build engine
make