[Build] Remove lingering references to OpenAl

OpenAl is now required to build.
This commit is contained in:
Fabrice de Gans 2024-04-01 19:55:48 -07:00 committed by Rafael Kitover
parent c6da7e384e
commit 8576733c0d
9 changed files with 11 additions and 60 deletions

View File

@ -217,7 +217,6 @@ Here is the complete list:
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON | | ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON | | ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
| ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON | | ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON |
| ENABLE_OPENAL | Enable OpenAL for the wxWidgets port | AUTO |
| ENABLE_ASAN | Enable libasan sanitizers (by default address, only in debug mode) | OFF | | ENABLE_ASAN | Enable libasan sanitizers (by default address, only in debug mode) | OFF |
| UPSTREAM_RELEASE | Do some release tasks, like codesigning, making zip and gpg sigs. | OFF | | UPSTREAM_RELEASE | Do some release tasks, like codesigning, making zip and gpg sigs. | OFF |
| BUILD_TESTING | Build the tests and enable ctest support. | ON | | BUILD_TESTING | Build the tests and enable ctest support. | ON |

View File

@ -13,7 +13,6 @@ Known preprocessor switches:
- RGB555: Use 16bit colors with 5bit green instead of 6bit green in hq3x/4x filters (C++ version) - RGB555: Use 16bit colors with 5bit green instead of 6bit green in hq3x/4x filters (C++ version)
- NO_OGL: Exclude OpenGL code - NO_OGL: Exclude OpenGL code
- NO_D3D: Exclude Direct3D code - NO_D3D: Exclude Direct3D code
- NO_OAL: Exclude OpenAL code
- NO_XAUDIO2: Exclude XAudio2 code (the XAudio2 interface is DirectSound's successor) - NO_XAUDIO2: Exclude XAudio2 code (the XAudio2 interface is DirectSound's successor)
- NO_LINK: Exclude linking code (joybus, multilink, ...) - NO_LINK: Exclude linking code (joybus, multilink, ...)
- WIN64: This macro is only defined for 64 bit builds - WIN64: This macro is only defined for 64 bit builds

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
CMAKE=cmake CMAKE=cmake
ENABLE_OPENAL=1
ENABLE_FFMPEG=1 ENABLE_FFMPEG=1
main() { main() {
@ -25,10 +24,6 @@ check_command_line_args() {
usage usage
quit 0 quit 0
;; ;;
--no-openal)
ENABLE_OPENAL=
shift
;;
--no-ffmpeg) --no-ffmpeg)
ENABLE_FFMPEG= ENABLE_FFMPEG=
shift shift
@ -355,9 +350,8 @@ debian_installdeps() {
;; ;;
esac esac
pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_libs libgtk2.0-dev libgtk-3-dev ccache zip ninja-build" pkgs="build-essential g++ nasm cmake ccache gettext zlib1g-dev libgl1-mesa-dev libgettextpo-dev libsdl2-dev $sdl_lib libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev libsfml-dev $sfml_libs $glew_lib $wx_libs libgtk2.0-dev libgtk-3-dev ccache zip ninja-build libopenal-dev"
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs libopenal-dev"
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev" [ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs libavcodec-dev libavformat-dev libswscale-dev libavutil-dev $libswresample_dev"
check sudo apt-get -qy install $pkgs check sudo apt-get -qy install $pkgs
@ -407,8 +401,7 @@ debian_installdeps() {
fi fi
fi fi
deps="gcc zlib ffmpeg gettext sdl2 sfml openal wxwidgets" deps="gcc zlib ffmpeg gettext sdl2 sfml openal wxwidgets openal"
[ -n "$ENABLE_OPENAL" ] && deps="$deps openal"
[ -n "$ENABLE_FFMPEG" ] && deps="$deps ffmpeg" [ -n "$ENABLE_FFMPEG" ] && deps="$deps ffmpeg"
set -- set --
@ -510,9 +503,6 @@ fedora_installdeps() {
*ffmpeg*) *ffmpeg*)
[ -z "$ENABLE_FFMPEG" ] && continue [ -z "$ENABLE_FFMPEG" ] && continue
;; ;;
*openal*)
[ -z "$ENABLE_OPENAL" ] && continue
;;
esac esac
pkg_arch= pkg_arch=
@ -601,15 +591,9 @@ fedora_installdeps() {
;; ;;
esac esac
# install static deps # install static deps
for pkg in zlib gettext SDL2 wxWidgets3; do for pkg in zlib gettext SDL2 wxWidgets3 openal-soft; do
set -- "$@" "${target}-${pkg}-static" set -- "$@" "${target}-${pkg}-static"
done done
# install deps that are not available as static
if [ -n "$ENABLE_OPENAL" ]; then
for pkg in openal-soft; do
set -- "$@" "${target}-${pkg}"
done
fi
# get the necessary win32 headers # get the necessary win32 headers
git submodule update --init --remote --recursive git submodule update --init --remote --recursive
@ -707,9 +691,6 @@ rhel_installdeps() {
*ffmpeg*) *ffmpeg*)
[ -z "$ENABLE_FFMPEG" ] && continue [ -z "$ENABLE_FFMPEG" ] && continue
;; ;;
*openal*)
[ -z "$ENABLE_OPENAL" ] && continue
;;
esac esac
if [ -n "$amd64" ]; then if [ -n "$amd64" ]; then
@ -790,15 +771,9 @@ rhel_installdeps() {
;; ;;
esac esac
# install static deps # install static deps
for pkg in zlib gettext SDL2 wxWidgets; do for pkg in zlib gettext SDL2 wxWidgets openal-soft; do
set -- "$@" "${target}-${pkg}-static" set -- "$@" "${target}-${pkg}-static"
done done
# install deps that are not available as static
if [ -n "$ENABLE_OPENAL" ]; then
for pkg in openal-soft; do
set -- "$@" "${target}-${pkg}"
done
fi
# get the necessary win32 headers # get the necessary win32 headers
git submodule update --init --remote --recursive git submodule update --init --remote --recursive
@ -824,9 +799,8 @@ suse_installdeps() {
tools="make cmake ccache nasm gettext-tools pkg-config ccache zip sfml2-devel ninja" tools="make cmake ccache nasm gettext-tools pkg-config ccache zip sfml2-devel ninja"
libs="gcc gcc-c++ libSDL2-devel wxWidgets-3_0-devel" # ffmpeg-devel libs="gcc gcc-c++ libSDL2-devel wxWidgets-3_0-devel openal-soft-devel" # ffmpeg-devel
[ -n "$ENABLE_OPENAL" ] && libs="$libs openal-soft-devel"
# ffmpeg requires packman repos # ffmpeg requires packman repos
if [ "$target" = m32 ]; then if [ "$target" = m32 ]; then
@ -894,9 +868,8 @@ archlinux_installdeps() {
$pacman -Q gtk3-classic >/dev/null 2>&1 && gtk=gtk3-classic $pacman -Q gtk3-classic >/dev/null 2>&1 && gtk=gtk3-classic
libs="zlib mesa gettext sdl2 wxgtk3 $gtk sfml" libs="zlib mesa gettext sdl2 wxgtk3 $gtk sfml openal"
[ -n "$ENABLE_OPENAL" ] && libs="$libs openal"
[ -n "$ENABLE_FFMPEG" ] && libs="$libs ffmpeg" [ -n "$ENABLE_FFMPEG" ] && libs="$libs ffmpeg"
if [ -z "$target" -o "$target" = m32 ]; then if [ -z "$target" -o "$target" = m32 ]; then
@ -991,9 +964,7 @@ EOF
fi fi
done done
deps="zlib gettext pkg-config sdl2 wxmsw" deps="zlib gettext pkg-config sdl2 wxmsw openal"
[ -n "$ENABLE_OPENAL" ] && deps="$deps openal"
# and the actual deps # and the actual deps
for p in $deps; do for p in $deps; do
@ -1024,9 +995,7 @@ solus_installdeps() {
check sudo eopkg -y install -c system.devel check sudo eopkg -y install -c system.devel
check sudo eopkg -y install git ccache ninja check sudo eopkg -y install git ccache ninja
set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel libglu-devel set -- sdl2-devel wxwidgets-devel libgtk-2-devel libgtk-3-devel libglu-devel openal-soft-devel
[ -n "$ENABLE_OPENAL" ] && set -- "$@" openal-soft-devel
if [ -n "$amd64" -a "$target" = m32 ]; then if [ -n "$amd64" -a "$target" = m32 ]; then
info_msg 'Calculating dependencies, this will take a while..' info_msg 'Calculating dependencies, this will take a while..'
@ -1102,14 +1071,13 @@ gentoo_installdeps() {
sys-devel/binutils \ sys-devel/binutils \
media-libs/libsdl2 \ media-libs/libsdl2 \
media-libs/libsfml \ media-libs/libsfml \
media-libs/openal \
x11-libs/wxGTK:$wx_slot \ x11-libs/wxGTK:$wx_slot \
sys-libs/zlib \ sys-libs/zlib \
dev-util/pkgconf \ dev-util/pkgconf \
dev-lang/nasm \ dev-lang/nasm \
dev-build/ninja" dev-build/ninja"
[ -n "$ENABLE_OPENAL" ] && ebuilds="$ebuilds media-libs/openal"
[ -n "$ENABLE_FFMPEG" ] && ebuilds="$ebuilds media-video/ffmpeg" [ -n "$ENABLE_FFMPEG" ] && ebuilds="$ebuilds media-video/ffmpeg"
check sudo emerge -vna $ebuilds check sudo emerge -vna $ebuilds
@ -1152,7 +1120,7 @@ windows_installdeps() {
;; ;;
esac esac
pkgs="$pkgs SDL2 sfml FAudio wxWidgets3.2 zlib binutils cmake crt-git headers-git make pkgconf tools-git windows-default-manifest libmangle-git ninja gdb ccache" pkgs="$pkgs SDL2 sfml FAudio wxWidgets3.2 zlib binutils cmake crt-git headers-git make pkgconf tools-git windows-default-manifest libmangle-git ninja gdb ccache openal"
case "$target" in case "$target" in
*x86_64) *x86_64)
@ -1160,7 +1128,6 @@ windows_installdeps() {
;; ;;
esac esac
[ -n "$ENABLE_OPENAL" ] && pkgs="$pkgs openal"
[ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs ffmpeg" [ -n "$ENABLE_FFMPEG" ] && pkgs="$pkgs ffmpeg"
set -- set --

View File

@ -51,7 +51,6 @@ parts:
- libopenal-dev - libopenal-dev
- libwxgtk3.0-gtk3-dev - libwxgtk3.0-gtk3-dev
cmake-parameters: cmake-parameters:
- -DENABLE_OPENAL=ON
- -DENABLE_SDL=OFF - -DENABLE_SDL=OFF
- -DCMAKE_INSTALL_PREFIX=/usr - -DCMAKE_INSTALL_PREFIX=/usr

View File

@ -1506,14 +1506,12 @@ public:
switch (api) { switch (api) {
case AUD_SDL: case AUD_SDL:
break; break;
#ifndef NO_OAL
case AUD_OPENAL: case AUD_OPENAL:
if (!GetOALDevices(names, dev_ids)) if (!GetOALDevices(names, dev_ids))
return false; return false;
break; break;
#endif
#ifdef __WXMSW__ #ifdef __WXMSW__
case AUD_DIRECTSOUND: case AUD_DIRECTSOUND:
@ -2700,9 +2698,6 @@ bool MainFrame::BindControls()
rb->Hide(); // currently disabled rb->Hide(); // currently disabled
audapi_rb("OpenAL", AUD_OPENAL); audapi_rb("OpenAL", AUD_OPENAL);
#ifdef NO_OAL
rb->Hide();
#endif
audapi_rb("DirectSound", AUD_DIRECTSOUND); audapi_rb("DirectSound", AUD_DIRECTSOUND);
#ifndef __WXMSW__ #ifndef __WXMSW__
rb->Hide(); rb->Hide();

View File

@ -1,8 +1,6 @@
// === LOGALL writes very detailed informations to vba-trace.log === // === LOGALL writes very detailed informations to vba-trace.log ===
//#define LOGALL //#define LOGALL
#ifndef NO_OAL
// for gopts // for gopts
// also, wx-related // also, wx-related
#include "wx/wxvbam.h" #include "wx/wxvbam.h"
@ -363,5 +361,3 @@ bool OpenAL::GetDevices(wxArrayString& names, wxArrayString& ids)
// should work anyway, but must always use default driver // should work anyway, but must always use default driver
return true; return true;
} }
#endif

View File

@ -1233,11 +1233,9 @@ SoundDriver* systemSoundInit()
switch (gopts.audio_api) { switch (gopts.audio_api) {
case AUD_SDL: case AUD_SDL:
return new SoundSDL(); return new SoundSDL();
#ifndef NO_OAL
case AUD_OPENAL: case AUD_OPENAL:
return newOpenAL(); return newOpenAL();
#endif
#ifdef __WXMSW__ #ifdef __WXMSW__
case AUD_DIRECTSOUND: case AUD_DIRECTSOUND:

View File

@ -703,11 +703,9 @@ private:
// I should add this to SoundDriver, but wxArrayString is wx-specific // I should add this to SoundDriver, but wxArrayString is wx-specific
// I suppose I could make subclass wxSoundDriver. maybe later. // I suppose I could make subclass wxSoundDriver. maybe later.
#ifndef NO_OAL
class SoundDriver; class SoundDriver;
extern SoundDriver* newOpenAL(); extern SoundDriver* newOpenAL();
extern bool GetOALDevices(wxArrayString& names, wxArrayString& ids); extern bool GetOALDevices(wxArrayString& names, wxArrayString& ids);
#endif
#ifdef __WXMSW__ #ifdef __WXMSW__
extern SoundDriver* newDirectSound(); extern SoundDriver* newDirectSound();

View File

@ -524,7 +524,7 @@ setup() {
# binary smaller. # binary smaller.
if [ "$target_os" = windows ] && [ "$target_bits" -eq 32 ]; then if [ "$target_os" = windows ] && [ "$target_bits" -eq 32 ]; then
BUILD_FFMPEG= BUILD_FFMPEG=
PROJECT_ARGS="$PROJECT_ARGS -DENABLE_OPENAL=NO" PROJECT_ARGS="$PROJECT_ARGS"
fi fi
if [ -z "$BUILD_FFMPEG" ]; then if [ -z "$BUILD_FFMPEG" ]; then