Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Apr 2, 2023
2 parents c01ebe6 + 74e6d7e commit bc30b78
Show file tree
Hide file tree
Showing 279 changed files with 74,140 additions and 5,130 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

patreon: timedoctor
patreon: nuclearmonster
open_collective: # Replace with a single Open Collective username
ko_fi: jackslater
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Makefile.local
.DS_Store
.LSOverride
Icon?
make-macosx-values.local

# Xcode
####################
Expand Down
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,34 @@ ioquake3 can be developed locally. For instructions on how to do this, see [the

* Fill in [the required template](PULL_REQUEST_TEMPLATE.md)
* Do not include issue numbers in the PR title.


### Building Official Installers

This is a reminder for how official installers should be built:

* Please include the id patch pk3s in your installer, which are available
from http://ioquake3.org/patch-data/ subject to agreement to the id
EULA. Your installer shall also ask the user to agree to this EULA (which
is in the /web/include directory for your convenience) and subsequently
refuse to continue the installation of the patch pk3s and pak0.pk3 if they
do not.

* Please don't require pak0.pk3, since not everyone using the engine
plans on playing Quake 3 Arena on it. It's fine to (optionally) assist the
user in copying the file or tell them how.

* It is fine to just install the binaries without requiring id EULA agreement,
providing pak0.pk3 and the patch pk3s are not referred to or included in the
installer.

* Please include at least a libSDL2 so/dylib/dll on every platform.

* Please include an OpenAL so/dylib/dll, since every platform should be using
it by now.

* Please be prepared to alter your installer on the whim of the maintainers.

* Your installer will be mirrored to an "official" directory, thus making it
a done deal.

124 changes: 106 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')

#arm64 hack!
ifeq ($(shell uname -m), arm64)
COMPILE_ARCH=arm64
endif
ifeq ($(shell uname -m), aarch64)
COMPILE_ARCH=arm64
endif

ifeq ($(COMPILE_PLATFORM),sunos)
# Solaris uname and GNU uname differ
COMPILE_ARCH=$(shell uname -p | sed -e 's/i.86/x86/')
Expand Down Expand Up @@ -453,7 +461,34 @@ ifeq ($(PLATFORM),darwin)

# Default minimum Mac OS X version
ifeq ($(MACOSX_VERSION_MIN),)
MACOSX_VERSION_MIN=10.7
MACOSX_VERSION_MIN=10.9
ifneq ($(findstring $(ARCH),ppc ppc64),)
MACOSX_VERSION_MIN=10.5
endif
ifeq ($(ARCH),x86)
MACOSX_VERSION_MIN=10.6
endif
ifeq ($(ARCH),x86_64)
# trying to find default SDK version is hard
# macOS 10.15 requires -sdk macosx but 10.11 doesn't support it
# macOS 10.6 doesn't have -show-sdk-version
DEFAULT_SDK=$(shell xcrun -sdk macosx -show-sdk-version 2> /dev/null)
ifeq ($(DEFAULT_SDK),)
DEFAULT_SDK=$(shell xcrun -show-sdk-version 2> /dev/null)
endif
ifeq ($(DEFAULT_SDK),)
$(error Error: Unable to determine macOS SDK version. On macOS 10.6 to 10.8 run: make MACOSX_VERSION_MIN=10.6 On macOS 10.9 or later run: make MACOSX_VERSION_MIN=10.9 );
endif

ifneq ($(findstring $(DEFAULT_SDK),10.6 10.7 10.8),)
MACOSX_VERSION_MIN=10.6
else
MACOSX_VERSION_MIN=10.9
endif
endif
ifeq ($(ARCH),arm64)
MACOSX_VERSION_MIN=11.0
endif
endif

MACOSX_MAJOR=$(shell echo $(MACOSX_VERSION_MIN) | cut -d. -f1)
Expand All @@ -470,6 +505,11 @@ ifeq ($(PLATFORM),darwin)
BASE_CFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) \
-DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED)

MACOSX_ARCH=$(ARCH)
ifeq ($(ARCH),x86)
MACOSX_ARCH=i386
endif

ifeq ($(ARCH),ppc)
BASE_CFLAGS += -arch ppc
ALTIVEC_CFLAGS = -faltivec
Expand All @@ -488,6 +528,10 @@ ifeq ($(PLATFORM),darwin)
OPTIMIZEVM += -mfpmath=sse
BASE_CFLAGS += -arch x86_64
endif
ifeq ($(ARCH),arm64)
# HAVE_VM_COMPILED=false # TODO: implement compiled vm
BASE_CFLAGS += -arch arm64
endif

# When compiling on OSX for OSX, we're not cross compiling as far as the
# Makefile is concerned, as target architecture is specified as a compiler
Expand All @@ -497,19 +541,40 @@ ifeq ($(PLATFORM),darwin)
endif

ifeq ($(CROSS_COMPILING),1)
ifeq ($(ARCH),x86_64)
CC=x86_64-apple-darwin13-cc
RANLIB=x86_64-apple-darwin13-ranlib
else
ifeq ($(ARCH),x86)
CC=i386-apple-darwin13-cc
RANLIB=i386-apple-darwin13-ranlib
else
$(error Architecture $(ARCH) is not supported when cross compiling)
# If CC is already set to something generic, we probably want to use
# something more specific
ifneq ($(findstring $(strip $(CC)),cc gcc),)
CC=
endif

ifndef CC
ifndef DARWIN
# macOS 10.9 SDK
DARWIN=13
ifneq ($(findstring $(ARCH),ppc ppc64),)
# macOS 10.5 SDK, though as of writing osxcross doesn't support ppc/ppc64
DARWIN=9
endif
ifeq ($(ARCH),arm64)
# macOS 11.3 SDK
DARWIN=20.4
endif
endif

CC=$(MACOSX_ARCH)-apple-darwin$(DARWIN)-cc
RANLIB=$(MACOSX_ARCH)-apple-darwin$(DARWIN)-ranlib
LIPO=$(MACOSX_ARCH)-apple-darwin$(DARWIN)-lipo

ifeq ($(call bin_path, $(CC)),)
$(error Unable to find osxcross $(CC))
endif
endif
endif

ifndef LIPO
LIPO=lipo
endif

BASE_CFLAGS += -fno-strict-aliasing -fno-common -pipe

ifeq ($(USE_OPENAL),1)
Expand All @@ -534,20 +599,39 @@ ifeq ($(PLATFORM),darwin)
RENDERER_LIBS += -framework OpenGL

ifeq ($(USE_LOCAL_HEADERS),1)
# libSDL2-2.0.0.dylib for PPC is SDL 2.0.1 + changes to compile
ifneq ($(findstring $(ARCH),ppc ppc64),)
BASE_CFLAGS += -I$(SDLHDIR)/include-macppc
else
ifeq ($(shell test $(MAC_OS_X_VERSION_MIN_REQUIRED) -ge 1090; echo $$?),0)
# Universal Binary 2 - for running on macOS 10.9 or later
# x86_64 (10.9 or later), arm64 (11.0 or later)
MACLIBSDIR=$(LIBSDIR)/macosx-ub2
BASE_CFLAGS += -I$(SDLHDIR)/include
else
# Universal Binary - for running on Mac OS X 10.5 or later
# ppc (10.5/10.6), x86 (10.6 or later), x86_64 (10.6 or later)
#
# x86/x86_64 on 10.5 will run the ppc build.
#
# SDL 2.0.1, last with Mac OS X PowerPC
# SDL 2.0.4, last with Mac OS X 10.5 (x86/x86_64)
# SDL 2.0.22, last with Mac OS X 10.6 (x86/x86_64)
#
# code/libs/macosx-ub/libSDL2-2.0.0.dylib contents
# - ppc build is SDL 2.0.1 with a header change so it compiles
# - x86/x86_64 build are SDL 2.0.22
MACLIBSDIR=$(LIBSDIR)/macosx-ub
ifneq ($(findstring $(ARCH),ppc ppc64),)
BASE_CFLAGS += -I$(SDLHDIR)/include-macppc
else
BASE_CFLAGS += -I$(SDLHDIR)/include-2.0.22
endif
endif

# We copy sdlmain before ranlib'ing it so that subversion doesn't think
# the file has been modified by each build.
LIBSDLMAIN=$(B)/libSDL2main.a
LIBSDLMAINSRC=$(LIBSDIR)/macosx/libSDL2main.a
CLIENT_LIBS += $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
RENDERER_LIBS += $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
CLIENT_EXTRA_FILES += $(LIBSDIR)/macosx/libSDL2-2.0.0.dylib
LIBSDLMAINSRC=$(MACLIBSDIR)/libSDL2main.a
CLIENT_LIBS += $(MACLIBSDIR)/libSDL2-2.0.0.dylib
RENDERER_LIBS += $(MACLIBSDIR)/libSDL2-2.0.0.dylib
CLIENT_EXTRA_FILES += $(MACLIBSDIR)/libSDL2-2.0.0.dylib
else
BASE_CFLAGS += -I/Library/Frameworks/SDL2.framework/Headers
CLIENT_LIBS += -framework SDL2
Expand Down Expand Up @@ -2256,7 +2340,11 @@ endif
ifneq ($(strip $(LIBSDLMAIN)),)
ifneq ($(strip $(LIBSDLMAINSRC)),)
$(LIBSDLMAIN) : $(LIBSDLMAINSRC)
ifeq ($(PLATFORM),darwin)
$(LIPO) -extract $(MACOSX_ARCH) $< -o $@
else
cp $< $@
endif
$(RANLIB) $@
endif
endif
Expand Down
65 changes: 23 additions & 42 deletions README-ioq3.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ The original id software readme that accompanied the Q3 source release has been
renamed to id-readme.txt so as to prevent confusion. Please refer to the
website for updated status.

More documentation including a Player's Guide and Sysadmin Guide is on:
http://wiki.ioquake3.org/
More documentation including a Player's Guide and Sysadmin Guide are on:
https://ioquake3.org/help/

If you've got issues that you aren't sure are worth filing as bugs, or just
want to chat, please visit our forums:
http://discourse.ioquake.org
https://discourse.ioquake.org

# Thank You:

Expand All @@ -66,7 +66,11 @@ http://discourse.ioquake.org
<a href="https://icculus.org/">icculus dot org<br/>
<img src="http://icculus.org/icculus-org-now.png" width="300px"></a>
</p>

---
<p>
<a href="https://nuclearmonster.com/">Nuclear Monster<br/>
<img src="https://user-images.githubusercontent.com/903791/152968830-dd08737b-55c6-4ac6-9610-31121ea0e8c6.png" width="300px"></a>
</p>

# Compilation and installation

Expand All @@ -76,15 +80,23 @@ For *nix

For Windows,
1. Please refer to the excellent instructions here:
http://wiki.ioquake3.org/Building_ioquake3
https://ioquake3.org/help/building-ioquake3/

For Mac OS X, building a Universal Binary
For macOS, building a Universal Binary (macOS 10.5 to 10.8, x86_64, x86, ppc)
1. Install MacOSX SDK packages from XCode. For maximum compatibility,
install MacOSX10.4u.sdk and MacOSX10.3.9.sdk, and MacOSX10.2.8.sdk.
install MacOSX10.5.sdk and MacOSX10.6.sdk.
2. Change to the directory containing this README file.
3. Run './make-macosx-ub.sh'
4. Copy the resulting ioquake3.app in /build/release-darwin-ub to your
/Applications/ioquake3 folder.
4. Copy the resulting ioquake3.app in /build/release-darwin-universal
to your /Applications/ioquake3 folder.

For macOS, building a Universal Binary 2 (macOS 10.9+, arm64, x86_64)
1. Install MacOSX SDK packages from XCode. Building for arm64 requires
MacOSX11.sdk or later.
2. Change to the directory containing this README file.
3. Run './make-macosx-ub2.sh'
4. Copy the resulting ioquake3.app in /build/release-darwin-universal2
to your /Applications/ioquake3 folder.

Installation, for *nix
1. Set the COPYDIR variable in the shell to be where you installed Quake 3
Expand Down Expand Up @@ -139,6 +151,7 @@ Makefile.local:
USE_INTERNAL_JPEG - build and link against internal JPEG library
USE_INTERNAL_OGG - build and link against internal ogg library
USE_INTERNAL_OPUS - build and link against internal opus/opusfile libraries
USE_INTERNAL_VORBIS - build and link against internal Vorbis library
USE_LOCAL_HEADERS - use headers local to ioq3 instead of system ones
DEBUG_CFLAGS - C compiler flags to use for building debug version
COPYDIR - the target installation directory
Expand Down Expand Up @@ -519,38 +532,6 @@ and provide players with the same Quake 3 experience they've had for years.
We do have graphical improvements with the new renderer, but they are off by default.
See opengl2-readme.md for more information.

# Building Official Installers

We need help getting automated installers on all the platforms that ioquake3
supports. We don't necessarily care about all the installers being identical,
but we have some general guidelines:

* Please include the id patch pk3s in your installer, which are available
from http://ioquake3.org/patch-data/ subject to agreement to the id
EULA. Your installer shall also ask the user to agree to this EULA (which
is in the /web/include directory for your convenience) and subsequently
refuse to continue the installation of the patch pk3s and pak0.pk3 if they
do not.

* Please don't require pak0.pk3, since not everyone using the engine
plans on playing Quake 3 Arena on it. It's fine to (optionally) assist the
user in copying the file or tell them how.

* It is fine to just install the binaries without requiring id EULA agreement,
providing pak0.pk3 and the patch pk3s are not referred to or included in the
installer.

* Please include at least a libSDL2 so/dylib/dll on every platform.

* Please include an OpenAL so/dylib/dll, since every platform should be using
it by now.

* Please be prepared to alter your installer on the whim of the maintainers.

* Your installer will be mirrored to an "official" directory, thus making it
a done deal.


# Credits

Maintainers
Expand All @@ -560,7 +541,7 @@ Maintainers
* Thilo Schulz <arny@ats.s.bawue.de>
* Tim Angus <tim@ngus.net>
* Tony J. White <tjw@tjw.org>
* Zachary J. Slater <zachary@ioquake.org>
* Jack Slater <jack@ioquake.org>
* Zack Middleton <zturtleman@gmail.com>

Significant contributions from
Expand Down
Loading

0 comments on commit bc30b78

Please sign in to comment.