Use OpenAL by default

This commit is contained in:
smallmodel 2024-08-21 18:35:06 +02:00
parent 694167d352
commit 13911b051a
No known key found for this signature in database
GPG key ID: A96F163ED4891440
9 changed files with 44 additions and 24 deletions

View file

@ -5,19 +5,21 @@ OpenMoHAA supports any architecture, thanks to the CMake build system and cross-
The following tools are required for all platforms:
- CMake >= 3.5
- Flex (>= 2.6.4) and Bison (>= 3.5.1)
- A C++11 compiler is also required.
- A C++11 compiler
- OpenAL SDK (can be found [here](https://github.com/kcat/openal-soft))
The installation directory can be set to the MOHAA directory.
By default, the build will produce both the client and dedicated server versions. The client can be omitted from the build by appending `-DBUILD_NO_CLIENT=1` to the CMake command-line arguments. Using this parameter will result in only the server portion being built.
The experimental OpenAL-based sound system can be used by appending `-DUSE_SOUND_NEW=1` to the CMake command-line arguments.
OpenAL can be disabled by appending `-DNO_OPENAL=1` to the CMake command-line arguments. The old SDL-based sound system will be used instead, it lacks some features such as ambient sounds.
## Compiling for Linux
These are the tools required on Linux :
- Clang >= 3.3 or GCC >= 4.8.5
- libsdl2-dev
- libopenal-dev
**clang-3.5** and **gcc-4.8.5** should work (tested on Ubuntu 16.04), but the latest version should be used.
@ -25,7 +27,7 @@ Ubuntu 20.04 is the minimum version required to fully compile the project succes
1 line install command with clang:
```sh
sudo apt-get install -y cmake ninja-build clang lld flex bison libsdl2-dev
sudo apt-get install -y cmake ninja-build clang lld flex bison libsdl2-dev libopenal-dev
```
Example with **CMake** and **ninja-build** installed:
@ -41,5 +43,6 @@ Other compilers can be specified by appending `-DCMAKE_C_COMPILER=/path/to/compi
Visual Studio (2019 or 2022) is generally preferred.
Flex and Bison can be downloaded from here: https://github.com/lexxmark/winflexbison/releases/tag/v2.5.25
OpenAL can be downloaded from here: https://github.com/kcat/openal-soft/releases/tag/1.23.1
Append `-DFLEX_EXECUTABLE=...\win_flex.exe -DBISON_EXECUTABLE=...\win_bison.exe` to the CMake command-line to use the package from the link above.
Append `-DFLEX_EXECUTABLE=...\win_flex.exe -DBISON_EXECUTABLE=...\win_bison.exe -DOPENAL_INCLUDE_DIR="path/to/oal/include" -DOPENAL_LIBRARY="path/to/oal"` to the CMake command-line to use the package from the link above.