Compare commits

...

16 Commits

Author SHA1 Message Date
Lion cd893de7c2 Update feature.md 2023-12-10 12:58:37 +01:00
Lion bf3bef232a Update and rename feature_request.md to feature.md 2023-12-10 12:54:42 +01:00
Lion 43b1b050e2 Fix workflows to make release builds (#202)
Currently the Windows workflow doesn't properly create a release binary.
2023-12-09 20:17:10 +01:00
Lion Kortlepel 9f87edc6e9 add msvcp140.dll comment to the release text 2023-12-09 20:09:56 +01:00
Lion Kortlepel c6f78c5522 fix release build path 2023-12-09 20:06:50 +01:00
Lion Kortlepel 9f01268538 update version to 3.1.3 2023-12-09 20:01:53 +01:00
Lion Kortlepel 5523a4fe4b force build release config on windows 2023-12-09 20:00:33 +01:00
Lion Kortlepel 7f11d0f002 make release builds by default 2023-12-09 19:22:50 +01:00
Lion Kortlepel 6b31ba35fd attempt to fix workflows to make release builds 2023-12-09 19:18:33 +01:00
Lion d2329f0723 Remove password setting from config to avoid confusion (#199)
...until implemented.

The client afaik currently doesn't support this setting.
2023-12-09 19:05:54 +01:00
Luuk van Oijen ef45efeb86 Update readme to new build system (#200)
Now building is like 2 steps, so the readme reflects that now.
2023-12-09 18:33:46 +01:00
Lion edcca75637 Update README.md 2023-12-08 17:18:54 +01:00
Lion c1bacf1f3a remove old instructions from readme, cleanup 2023-12-08 17:16:47 +01:00
Lion Kortlepel 795b651744 remove macos section 2023-12-05 18:35:57 +01:00
Lion Kortlepel be108bb8b3 update readme to new build system 2023-12-05 18:34:06 +01:00
Lion Kortlepel d8b8812026 remove password setting from config to avoid confusion
...until implemented
2023-12-05 18:23:23 +01:00
9 changed files with 41 additions and 130 deletions
@@ -1,5 +1,5 @@
---
name: Feature request
name: Feature
about: Suggest an idea for this project
title: "[Feature Request]"
labels: enhancement
@@ -7,14 +7,13 @@ assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. For example: "I'm always frustrated when ...".
#### **Describe the feature you'd like in detail**
**Describe the solution you'd like**
A clear and concise description of what you want to happen. Also supply OS information if relevant, for example "*On Linux*, I would like to be able to...".
**Describe alternatives you've considered**
#### **Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context about the feature request here.
#### **Acceptance Criteria**
- [ ] *Only fill this out if you're a developer, otherwise leave as-is*
+2 -1
View File
@@ -4,6 +4,7 @@ on: [push]
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
CMAKE_BUILD_TYPE: "Release"
jobs:
debian-11-build:
@@ -147,4 +148,4 @@ jobs:
- name: Test
run: |
chmod +x ./BeamMP-Server-tests
./BeamMP-Server-tests
./BeamMP-Server-tests
+4 -3
View File
@@ -7,6 +7,7 @@ on:
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
CMAKE_BUILD_TYPE: "Release"
jobs:
create-release:
@@ -27,7 +28,7 @@ jobs:
prerelease: true
body: |
Files included in this release:
- `BeamMP-Server.exe` is the windows build.
- `BeamMP-Server.exe` is the windows build. You need to install the [Visual C++ Redistributables](https://aka.ms/vs/17/release/vc_redist.x64.exe) to run this.
- `BeamMP-Server-debian` is a Debian 11 build, requires `liblua5.3-0`.
- `BeamMP-Server-ubuntu` is a Ubuntu 22.04 build, requires `liblua5.3-0`.
@@ -163,6 +164,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ./bin/BeamMP-Server.exe
asset_path: ./bin/Release/BeamMP-Server.exe
asset_name: BeamMP-Server.exe
asset_content_type: application/vnd.microsoft.portable-executable
asset_content_type: application/vnd.microsoft.portable-executable
+2 -1
View File
@@ -5,6 +5,7 @@ on: [push]
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
CMAKE_BUILD_TYPE: "Release"
jobs:
windows-build:
@@ -38,5 +39,5 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: BeamMP-Server-windows
path: ./bin/BeamMP-Server.exe
path: ./bin/Release/BeamMP-Server.exe
+4 -3
View File
@@ -126,9 +126,10 @@ include(FindThreads)
# enables compile_commands.json for clang-related tools (such as the clang LS)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# build debug builds by default (if not specified otherwise)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
# build release builds by default (if not specified otherwise)
if(NOT DEFINED CMAKE_BUILD_TYPE)
message(NOTICE "No build type specified, defaulting to 'Release'")
set(CMAKE_BUILD_TYPE "Release")
endif()
if(UNIX)
+19 -111
View File
@@ -6,7 +6,7 @@
This is the server for the multiplayer mod **[BeamMP](https://beammp.com/)** for the game [BeamNG.drive](https://www.beamng.com/).
The server is the point through which all clients communicate. You can write Lua mods for the server, there are detailed instructions on the [BeamMP Wiki](https://wiki.beammp.com).
**For Linux, you __need__ the runtime dependencies, listed below under "[prerequisites](#prerequisites)".**
**For Linux, you __need__ the runtime dependencies, which are listed below under [Runtime Dependencies](#runtime-dependencies)**
## Support + Contact
@@ -43,7 +43,7 @@ We only allow building unmodified (original) source code for public use. `master
## Supported Operating Systems
The code itself supports (latest stable) Linux and Windows. In terms of actual build support, for now we usually only distribute Windows binaries and sometimes Linux. For any other distro or OS, you just have to find the same libraries listed in the Linux Build [Prerequisites](#prerequisites) further down the page, and it should build fine. We don't currently support any big-endian architectures.
The code itself supports (latest stable) Linux and Windows. In terms of actual build support, for now we usually only distribute Windows binaries and Linux. For any other distro or OS, you just have to find the same libraries listed in [Runtime Dependencies](#runtime-dependencies) further down the page, and it should build fine.
Recommended compilers: MSVC, GCC, CLANG.
@@ -51,127 +51,35 @@ You can find precompiled binaries under [Releases](https://github.com/BeamMP/Bea
## Build Instructions
**__Do not compile from `master`. Always build from a release tag, i.e. `tags/v3.1.0`!__**
On Linux, you need some dependencies to **build** the server (on Windows, you don't):
Currently only Linux and Windows are supported (generally). See [Releases](https://github.com/BeamMP/BeamMP-Server/releases/) for official binary releases. On systems to which we do not provide binaries (so anything but windows), you are allowed to compile the program and use it. Other restrictions, such as not being allowed to distribute those binaries, still apply (see [copyright notice](#copyright)).
For Debian, Ubuntu and others you can find scripts that do this in `scripts/`.
### Prerequisites
#### Windows
There are **no runtime libraries** needed for Windows.
Please use the prepackaged binaries in [Releases](https://github.com/BeamMP/BeamMP-Server/releases/).
Dependencies for **Windows** can be installed with `vcpkg`.
These are:
```
lua zlib rapidjson openssl websocketpp curl
liblua5.3-dev curl zip unzip tar cmake make git g++
```
The triplet we use for releases is `x64-windows-static`.
#### Linux
The names of each package may change depending on your platform. See in `scripts/` or use a search engine to find out what they're called for you.
We recommend Ubuntu 22.04 or Arch Linux. Any Linux distribution will work, but you have to figure out the package names yourself (please feel free to PR in a change to this README with that info).
You can build on **Windows, Linux** or other platforms by following these steps:
##### Runtime Dependencies
1. Check out the repository with git: `git clone --recursive https://github.com/BeamMP/BeamMP-Server`.
2. Go into the directory `cd BeamMP-Server`.
3. Run CMake `cmake -S . -B bin -DCMAKE_BUILD_TYPE=Release` - this can take a few minutes and may take a lot of disk space and bandwidth.
4. Build via `cmake --build bin --parallel -t BeamMP-Server`.
5. Your executable can be found in `bin/`.
When you make changes to the code, you only have to run step 4 again.
### Runtime Dependencies
These are needed to *run* the server.
<details>
<summary>
Ubuntu 22.04
</summary>
Debian, Ubuntu and friends: `liblua5.3-0`
`apt-get install` the following libraries:
```
liblua5.3-0
libssl3
curl
```
</details>
Other Linux distros: `liblua` of *some kind*.
<details>
<summary>
Arch Linux
</summary>
`pacman -Syu` the following libraries:
```
lua53
openssl
curl
```
</details>
##### Build Dependencies
These are needed for you to *build* the server, in addition to the [runtime dependencies](#runtime-dependencies).
<details>
<summary>
Ubuntu 22.04
</summary>
`apt-get install` the following libraries and programs:
```
git
libz-dev
rapidjson-dev
liblua5.3-dev
libssl-dev
libwebsocketpp-dev
libcurl4-openssl-dev
cmake
g++-10
libboost1.74-all-dev
libssl3
curl
```
</details>
<details>
<summary>
Arch Linux
</summary>
`pacman -Syu` the following libraries and programs:
```
lua53
openssl
curl
git
cmake
g++
zlib
boost
websocketpp
```
</details>
#### macOS
Dependencies for **macOS** can be installed with homebrew.
```
brew install lua@5.3 rapidjson websocketpp cmake openssl@1.1
```
Some packages are included in **macOS** but you might want to install homebrew versions.
```
brew install curl zlib git make
```
### How to build
On Windows, use git-bash for these commands. On Linux, these should work in your shell.
1. Make sure you have all [prerequisites](#prerequisites) installed
2. Clone the repository in a location of your choice with `git clone https://github.com/BeamMP/BeamMP-Server` .
3. Change into the BeamMP-Server directory by running `cd BeamMP-Server`.
4. Checkout the branch or tag of the release you want to compile, for example `git checkout tags/v3.0.2` for version 3.0.2. You can find the latest version [here](https://github.com/BeamMP/BeamMP-Server/tags).
6. Run `cmake . -DCMAKE_BUILD_TYPE=Release` (with `.`). This may take some time, and will update all submodules and prepare the build.
7. Run `make -j` . This step will take some time and will use a lot of CPU and RAM. Remove the `-j` if you run out of memory. *If you change something in the source code, you only have to re-run this step.*
8. You now have a `BeamMP-Server` file in your directory, which is executable with `./BeamMP-Server` (`.\BeamMP-Server.exe` for windows). Follow the (Windows or Linux, doesnt matter) instructions on the [wiki](https://wiki.beammp.com/en/home/server-installation) for further setup after installation (which we just did), such as port-forwarding and getting a key to actually run the server.
*tip: to run the server in the background, simply (in bash, zsh, etc) run:* `nohup ./BeamMP-Server &`*.*
Windows: No libraries.
## Support
The BeamMP project is supported by community donations via our [Patreon](https://www.patreon.com/BeamMP). This brings perks such as Patreon-only channels on our Discord, early access to new updates, and more server keys.
+1 -1
View File
@@ -135,7 +135,7 @@ private:
static inline std::mutex mShutdownHandlersMutex {};
static inline std::deque<TShutdownHandler> mShutdownHandlers {};
static inline Version mVersion { 3, 1, 2 };
static inline Version mVersion { 3, 1, 3 };
};
std::string ThreadName(bool DebugModeOverride = false);
+1 -1
View File
@@ -2,4 +2,4 @@
set -ex
cmake --build bin --parallel -t BeamMP-Server
cmake --build bin --parallel -t BeamMP-Server --config Release
+2 -2
View File
@@ -107,8 +107,8 @@ void TConfig::FlushToFile() {
data["General"][StrMap.data()] = Application::Settings.MapName;
data["General"][StrDescription.data()] = Application::Settings.ServerDesc;
data["General"][StrResourceFolder.data()] = Application::Settings.Resource;
data["General"][StrPassword.data()] = Application::Settings.Password;
SetComment(data["General"][StrPassword.data()].comments(), " Sets a password on this server, which restricts people from joining. To join, a player must enter this exact password. Leave empty ("") to disable the password.");
// data["General"][StrPassword.data()] = Application::Settings.Password;
// SetComment(data["General"][StrPassword.data()].comments(), " Sets a password on this server, which restricts people from joining. To join, a player must enter this exact password. Leave empty ("") to disable the password.");
// Misc
data["Misc"][StrHideUpdateMessages.data()] = Application::Settings.HideUpdateMessages;
SetComment(data["Misc"][StrHideUpdateMessages.data()].comments(), " Hides the periodic update message which notifies you of a new server version. You should really keep this on and always update as soon as possible. For more information visit https://wiki.beammp.com/en/home/server-maintenance#updating-the-server. An update message will always appear at startup regardless.");