223 lines
No EOL
8.9 KiB
Text
223 lines
No EOL
8.9 KiB
Text
--------------------------------------------------
|
|
Compiling UE4.26 for Linux
|
|
--------------------------------------------------
|
|
https://wiki.unrealengine.com/Compiling_For_Linux
|
|
|
|
nano ~/Random/Random/Saved/Config/LinuxServer/Game.ini
|
|
cd ~/Random/Random/Binaries/Linux/
|
|
./RandomServer -log
|
|
/Random/Random/Binaries/Linux
|
|
|
|
cd ~/Random/Random/Binaries/Linux/ && ./RandomServer -log > log 2>&1 &
|
|
|
|
|
|
access via jobs command
|
|
|
|
--------------------------------------------------
|
|
Building and Running Linux Server
|
|
--------------------------------------------------
|
|
Build Project Client Linux to Buid Directory
|
|
Open Cardinal.sln
|
|
Build Development Server - Linux
|
|
|
|
Using the above UBT target, the executable will end up in
|
|
<game>/Binaries/<platform>/<Game>Server.
|
|
Move the executable over to
|
|
<cooked>/<platform>/<game>/binaries/<platform>.
|
|
|
|
Copy <cooked>/<platform> to /CardinalFall so it looks like /CardinalFall/<cooked>/<platform>
|
|
Zip /CardinalFall
|
|
Connect to the server via FTP
|
|
Upload the Zip to /USERNAME
|
|
Connect to the server via SSH
|
|
unzip CardinalFall.zip -d /USERNAME
|
|
|
|
test the server via cd ~/CardinalFall/CardinalFall/Binaries/Linux/ && ./CardinalServer -log > log 2>&1 &
|
|
|
|
crontab to bring server online at reboot
|
|
cd ~/CardinalFall/CardinalFall/Binaries/Linux/ && ./CardinalServer -log > log 2>&1 &
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Possible Errors
|
|
Could not adjust number of file handles, consider changing "nofile" in /etc/security/limits.conf and relogin.
|
|
change limits.conf
|
|
user - nofile 10000
|
|
For Debian and Ubuntu, you also need to edit /etc/pam.d/common-session and add
|
|
sudo nano /etc/pam.d/common-session
|
|
session required pam_limits.so
|
|
|
|
For Assertion Failed on linkloader
|
|
turn on or off Event Driven Loader Enabled
|
|
Victory Plugin - open up the .uplugin file and and Linux to the whitelisted platforms list
|
|
--------------------------------------------------
|
|
Building and Running Windows Server
|
|
--------------------------------------------------
|
|
Build Project Client Windows 64 to Buid Directory
|
|
Open Cardinal.sln
|
|
Build Development Server - Windows 64
|
|
|
|
<game>/Binaries/Cardinal/CardinalServer.exe Move the executable over to <cooked>/<platform>/Cardinal/Cardinal/<platform>.
|
|
|
|
Copy \Random Commit\Binaries\Win64\RandomServer.exe
|
|
to Build Directory Binaries and Target System
|
|
Example
|
|
V:\BuildWin64\WindowsNoEditor\Random\Binaries\Win64
|
|
|
|
|
|
#open cmd
|
|
cd /d I:\Builds\CardinalMenu\Linux\WindowsNoEditor\Cardinal\Binaries\Win64
|
|
CardinalServer.exe /Game/Cardinal/MainMenu/Maps/ExampleMap -server -log -nosteam
|
|
|
|
#open live build
|
|
cd /d I:\Unreal Projects\CardinalFall Dec2016\Binaries\Win64
|
|
CardinalServer.exe /Game/Maps/Example_Map?listen -server -log
|
|
|
|
#linux server settings
|
|
located in \CardinalFall\LinuxNoEditor\Cardinal\Saved\Config\LinuxServer
|
|
\CardinalFall\LinuxNoEditor\Cardinal\Config
|
|
[server_settings]
|
|
server_name=Metahusk Development Lab Testing Grounds
|
|
max_players=32
|
|
game_type=default
|
|
database_user=metahusk_dev
|
|
database_password=hTlkqwbYCnOvoxt2W5UK
|
|
valid_admin_passwords=testpass,testpass1,testpass2
|
|
player_admin_password=testpass
|
|
|
|
#open ubuntu win10 bash
|
|
open cmd and type bash
|
|
cd /mnt/i/Builds/CardinalFall/Linux/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/MainMenu/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-16/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-17/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-18/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-19/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
|
|
|
|
su test
|
|
cd ~/Steam
|
|
./steamcmd.sh
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-21/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-21/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer&& ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log > log.txt 2>&1 &
|
|
|
|
|
|
#ubuntu dedicated server dependencies
|
|
sudo nano /etc/apt/sources.list
|
|
|
|
deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse
|
|
deb http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse
|
|
deb http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse
|
|
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update
|
|
|
|
#optionally add a new user
|
|
sudo useradd -m steam
|
|
cd /home/steam
|
|
|
|
sudo apt-get install steamcmd
|
|
|
|
ln -s /usr/games/steamcmd steamcmd
|
|
|
|
su steam
|
|
cd ~
|
|
steamcmd
|
|
login anonymous
|
|
|
|
sudo apt-get install
|
|
libfontconfig
|
|
libpangocairo-1.0-0
|
|
libnss3
|
|
libgconf-2-4
|
|
libxi6
|
|
libxcursor1
|
|
libxss1
|
|
libxcomposite1
|
|
libasound2
|
|
libxdamage1
|
|
libxtst6
|
|
libatk1.0-0
|
|
libxrandr2
|
|
libstdc++6
|
|
|
|
|
|
|
|
#download package lists
|
|
sudo apt-get update
|
|
|
|
#install dependencies
|
|
sudo apt-get install libfontconfig libpangocairo-1.0-0 libnss3 libgconf-2-4 libxi6 libxcursor1 libxss1 libxcomposite1 libasound2 libxdamage1 libxtst6 libatk1.0-0 libxrandr2 ibstdc++6
|
|
|
|
#move path to game binary
|
|
cd /ProjectDirectory/LinuxNoEditor/Project/Binaries/Linux
|
|
|
|
#allows execution
|
|
chmod +x ServerBinaryName
|
|
|
|
#Writes to log named "log"
|
|
./ServerBinaryName /Game/Project/Path/To/Maps/ExampleMapName -server -log > log 2>&1 &
|
|
|
|
#virtualbox guest additions
|
|
sudo apt-get update
|
|
sudo apt-get install build-essential linux-headers-$(uname -r)
|
|
sudo apt-get install virtualbox-guest-x11
|
|
|
|
#running on steam
|
|
https://answers.unrealengine.com/questions/234050/linux-dedicated-steam-servers.html
|
|
package steamclient.so with the game binary located in the SteamCmd Linux install folder \linux32\steamclient.so
|
|
this file can be found on the server running SteamCmd
|
|
|
|
su steam
|
|
cd ~/Steam
|
|
./steamcmd.sh
|
|
login anonymous
|
|
|
|
mv LinuxNoEditor.tar /home/steam/
|
|
tar -xvf LinuxNoEditor.tar
|
|
|
|
|
|
cd /home/steam/LinuxNoEditor/Cardinal/Binaries/Linux && chmod +x CardinalServer
|
|
su steam
|
|
cd /home/steam/LinuxNoEditor/Cardinal/Binaries/Linux && ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log > log.txt 2>&1 &
|
|
nano /home/steam/LinuxNoEditor/Cardinal/Binaries/Linux/log.txt
|
|
|
|
|
|
cd /media/sf_I/Builds/CardinalFall/Build_UE4-21/LinuxNoEditor/Cardinal/Binaries/Linux && ./CardinalServer /Game/Cardinal/Maps/ExampleMap -server -log > log.txt 2>&1 &
|
|
nano /media/sf_I/Builds/CardinalFall/Build_UE4-21/LinuxNoEditor/Cardinal/Binaries/Linux/log.txt
|
|
|
|
|
|
|
|
######################### Windows Listen Server ######################
|
|
Note: Using -DX12 due to crash on 4.23
|
|
I:\Builds\CardinalFall\Build_UE4-23\TestSpawn\WindowsNoEditor\Cardinal.exe /Game/Cardinal/Maps/ExampleMap?listen -log -DX12
|
|
I:\Builds\CardinalFall\Build_UE4-23\TestSpawn\WindowsNoEditor\Cardinal.exe /Game/Cardinal/Maps/ExampleMap -server -log -DX12
|
|
|
|
|
|
|
|
######################### Linux Dedicated Server UE4.26 ######################
|
|
cd /mnt/i/Builds/CardinalFall/Linux/LinuxServer&& ./CardinalServer.sh /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
cd /mnt/i/Builds/CardinalFall/Linux/LinuxServer&& ./CardinalServer.sh /Game/Cardinal/Maps/ExampleMap -server -log -nosteam > log.txt 2>&1 &
|
|
|
|
######################### Linux Dedicated Server UE4.26 Troubleshoot Weird Bugs ######################
|
|
Delete all temporary files
|
|
In content browser, right click folder and resave all
|
|
In temporary clean new project, try all plugins to discover problem plugin
|
|
Make sure .uplugins have "Linux" under "WhitelistPlatforms"
|
|
If blueprint nodes are broken, try using the pre-built version of the engine to upgrade the project not the source version
|
|
On 4.26, make sure developer settings are added to build.cs
|
|
On project when structs and enum's are broken, open the struct or enum only and click save. Close Project. Re-open project.
|
|
Make sure standard macros like "For Each" are not broken. Missing "Array Element" output pin. Happens on source versions of the engine
|
|
If "ERROR: Could not find definition for module 'Steamworks'" make sure engine has \Engine\Source\ThirdParty\Steamworks, if not copy from 4.25
|
|
|
|
cd /mnt/i/Builds/CardinalFall/Build_UE4-26/LinuxServer
|
|
./CardinalServer.sh /Game/Cardinal/Maps/Nadir -server -log -nosteam
|
|
|
|
######################### Linux Dedicated Server UE5 ######################
|
|
Build Linux Server Using Server Target
|
|
If "Serial size mismatch: Expected read size" Try: Package using server target, not the previous method used in UE4.
|
|
If Map Not Found, Set Server Default Map. Game isn't cooking maps into the pak file.
|
|
cd /mnt/i/Builds/CardinalFall/UE5-1/LinuxServer&& ./CardinalServer.sh /Game/Cardinal/Maps/Nadir -server -log -nosteam > log.txt 2>&1 &
|
|
./CardinalServer.sh /Game/Cardinal/Maps/Nadir -server -log -nosteam |