Another Minecraft Classic server written in C
Another Minecraft Classic server in C.
The server is still under development (see Projects tab)!
The goal of this project is to create a stable, customizable and future-rich multiplatform Minecraft Classic server with a minimum dependencies.
If you don’t want to mess with compilers, you can always download the release build for your OS here.
You can also get the latest unstable build here.
HTTP_USE_CURL_BACKEND
)HTTP_USE_WININET_BACKEND
)HASH_USE_CRYPTO_BACKEND
)HASH_USE_WINCRYPT_BACKEND
)Let’s say you want to compile the server for Windows with libcurl and libcrypto backends, then you should add these defines:/DCORE_MANUAL_BACKENDS /DCORE_USE_WINDOWS_TYPES /DCORE_USE_WINDOWS_PATHS /DCORE_USE_WINDOWS_DEFINES /DHTTP_USE_CURL_BACKEND /DHASH_USE_CRYPTO_BACKEND
It can be done by creating a file called vars.bat
in the root folder of the server with the following content:
SET CFLAGS=!CFLAGS! /DCORE_MANUAL_BACKENDS ^
/DCORE_USE_WINDOWS ^
/DCORE_USE_WINDOWS_TYPES ^
/DCORE_USE_WINDOWS_PATHS ^
/DCORE_USE_WINDOWS_DEFINES ^
/DHTTP_USE_CURL_BACKEND ^
/DHASH_USE_CRYPTO_BACKEND
./build [args ...]
Single command builder for Linux: curl -sL https://igvx.ru/singlecommand | bash
(server + base + lua)
NOTE: This script uses gcc, but you can change it to another compiler by setting CC environment variable (CC=clang ./build [args ...]
).
.\build.bat [args ...]
NOTE: You must open a Visual Studio Command Prompt to run this script.
Argument | Description |
---|---|
cls | Clear console window before compilation |
upd | Pull latest server (or plugin) changes from a remote repository before building |
dbg | Build with debug symbols |
wall | Enable all possible warnings |
wx | Treat warnings as errors |
w0 | Disable all warnings |
od | Disable compiler optimizations |
san | Add LLVM sanitizers |
run | Start the server after compilation |
noprompt | Suppress zlib download prompt message (Windows only) |
pb | Build a plugin (See notes below) |
Notice that these arguments must be passed after the pb
argument and plugin’s name!
Argument | Description |
---|---|
install | Copy the plugin to the plugins directory after compilation |
cs-
prefix in its name. Inside this folder there should be a src
folder with atleast one *.c file.out
is created in its root. Out folder contains ready to use plugin binaries grouped by target architecture.pb
must be the name of the plugin you want to build. The name must not include the cs-
prefix.vars.sh
/vars.bat
file in the plugin’s root folder../build
- Build the server release binary./build dbg wall upd
- Pull latest changes from this repository, then build the server with all warnings and debug symbols./build dbg wall pb base install
- Build the base plugin with all warnings and debug symbols, then copy binary to the plugins directory./build dbg wall upd pb base install
- Pull latest changes from cs-base repository, then build the base plugin and copy binary to the plugins directory
[root_folder]/cserver - This repository
[root_folder]/cs-lua - Lua scripting plugin
[root_folder]/cs-base - Base server functionality
[root_folder]/cs-survival - Survival plugin
[root_folder]/cs-test - Test plugin