mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Remove Mac OS X support
No, this is not a rage quit but the result of a long discussion. There are several reasons for us to drop OS X support: - OS X support was always more or less hacky. For example is was never really integrated into the build system and some features like the OpenAL sound backend never worked well. - The OS X support never grew into the new world based upon SDL2. - It was broken since at least Lion which was released 4 years ago. - None of the developers has a Mac or plans to buy one. Supporting a software for a platform not used by the developers is more or less impossible. - And despite several appeals no one from the OS X community ever stept up and send patches. Removed are: - Makefile support - The OpenAL quirks - The Cocoa bindings - The framworks Not removed is: - Savegame support - Memory management support - Platform detection - OpenGL and SDL includes So, if someone steps up and does a modern, fully integrated port based upon SDL2 we're happy to merge it back. The requirements are: - It must be a clean port, without any hacks - Full build system integration must be provided - The port must be maintained even after it was merged. At every release binaries must be build, API / ABI changes with new OS X versions must be tracked.
This commit is contained in:
parent
47cde06e27
commit
177b424ba1
10 changed files with 8 additions and 104 deletions
76
Makefile
76
Makefile
|
@ -20,7 +20,6 @@
|
|||
# - FreeBSD #
|
||||
# - Linux #
|
||||
# - OpenBSD #
|
||||
# - OS X #
|
||||
# - Windows (MinGW) #
|
||||
# ------------------------------------------------------ #
|
||||
|
||||
|
@ -69,19 +68,6 @@ WITH_SYSTEMWIDE:=no
|
|||
# MUST NOT be surrounded by quotation marks!
|
||||
WITH_SYSTEMDIR:=""
|
||||
|
||||
# This will set the architectures of the OSX-binaries.
|
||||
# You have to make sure your libs/frameworks supports
|
||||
# these architectures! To build an universal ppc-compatible
|
||||
# one would add -arch ppc for example.
|
||||
OSX_ARCH:=-arch i386 -arch x86_64
|
||||
|
||||
# This will set the build options to create an MacOS .app-bundle.
|
||||
# The app-bundle itself will not be created, but the runtime paths
|
||||
# will be set to expect the linked Frameworks in *.app/Contents/
|
||||
# Frameworks and the game-data will be expected in *.app/
|
||||
# Contents/Resources
|
||||
OSX_APP:=yes
|
||||
|
||||
# This is an optional configuration file, it'll be used in
|
||||
# case of presence.
|
||||
CONFIG_FILE := config.mk
|
||||
|
@ -154,14 +140,8 @@ endif
|
|||
#
|
||||
# -MMD to generate header dependencies. (They cannot be
|
||||
# generated if building universal binaries on OSX)
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
|
||||
-Wall -pipe -g
|
||||
CFLAGS += $(OSX_ARCH)
|
||||
else
|
||||
CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
|
||||
-Wall -pipe -g -ggdb -MMD
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -184,9 +164,6 @@ endif
|
|||
# ----------
|
||||
|
||||
# Extra CFLAGS for SDL
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
SDLCFLAGS :=
|
||||
else # not darwin
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
ifeq ($(OSTYPE),Windows)
|
||||
SDLCFLAGS := $(shell /custom/bin/sdl2-config --cflags)
|
||||
|
@ -200,19 +177,16 @@ else
|
|||
SDLCFLAGS := $(shell sdl-config --cflags)
|
||||
endif
|
||||
endif # SDL2
|
||||
endif # darwin's else
|
||||
|
||||
# ----------
|
||||
|
||||
# Extra CFLAGS for X11
|
||||
ifneq ($(OSTYPE), Windows)
|
||||
ifneq ($(OSTYPE), Darwin)
|
||||
ifeq ($(WITH_X11GAMMA),yes)
|
||||
X11CFLAGS := $(shell pkg-config x11 --cflags)
|
||||
X11CFLAGS += $(shell pkg-config xxf86vm --cflags)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -223,8 +197,6 @@ else ifeq ($(OSTYPE),FreeBSD)
|
|||
INCLUDE := -I/usr/local/include
|
||||
else ifeq ($(OSTYPE),OpenBSD)
|
||||
INCLUDE := -I/usr/local/include
|
||||
else ifeq ($(OSTYPE),Darwin)
|
||||
INCLUDE :=
|
||||
else ifeq ($(OSTYPE),Windows)
|
||||
INCLUDE := -I/custom/include
|
||||
endif
|
||||
|
@ -240,8 +212,6 @@ else ifeq ($(OSTYPE),OpenBSD)
|
|||
LDFLAGS := -L/usr/local/lib -lm
|
||||
else ifeq ($(OSTYPE),Windows)
|
||||
LDFLAGS := -L/custom/lib -static -lws2_32 -lwinmm
|
||||
else ifeq ($(OSTYPE), Darwin)
|
||||
LDFLAGS := $(OSX_ARCH) -lm
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
@ -253,32 +223,24 @@ SDLLDFLAGS := $(shell /custom/bin/sdl2-config --static-libs)
|
|||
else # not SDL2
|
||||
SDLLDFLAGS := -lSDL
|
||||
endif # SDL2
|
||||
else ifeq ($(OSTYPE), Darwin)
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
SDLLDFLAGS := -framework SDL2 -framework OpenGL -framework Cocoa
|
||||
else # not SDL2
|
||||
SDLLDFLAGS := -framework SDL -framework OpenGL -framework Cocoa
|
||||
endif # SDL2
|
||||
else # not Darwin/Win
|
||||
else # not Win
|
||||
ifeq ($(WITH_SDL2),yes)
|
||||
SDLLDFLAGS := $(shell sdl2-config --libs)
|
||||
else # not SDL2
|
||||
SDLLDFLAGS := $(shell sdl-config --libs)
|
||||
endif # SDL2
|
||||
endif # Darwin/Win
|
||||
endif # Win
|
||||
|
||||
# ----------
|
||||
|
||||
# Extra LDFLAGS for X11
|
||||
ifneq ($(OSTYPE), Windows)
|
||||
ifneq ($(OSTYPE), Darwin)
|
||||
ifeq ($(WITH_X11GAMMA),yes)
|
||||
X11LDFLAGS := $(shell pkg-config x11 --libs)
|
||||
X11LDFLAGS += $(shell pkg-config xxf86vm --libs)
|
||||
X11LDFLAGS += $(shell pkg-config xrandr --libs)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
|
@ -376,7 +338,7 @@ release/quake2.exe : CFLAGS += -DSDL2
|
|||
endif
|
||||
|
||||
release/quake2.exe : LDFLAGS += -mwindows -lopengl32
|
||||
else
|
||||
else # not Windows
|
||||
client:
|
||||
@echo "===> Building quake2"
|
||||
${Q}mkdir -p release
|
||||
|
@ -387,32 +349,18 @@ build/client/%.o: %.c
|
|||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(X11CFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
build/client/%.o : %.m
|
||||
@echo "===> CC $<"
|
||||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) $(OSX_ARCH) -x objective-c -c $< -o $@
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_CDA),yes)
|
||||
release/quake2 : CFLAGS += -DCDA
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OGG),yes)
|
||||
release/quake2 : CFLAGS += -DOGG
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
release/quake2 : LDFLAGS += -framework Vorbis -framework Ogg
|
||||
else
|
||||
release/quake2 : LDFLAGS += -lvorbis -lvorbisfile -logg
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),yes)
|
||||
ifeq ($(OSTYPE), OpenBSD)
|
||||
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so"'
|
||||
else ifeq ($(OSTYPE), Darwin)
|
||||
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"/System/Library/Frameworks/OpenAL.framework/OpenAL"'
|
||||
release/quake2 : LDFLAGS += -framework OpenAL
|
||||
else
|
||||
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"'
|
||||
endif
|
||||
|
@ -431,15 +379,7 @@ ifeq ($(WITH_SDL2),yes)
|
|||
release/quake2 : CFLAGS += -DSDL2
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
ifeq ($(OSX_APP), yes)
|
||||
release/quake2 : LDFLAGS += -Xlinker -rpath -Xlinker @loader_path/../Frameworks
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(OSTYPE), Darwin)
|
||||
release/quake2 : LDFLAGS += -lGL
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE), FreeBSD)
|
||||
release/quake2 : LDFLAGS += -Wl,-z,origin,-rpath='$$ORIGIN/lib'
|
||||
|
@ -485,7 +425,7 @@ ifeq ($(WITH_ZIP),yes)
|
|||
release/q2ded.exe : CFLAGS += -DZIP -DNOUNCRYPT
|
||||
release/q2ded.exe : LDFLAGS += -lz
|
||||
endif
|
||||
else
|
||||
else # not Windows
|
||||
server:
|
||||
@echo "===> Building q2ded"
|
||||
${Q}mkdir -p release
|
||||
|
@ -519,7 +459,7 @@ build/baseq2/%.o: %.c
|
|||
${Q}$(CC) -c $(CFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
release/baseq2/game.dll : LDFLAGS += -shared
|
||||
else
|
||||
else # not Windows
|
||||
game:
|
||||
@echo "===> Building baseq2/game.so"
|
||||
${Q}mkdir -p release/baseq2
|
||||
|
@ -683,10 +623,6 @@ CLIENT_OBJS_ += \
|
|||
src/backends/unix/shared/hunk.o
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE), Darwin)
|
||||
CLIENT_OBJS_ += src/backends/sdl_osx/SDLMain.o
|
||||
endif
|
||||
|
||||
# ----------
|
||||
|
||||
# Used by the server
|
||||
|
@ -726,7 +662,7 @@ SERVER_OBJS_ += \
|
|||
src/backends/windows/network.o \
|
||||
src/backends/windows/system.o \
|
||||
src/backends/windows/shared/mem.o
|
||||
else
|
||||
else # not Windows
|
||||
SERVER_OBJS_ += \
|
||||
src/backends/unix/main.o \
|
||||
src/backends/unix/network.o \
|
||||
|
|
|
@ -31,12 +31,8 @@
|
|||
#ifndef _QAL_API_H_
|
||||
#define _QAL_API_H_
|
||||
|
||||
#if defined (__APPLE__)
|
||||
#include <OpenAL/al.h>
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/efx.h>
|
||||
#endif
|
||||
|
||||
/* Function pointers used to tie
|
||||
* the qal API to the OpenAL API */
|
||||
|
@ -113,12 +109,10 @@ extern LPALDOPPLERFACTOR qalDopplerFactor;
|
|||
extern LPALDOPPLERVELOCITY qalDopplerVelocity;
|
||||
extern LPALSPEEDOFSOUND qalSpeedOfSound;
|
||||
extern LPALDISTANCEMODEL qalDistanceModel;
|
||||
#if !defined (__APPLE__)
|
||||
extern LPALGENFILTERS qalGenFilters;
|
||||
extern LPALFILTERI qalFilteri;
|
||||
extern LPALFILTERF qalFilterf;
|
||||
extern LPALDELETEFILTERS qalDeleteFilters;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Gives information over the OpenAL
|
||||
|
|
|
@ -32,14 +32,9 @@
|
|||
|
||||
#ifdef USE_OPENAL
|
||||
|
||||
#if defined (__APPLE__)
|
||||
#include <OpenAL/al.h>
|
||||
#include <OpenAL/alc.h>
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#include <AL/alext.h>
|
||||
#endif
|
||||
|
||||
#include "../../common/header/common.h"
|
||||
#include "../../client/sound/header/local.h"
|
||||
|
@ -148,12 +143,10 @@ LPALDOPPLERFACTOR qalDopplerFactor;
|
|||
LPALDOPPLERVELOCITY qalDopplerVelocity;
|
||||
LPALSPEEDOFSOUND qalSpeedOfSound;
|
||||
LPALDISTANCEMODEL qalDistanceModel;
|
||||
#if !defined (__APPLE__)
|
||||
LPALGENFILTERS qalGenFilters;
|
||||
LPALFILTERI qalFilteri;
|
||||
LPALFILTERF qalFilterf;
|
||||
LPALDELETEFILTERS qalDeleteFilters;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Gives information over the OpenAL
|
||||
|
@ -324,12 +317,10 @@ QAL_Shutdown()
|
|||
qalDopplerVelocity = NULL;
|
||||
qalSpeedOfSound = NULL;
|
||||
qalDistanceModel = NULL;
|
||||
#if !defined (__APPLE__)
|
||||
qalGenFilters = NULL;
|
||||
qalFilteri = NULL;
|
||||
qalFilterf = NULL;
|
||||
qalDeleteFilters = NULL;
|
||||
#endif
|
||||
|
||||
/* Unload the shared lib */
|
||||
Sys_FreeLibrary(handle);
|
||||
|
@ -494,7 +485,6 @@ QAL_Init()
|
|||
return false;
|
||||
}
|
||||
|
||||
#if !defined (__APPLE__)
|
||||
if (qalcIsExtensionPresent(device, "ALC_EXT_EFX") != AL_FALSE) {
|
||||
qalGenFilters = qalGetProcAddress("alGenFilters");
|
||||
qalFilteri = qalGetProcAddress("alFilteri");
|
||||
|
@ -506,7 +496,6 @@ QAL_Init()
|
|||
qalFilterf = NULL;
|
||||
qalDeleteFilters = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
Com_Printf("ok\n");
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "../../common/header/common.h"
|
||||
#include "header/unix.h"
|
||||
|
||||
#if defined(__APPLE__) && !defined(DEDICATED_ONLY)
|
||||
#if !defined(DEDICATED_ONLY)
|
||||
#include <SDL/SDL.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -54,12 +54,7 @@ qboolean streamPlaying;
|
|||
static ALuint s_srcnums[MAX_CHANNELS - 1];
|
||||
static ALuint streamSource;
|
||||
static int s_framecount;
|
||||
|
||||
/* Apple crappy OpenAL implementation
|
||||
has no support for filters. */
|
||||
#ifndef __APPLE__
|
||||
static ALuint underwaterFilter;
|
||||
#endif
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
||||
|
@ -661,7 +656,6 @@ AL_Update(void)
|
|||
void
|
||||
AL_Underwater()
|
||||
{
|
||||
#if !defined (__APPLE__)
|
||||
int i;
|
||||
|
||||
if (sound_started != SS_OAL)
|
||||
|
@ -677,7 +671,6 @@ AL_Underwater()
|
|||
{
|
||||
qalSourcei(s_srcnums[i], AL_DIRECT_FILTER, underwaterFilter);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -686,7 +679,6 @@ AL_Underwater()
|
|||
void
|
||||
AL_Overwater()
|
||||
{
|
||||
#if !defined (__APPLE__)
|
||||
int i;
|
||||
|
||||
if (sound_started != SS_OAL)
|
||||
|
@ -702,7 +694,6 @@ AL_Overwater()
|
|||
{
|
||||
qalSourcei(s_srcnums[i], AL_DIRECT_FILTER, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------- */
|
||||
|
@ -728,7 +719,6 @@ AL_InitStreamSource()
|
|||
static void
|
||||
AL_InitUnderwaterFilter()
|
||||
{
|
||||
#if !defined (__APPLE__)
|
||||
underwaterFilter = 0;
|
||||
|
||||
if (!(qalGenFilters && qalFilteri && qalFilterf && qalDeleteFilters))
|
||||
|
@ -756,7 +746,6 @@ AL_InitUnderwaterFilter()
|
|||
|
||||
s_underwater->modified = true;
|
||||
s_underwater_gain_hf->modified = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -817,10 +806,7 @@ AL_Init(void)
|
|||
|
||||
s_numchannels = i;
|
||||
AL_InitStreamSource();
|
||||
|
||||
#ifndef __APPLE__
|
||||
AL_InitUnderwaterFilter();
|
||||
#endif
|
||||
|
||||
Com_Printf("Number of OpenAL sources: %d\n\n", s_numchannels);
|
||||
return true;
|
||||
|
@ -837,9 +823,8 @@ AL_Shutdown(void)
|
|||
AL_StreamDie();
|
||||
|
||||
qalDeleteSources(1, &streamSource);
|
||||
#if !defined (__APPLE__)
|
||||
qalDeleteFilters(1, &underwaterFilter);
|
||||
#endif
|
||||
|
||||
if (s_numchannels)
|
||||
{
|
||||
/* delete source names */
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue