mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-07-14 18:55:58 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9b9d4642a | |||
| b4d6f90012 |
@@ -52,22 +52,20 @@ You can find precompiled binaries under [Releases](https://github.com/BeamMP/Bea
|
|||||||
|
|
||||||
On Linux, you need some dependencies to **build** the server (on Windows, you don't):
|
On Linux, you need some dependencies to **build** the server (on Windows, you don't):
|
||||||
|
|
||||||
|
For Debian, Ubuntu and others you can find scripts that do this in `scripts/`.
|
||||||
|
|
||||||
```
|
```
|
||||||
liblua5.3-dev curl zip unzip tar cmake make git g++
|
liblua5.3-dev curl zip unzip tar cmake make git g++
|
||||||
```
|
```
|
||||||
|
|
||||||
You can install these with your distribution's package manager. You will need sudo or need root for ONLY this step.
|
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.
|
||||||
|
|
||||||
The names of each package may change depending on your platform.
|
|
||||||
|
|
||||||
If you are building for ARM (like aarch64), you need to run `export VCPKG_FORCE_SYSTEM_BINARIES=1` before the following commands.
|
|
||||||
|
|
||||||
You can build on **Windows, Linux** or other platforms by following these steps:
|
You can build on **Windows, Linux** or other platforms by following these steps:
|
||||||
|
|
||||||
1. Check out the repository with git: `git clone --recursive https://github.com/BeamMP/BeamMP-Server`.
|
1. Check out the repository with git: `git clone --recursive https://github.com/BeamMP/BeamMP-Server`.
|
||||||
2. Go into the directory `cd 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.
|
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 --config Release -t BeamMP-Server`.
|
4. Build via `cmake --build bin --parallel -t BeamMP-Server`.
|
||||||
5. Your executable can be found in `bin/`.
|
5. Your executable can be found in `bin/`.
|
||||||
|
|
||||||
When you make changes to the code, you only have to run step 4 again.
|
When you make changes to the code, you only have to run step 4 again.
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@ private:
|
|||||||
static inline std::mutex mShutdownHandlersMutex {};
|
static inline std::mutex mShutdownHandlersMutex {};
|
||||||
static inline std::deque<TShutdownHandler> mShutdownHandlers {};
|
static inline std::deque<TShutdownHandler> mShutdownHandlers {};
|
||||||
|
|
||||||
static inline Version mVersion { 3, 2, 1 };
|
static inline Version mVersion { 3, 2, 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
void SplitString(std::string const& str, const char delim, std::vector<std::string>& out);
|
void SplitString(std::string const& str, const char delim, std::vector<std::string>& out);
|
||||||
|
|||||||
@@ -80,17 +80,6 @@ TEST_CASE("GetPidVid") {
|
|||||||
TServer::TServer(const std::vector<std::string_view>& Arguments) {
|
TServer::TServer(const std::vector<std::string_view>& Arguments) {
|
||||||
beammp_info("BeamMP Server v" + Application::ServerVersionString());
|
beammp_info("BeamMP Server v" + Application::ServerVersionString());
|
||||||
Application::SetSubsystemStatus("Server", Application::Status::Starting);
|
Application::SetSubsystemStatus("Server", Application::Status::Starting);
|
||||||
if (Arguments.size() > 1) {
|
|
||||||
Application::Settings.CustomIP = Arguments[0];
|
|
||||||
size_t n = std::count(Application::Settings.CustomIP.begin(), Application::Settings.CustomIP.end(), '.');
|
|
||||||
auto p = Application::Settings.CustomIP.find_first_not_of(".0123456789");
|
|
||||||
if (p != std::string::npos || n != 3 || Application::Settings.CustomIP.substr(0, 3) == "127") {
|
|
||||||
Application::Settings.CustomIP.clear();
|
|
||||||
beammp_warn("IP Specified is invalid! Ignoring");
|
|
||||||
} else {
|
|
||||||
beammp_info("server started with custom IP");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Application::SetSubsystemStatus("Server", Application::Status::Good);
|
Application::SetSubsystemStatus("Server", Application::Status::Good);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user