This enables several things:
* Optionally load pk3 files from a web server at runtime instead of bundling them with Emscripten at build time
* Set command line arguments via URL param
* It's not ugly
emscripten 3.1.27 reduced the stack size from 5MB to 64KB. This caused
run-time errors: Uncaught RuntimeError: index out of bounds
Co-authored-by: James Darpinian <jdarpinian@gmail.com>
The QVM interpreter works on all platforms. If building QVMs is an
issue, that should probably be handled separate from whether there
is a QVM JIT compiler.
This enables building QVMs by default on Linux arm64.
Fix crash when scrolling using touchpad on macOS 10.6 (I fixed it
in SDL 2.0.18) and fix failing to start on x86 due to ioq3 SDL dylib
having absolute path instead of "@executable_path/libSDL2-2.0.0.dylib".
SDL 2.24.0 removed macOS 10.6 support (last with x86). Offically at
least, they also dropped x86_64 on macOS 10.7 and 10.8. So ioq3 UB1
is limited to SDL 2.0.22.
- Update x86 and x86_64 to SDL 2.0.22. Compiled with 10.13 SDK as
10.14 SDK dropped running on older than macOS 10.9 and I ran
"strip -x" on the libraries. Ad-hoc signed with PyOxidizer rcodesign.
- PPC is still MAN-AT-ARMS' SDL 2.0.1 build but I ran "strip -x"
on it to reduce the file size.
- ARM64 build was removed from UB1 as UB2 with SDL 2.24.0 should
be used instead.
Update mingw and macOS SDL libraries to 2.24.0. (MSVC .lib files and
Xcode project haven't been updated.)
There is now a separate SDL dylib for macOS Universal Binary 1 and 2
because SDL 2.24.0 dropped support for macOS 10.6 (which is last to
support x86). Documentation says SDL 2.24.0 also dropped macOS 10.7
and 10.8 too. So UB2 is now 10.9 or later while 10.5 to 10.8 live in
UB1.
Compiled using osxcross with macOS 11.3 SDK. Ran "strip -x" on Windows
and macOS libraries. Ad-hoc signed dylib using PyOxidizer rcodesign to
fix digest checksums after strip.
ranlib errors on older macOS because of arm64 arch in code/libs/macosx/-
libSDL2main.a. Use lipo to extract the library for the specific arch
that is being linked.
Fix "Architecture arm64 is not supported when cross compiling" and
also be more be more flexible for manually specifying CC or the
osxcross darwin version (which corresponds with a macOS SDK version
to build against).
- Reorganized Xcode project
- Added missionpack support to Xcode project
- Incorporated changes from MaddTheSane for Apple Silicon support https://github.com/maddthesane/ioq3
- Built SDL 2.0.14 for Apple Siicon, added to existing SDL dylib
- Built SDLMain for Apple Silicon, added to existing libSDL2main.a
This is one of the de facto standard interfaces used in Linux
distributions for cross-compilation (alongside overriding CC and
similar variables), and in particular is used in Debian and its
derivatives.
Signed-off-by: Simon McVittie <smcv@debian.org>
Moved all the code using Altivec intrinsics to separate files. This
means we can optionally use GCC's -maltivec on just these files, which
are chosen at runtime if the CPU supports Altivec, and compile the rest
without it, making a single binary that has Altivec optimizations but
can still work on G3.
Unlike SSE and similar extensions on x86, there does not seem to be
a way to enable conditional, targeted use of Altivec based on runtime
detection (which is what ioquake3 wants to do) without also giving the
compiler permission to use Altivec in code generation; so to not crash
on CPUs that do not implement Altivec, we'll have to turn it off
altogether, except in translation units that are only entered when
runtime Altivec detection is successful.
This has been tested on Linux PPC (on an Altivec-enabled CPU),
but we may need further work after testing trickles out to other
PowerPC devices and ancient Mac OS X builds.
I did a little work on this patch, but the majority of the effort belongs
to Simon McVittie (thanks!).
code/libs/macosx/libSDL2-2.0.0.dylib has 2.0.8 for x86 and x86_64 and
2.0.1 for PPC. Add 2.0.1 headers for PPC with modifed SDL_platform.h to
allow compiling using macOS 10.5 SDK. Using separate headers allows the
engine to check the SDL version for enabling newer SDL features.
It seems to improve framerate and still work on x86 and x86_64. I
haven't tested ppc64 as I don't have the hardware. ppc64 isn't built
into the universal bundle either.
I noticed this because compiling opus warns it may be slow due to
optimization being disabled.
OpenBSD's sed (and possibly other platforms') interprets `\r` as a
literal `r` rather than a carriage return, which leads to all `r`
letters being stripped from the shaders' source.
This fixes the issue by using the POSIX-compliant `tr -d '\r'` to remove
carriage returns.
Thanks to @ryan-sg for reporting the issue
A race condition can happen when running "make all" with parallel jobs.
The issue is that the build directory can be created by another
concurrent job between the moment it was detected as missing and the
moment mkdir is called (which fails if the directory already exists).
This fixes the problem by always using `mkdir -p` which doesn't fail if
the directory already exists.
SDL_CFLAGS and SDL_LIBS assignment was "only if absent". However due
to previously assigning them to "pkg-config sdl2" values, the values
from sdl2-config were ignored.
Get all OpenGL functions using SDL_GL_GetProcAddress(). This makes it
easier to cross-arch compile on Linux and add support for OpenGL ES
in the future.
Users still have to supply their own libSDL2 for cross-arch compiling
on Linux. But now the user does not have to re-install libgl1-mesa-dev
package for i386 or amd64 on Debian when switching between compiling
ioquake3 for x86 and x86_64.
Fix for ioq3 test builds for Windows x86 (cross-compiled from Ubuntu
using mingw-w64) requiring libgcc_s_sjlj-1.dll. I'm unable to reproduce
the issue using mingw-w64 in Debian or Cygwin.
- Use common controls 6 so error dialogs use correct visuals on
Windows XP or later!
- Specify running as invoker so Windows doesn't guess if it should
prompt for admin permission on Vista or later.
- Specify compatible with Vista through Windows 10. Tells Windows
not to emulate Vista behavior, not sure if it affects anything.
Makefile automatically runs windres when manifest changes.