-
Notifications
You must be signed in to change notification settings - Fork 890
Quick Start Guide
Windows 10
- Install Git for Windows.
- The latest version is fine, accept defaults, change default text editor if desired.
- Install Visual Studio.
-
2019or2022are fine, checkDesktop development with C++workload (under Desktop & Mobile).
-
- Install MariaDB Server.
- Use the latest in the
10.6.xfamily of releases, use default settings, set a root password.
- Use the latest in the
- Install Python 3.
- The latest version is fine, during installation check the
add python.exe to PATHcheckbox.
- The latest version is fine, during installation check the
- Open a PowerShell window and navigate to your chosen install directory.
- To download the latest code, install Python requirements, and copy the configuration files:
git clone --recursive https://github.com/LandSandBoat/server.git py -3 -m pip install -r server/tools/requirements.txt cp server/settings/default/* server/settings - Edit the file
network.luainsideserver\settings\and change "root" to the password set during MariaDB setup- Make sure to leave the quotation marks surrounding the password!
- Edit the file
main.luainsideserver\settings\with your desired settings for your server.- Make sure to leave the quotation marks surrounding that has them around it!
- Back in your PowerShell window, navigate to
server\tools\and build the database:py -3 dbtool.py - Follow the on-screen instructions.
- Open the
serverroot folder in Visual Studio 2019/2022.- "Open a local folder" on the splash screen.
- The build will start configuring itself for your system.
- This stage is done when the
CMakewindow at the bottom of the window says1> CMake generation finished..
- This stage is done when the
- Ensure the dropdown near the top of the window says
x64-Debug. - In the top toolbar, select
Build > Build All.- This may take a little while if you have a weaker machine.
- You should eventually see
Build All succeeded..- Congratulations, you've built the server!
-
Open a PowerShell window and navigate to your
serverdirectory. -
Stash any changes you've made and pull the latest code from upstream:
git stash git pull git submodule update --init --recursive --progress git stash pop⚠️ Pay attention! If you stashed any changes, there is a chance you will see the following:CONFLICT (content): Merge conflict in some file
⚠️ If this happens, you need to manually edit the conflicting files before continuing. -
Navigate to
server\tools\and update the database:py -3 dbtool.py update -
Open the
serverroot folder in VS2019/2022.- CMake may reconfigure, wait for it to complete like before.
-
In the top toolbar, select
Build > Build All.- This may take a little while if you have a weaker machine.
-
You should eventually see
Build All succeeded..
Linux (Debian/Ubuntu)
-
Use your package manager to install the following packages or their equivalent:
Debian/Ubuntu
Run these steps to use Mariadb's community provided .deb packages through apt:
sudo apt update sudo apt install git python3 python3-pip g++-10 cmake make libluajit-5.1-dev libzmq3-dev libssl-dev zlib1g-dev mariadb-server libmariadb-dev binutils-dev- Debian 10/Ubuntu 18.04: See the Linux Setup Guide for information about upgrading to and building with g++-10.
Arch
sudo pacman -S git python3 python-pip gcc cmake make luajit zeromq openssl zlib mariadb binutils- Arch users will need to initialize and start the database software if not done already:
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql sudo systemctl enable mariadb sudo systemctl start mariadb
-
Download the latest code, install Python requirements, and copy the configuration files:
git clone --recursive https://github.com/LandSandBoat/server.git pip3 install -r server/tools/requirements.txt cp server/settings/default/* server/settings -
Run the following script to improve database security:
sudo mysql_secure_installation -
Type the following to create a database user with the login xi and password password, and an empty database called xidb. NOTE: You SHOULD change ALL THREE OF THESE to improve security:
sudo mysql -u root -p -e "CREATE USER 'xi'@'localhost' IDENTIFIED BY 'password';CREATE DATABASE xidb;USE xidb;GRANT ALL PRIVILEGES ON xidb.* TO 'xi'@'localhost';" -
Edit the file
network.luainsideserver/settings/and change "root" to the password set during MariaDB setup- Make sure to leave the quotation marks surrounding the password!
-
Edit the file
main.luainsideserver/settingswith your desired settings for your server.- Make sure to leave the quotation marks surrounding that has them around it!
-
In the
serverdirectory, prepare and build the executables:mkdir build cd build cmake .. make -j $(nproc) -
Wait for the build to complete, then move to
server/tools/and build the database:cd ../tools python3 dbtool.py -
Select 'Reset DB' and follow the instructions to "reset" the database.
-
Open the
serverdirectory in a terminal. -
Stash any changes you've made and pull the latest code from upstream:
git stash git pull git submodule update --init --recursive --progress git stash pop⚠️ Pay attention! If you stashed any changes, there is a chance you will see the following:CONFLICT (content): Merge conflict in some file
⚠️ If this happens, you need to manually edit the conflicting files before continuing. -
Prepare and build the executables:
cd build cmake .. make -j $(nproc) -
Wait for the build to complete, then move to
server/tools/and update the database:cd ../tools python3 dbtool.py update
These platforms should work but are not actively maintained or used by the development team. The development team (especially in the case of OSX) might not have the hardware or expertise to be able to help you debug problems on these platforms. Use at your own risk. Good luck!
OSX
- Get dependencies from brew:
brew install git pkg-config autoconf make cmake gcc openssl mariadb zeromq zmqpp
- The version of LuaJIT that you can get through brew is old. You can build and install LuaJIT for your system with:
git clone https://github.com/LuaJIT/LuaJIT.git
cd LuaJIT
sudo make install MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) -j $(sysctl -n hw.physicalcpu)
sudo ln -sf luajit-2.1.0-beta3 /usr/local/bin/luajit
- Download and build the server binaries:
git clone --recursive https://github.com/LandSandBoat/server.git
mkdir build
cd build
cmake ..
make -j $(sysctl -n hw.physicalcpu)
From here, the instructions are the same as the Linux builds. Good luck!
NOTE: You may have problems with missing symbols from LuaJIT. This happens if the build system picks up LuaJIT's headers instead of our internal (and expected) ones. We discovered this in this discussion.
In your CMake configuration, you should see this:
-- LuaJIT_FOUND: TRUE
-- LuaJIT_LIBRARY: /usr/local/lib/libluajit-5.1.dylib
-- LuaJIT_INCLUDE_DIR: /Users/runner/work/server/server/ext/lua/include
If the LuaJIT_INCLUDE_DIR is pointing somewhere other than <SERVER_ROOT>/server/server/ext/lua/include, you can change it during CMake configuration by using:
cmake .. -DLuaJIT_INCLUDE_DIR=<SERVER_ROOT>/server/ext/lua/include
Linux (through WSL)
Linux (Arch)
Some users have had success building on Arch. We can't and won't support Arch as main platform. Good luck!echo "Y" | pacman -Syu
echo "Y" | pacman -S sudo
sudo echo "Y" | pacman -S git python3 python-pip gcc cmake make luajit zeromq openssl zlib mariadb binutils
# CMake build as normalLinux (Raspberry Pi)
Raspberry Pi 3
Build instructions should be the same or similar as a regular Linux build. The build process may take a long time, but running the game doesn't take much computing power. You should use a suitably powerful and stable power supply!
Raspberry Pi 4
As above, the instructions should be the same as a regular Linux build, with one exception: You must use a suitably modern version of LuaJIT. This comes by default with Ubuntu 21.04 onwards. Or you can build LuaJIT from source (see our OSX build for more details). You should use a suitably powerful and stable power supply!
Docker
The core team of LSB does not use Docker in their workflows, and as such can't properly maintain a Docker setup as a first-class citizen. There is an unofficial Docker guide here.