Begin adding support for SerenityOS

This commit is contained in:
mrkubax10 2023-07-23 12:56:33 +00:00
parent 1299adbc68
commit 0e29610808
4 changed files with 26 additions and 2 deletions

View File

@ -62,7 +62,7 @@ else()
set(WINDOW_WIN32_DEFAULT OFF)
endif()
option(WINDOW_WIN32 "Enable Win32 window creation (Windows only)" ${WINDOW_WIN32_DEFAULT})
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT SERENITYOS)
if(X11_INCLUDE_DIRS AND X11_LIBRARIES)
set(WINDOW_X11_DEFAULT ON)
else()
@ -75,7 +75,7 @@ if(UNIX AND NOT APPLE)
endif()
endif()
option(WINDOW_X11 "Enable X11 window creation" ${WINDOW_X11_DEFAULT})
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT SERENITYOS)
if(WaylandClient_INCLUDE_DIR AND WaylandClient_LIBRARY)
set(WINDOW_WAYLAND_DEFAULT ON)
else()
@ -88,6 +88,10 @@ if(UNIX AND NOT APPLE)
endif()
endif()
option(WINDOW_WAYLAND "Enable Wayland window creation" ${WINDOW_WAYLAND_DEFAULT})
if(SERENITYOS)
set(WINDOW_SERENITYOS_DEFAULT ON)
endif()
option(WINDOW_SERENITYOS "Enable SerenityOS window creation" ${WINDOW_SERENITYOS_DEFAULT})
if(BUILD_CLIENT)
set(CLIENT_SOURCES

View File

@ -30,6 +30,7 @@ SOFTWARE.
#cmakedefine WINDOW_WIN32
#cmakedefine WINDOW_X11
#cmakedefine WINDOW_WAYLAND
#cmakedefine WINDOW_SERENITYOS
#cmakedefine HAVE_STRSIGNAL
#define POLYGUN_VERSION "git"

View File

@ -14,6 +14,7 @@
- `WINDOW_WIN32`, if true window creation using Win32 API will be enabled. It's Windows only and enabled there by default.
- `WINDOW_X11`, if true window creation using X11 will be enabled. It's only valid on Unix-like systems and is detected there automatically.
- `WINDOW_WAYLAND`, if true window creation using Wayland will be enabled. It's only valid on Linux and is detected there automatically.
- `WINDOW_SERENITYOS` if true window creation on SerenityOS will be supported.
- `HAVE_STRSIGNAL`, if true `strsignal` from C library will be used, otherwise PolyGun will provide it's own
implementation. Note that you shouldn't have to set this manually because it's automatically detected.
- `X11_INCLUDE_DIR`, only valid if `WINDOW_X11` was set to `TRUE`, it's path to X11 headers. It should point to folder with `X11` directory.
@ -183,3 +184,15 @@ to reduce used disk space via not downloading entire git history.
10. Enter build directory using `cd build`.
11. Generate build files using `cmake ..`. You may want to add additional arguments to CMake, see *`CMakeLists.txt` documentation* section.
12. Build project using `make -j$(nproc)`.
### SerenityOS
This documentation assumes full build (client and server).
1. Install following ports: `gcc` (alternatively `clang`), `cmake`, `glm`, `libopenal`, `libvorbis`, `libpng`, `freetype`, `git`.
2. Clone repository with following command: `git clone http://git.cubesoftware.xyz:20524/PolyGun/PolyGun.git`. You can add `--depth=1` argument
to reduce used disk space via not downloading entire git history.
3. Enter directory with downloaded PolyGun repository using `cd PolyGun`.
4. Download and extract latest AngelScript source package to `external/angelscript` inside of repository root.
5. Make build directory using `mkdir build`.
6. Enter build directory using `cd build`.
7. Generate build files using `cmake ..`. You may want to add additional arguments to CMake, see *`CMakeLists.txt` documentation* section.
8. Build project using `make -j$(nproc)`.

View File

@ -15,6 +15,12 @@ PolyGun is a voxel-based multiplayer first person shooter game/engine.
## Licensing
PolyGun is free software licensed under the permissive Expat license. See [LICENSE.TXT](LICENSE.TXT) for the licensing terms and conditions agreement.
## Supported platforms/operating systems
- GNU/Linux, Alpine Linux (X11 and Wayland windowing systems)
- Microsoft Windows (2000/ME or later, may work on older but untested. Also good luck getting
C++17 compiler there)
- SerenityOS
## Contributing
### See [docs/CODING_STYLE.MD](docs/CODING_STYLE.MD)