Commit graph

3438 commits

Author SHA1 Message Date
Zack Middleton
a119e67fb8 nsis: Fix CustomUrlArguments for protocol handler 2023-07-06 05:03:36 -04:00
Zack Middleton
221465f3b4 nsis: Add better descriptions for OpenAL and libcurl 2023-07-06 05:03:36 -04:00
Zack Middleton
5362af3858 nsis: Display ioquake3 version
Display version in the installer and add/remove software.
2023-07-06 05:03:36 -04:00
Zack Middleton
9738176849 nsis: Require installing SDL
It's required to run and unlikely to be installed system wide.
2023-07-06 05:03:36 -04:00
Zack Middleton
efd55cab9d nsis: Remove Speex library
The game doesn't support it anymore.
2023-07-06 05:03:36 -04:00
Zack Middleton
e452b7ac04 Fix macOS client/server failing to start from terminal
The macOS client and server were completely unusable when run from a
terminal. They blocked forever in `[NSApp run];` which was called by
Sys_InitProtocolHandler(). `applicationDidFinishLaunching` was never
called to exit the NSApp run loop.

Use SDL's SDL_DROPFILE event to receive URLs to handle on macOS instead.
This also handles URLs while the game is running (connect to new server)
instead of nothing happening when clicking a link while the game is
running.
2023-06-11 11:05:13 -04:00
Zack Middleton
8b6333fbd3 Update CI actions version
checkout and upload-artifact v2 are deprecated.
2023-06-07 10:23:56 -04:00
Zack Middleton
481372c667 Update CI to macOS 11
macOS 10.15 is not available anymore.
2023-06-07 10:23:56 -04:00
ineed bots
47c9641939 Fix bad client reliableAcknowledge DOS exploit
Having a reliableAcknowledge of 0x7FFFFFFF causes a massive
loop to be executed in SV_UpdateServerCommandsToClient due to the + 1 overflow.
2023-04-19 14:10:29 +01:00
Stefan Sundin
31c6d2f9d5
Add protocol handler support
This lets the user click a link in a web browser to very easily join a Quake 3 multiplayer game. As browser-based matchmaking websites become more popular, this makes it a lot more convenient and simple to play Quake 3 with others.

The links have the following URI format: quake3://connect/example.com:27950. The format has been designed to be flexible to allow more types of links in the future and avoiding having to make a breaking change. At the moment, "connect" is the only supported command.
2023-04-19 13:48:26 +01:00
Jack Slater
23a85089c2
Update SECURITY.md 2023-04-18 17:44:40 -10:00
Tim Angus
dbdd13e89e Update CI to Ubuntu 20.04 2023-04-17 15:05:24 +01:00
Zack Middleton
18f3b6b510 Document USE_INTERNAL_VORBIS in README 2023-04-02 17:13:41 -05:00
Zack Middleton
4610a2403a Update MSVC .lib files to SDL 2.24.0
Built with Visual Studio 2022 with PlatformToolSet v141_xp.
x64 built with TargetName SDL264 / SDL264main to use SDL264.dll.
2023-02-19 13:08:36 -05:00
Zack Middleton
847dfe1211 Fix running make-macosx{,-ub2}.sh on Linux
osxcross doesn't support ppc so it's not possible to compile Universal
Binary 1.
2023-02-19 13:08:36 -05:00
Zack Middleton
819e9830d8 Update macOS UB1 to SDL 2.0.22
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.
2023-02-19 13:08:36 -05:00
Zack Middleton
02a12f2dec Update to SDL 2.24.0 and add separate macOS UB2 dylib
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.
2023-02-19 13:08:36 -05:00
Zack Middleton
70d07d91d6 Fix (disabled) Wavelet sound decompression
The first chunk of Wavelet sound was decoded as ADPCM and then
following chunks were decoded as Wavelet. It played as static
noise.

Using Wavelet compression requires engine code changes to enable.
2022-11-23 12:23:50 -06:00
Zack Middleton
84da6537c4 Fix in_availableJoysticks cvar not updating
When in_restart is called or SDL controller added/remove event is
received, IN_InitJoystick() tried to update the list but instead
of updating the cvar Cvar_Get() just printed a developer message:

  Warning: cvar "in_availableJoysticks" given initial values:
  "first joystick
  ", "first joystick
  second joystick
  "
2022-09-22 10:37:30 -05:00
Zack Middleton
f92c293f7b Add keys for SDL 2.0.14's new gamepad buttons
This fixes the additional buttons triggering binds for ioq3 left
and right joystick direction keys.
2022-09-22 09:18:22 -05:00
kungfooman
29b0cc3a4d vm_x86.c: Add defined(_M_IX86) || defined(_M_X64) (fix for VS2019) 2022-08-18 16:32:19 -04:00
Eugene
6d74896557 More predictable mesh normals generation 2022-03-21 18:07:23 +00:00
Jack Slater
d77a7d4c90 Revert "E2K: fixed build by MCST lcc compiler when using USE_CURL=1 option"
This reverts commit daae32ddfd.
2022-03-10 15:48:14 -08:00
Jack Slater
5630e61ee4 Revert "code/curl: update ifdef condition for MCST-LCC compiler"
This reverts commit 56c83c8a72.
2022-03-10 15:47:57 -08:00
r-a-sattarov
56c83c8a72 code/curl: update ifdef condition for MCST-LCC compiler
in mcst-lcc compiler => 1.25 added a new macro definition to determine compiler
2022-03-10 14:12:06 -05:00
Jack Slater
99b66faa02
Update FUNDING.yml 2022-02-12 00:04:05 -10:00
Jack Slater
5e4e6c1480
Update README.md 2022-02-08 00:28:38 -10:00
Jack Slater
b7abe57d3b some old URL and doc updates
The installer building docs should probably go somewhere else but they don't need to be in the README
2022-02-08 00:19:05 -10:00
Johan Mattsson
c0f29642a4 Fix uninitialized variable 2022-02-05 13:27:42 +00:00
Johan Mattsson
f7b7d48766 Fix hex digit 2022-02-05 13:27:42 +00:00
Johan Mattsson
c2a0a7d986 Fix memset 2022-02-05 13:27:42 +00:00
Mickaël Thomas
84daa28267 Fix memory corruption in S_TransferPaintBuffer
When using a non-default sound configuration (such as 6 channels), after
a long time (about 4.5hours for 6 channels at 22050 Hz) an overflow will
occur in `S_TransferPaintBuffer`, causing an out of bounds write into
the dma buffer.

The problematic line is:
```
out_idx = (s_paintedtime * dma.channels) % dma.samples;
```

With `s_paintedtime` large enough, the result of the multiplication will
overflow to a negative number (since `s_paintedtime` is signed), and the
index into the output buffer will be negative.
2021-12-08 18:46:58 +00:00
Zack Middleton
9543cf24df Fix compiling on older macOS
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.
2021-11-19 15:04:11 -05:00
Zack Middleton
75ae9119e6 Fix passing arguments to VM dylib on Apple M1
The engine function pointer to vmMain used variadic arguments but
the vmMain function in the dylib has explicit arguments. Evidently
the arguments are stored on the stack and/or registers differently.

Found by fretn.
2021-11-19 14:54:59 -05:00
Zack Middleton
68ac81316d Fix error when cross-compiling for macOS arm64 using Makefile
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).
2021-11-06 23:50:20 -04:00
Zack Middleton
7dd90123b7 Make macOS arm64 default to target macOS 11 in Makefile 2021-11-06 23:35:54 -04:00
Zack Middleton
e611fb50b8 Update building for macOS in README 2021-11-06 21:22:16 -04:00
Zack Middleton
fe7325be29 Improve setting Microsoft Store path
Respect configured Program Files directory and use MSSTORE_PATH for
the directory name.
2021-11-06 21:04:06 -04:00
Zack Middleton
d1d5a89aad OpenGL2: GL_DEPTH_TEXTURE_MODE was removed from OpenGL 3.0/Core
GL_DEPTH_TEXTURE_MODE defaults to GL_LUMINANCE. Code sets it here as
part of a workaround old nvidia drivers (apparently? the URL in comment
is dead). GL_DEPTH_TEXTURE_MODE was removed in OpenGL 3.0 / 3.2 Core
contexts and may be treated as an error.
2021-10-23 12:49:48 -04:00
Zack Middleton
1c8b1122c5 Fix being unable to enter Team Arena CD key
The CD key defaulted to spaces. Q3 UI uses text overwrite mode by
default so typing the CD key writes over the spaces. Team Arena UI
uses text insert mode by default so to enter the CD key the user
had to delete the spaces or toggling overwrite mode by pressing
the insert key.

Now the CD key defaults to empty so in Team Arena you can just type
it in.
2021-10-23 08:36:10 -04:00
Zack Middleton
f734a2da9a Print full GL_EXTENSIONS list for OpenGL contexts before 3.0
Printing GL_EXTENSIONS list might be cut off for OpenGL contexts
before 3.0 due to glConfig.extensions_string being a limited length.
Instead get the full extensions list directly.

This was already fixed for OpenGL 3.0 and later contexts.
2021-10-23 07:31:38 -04:00
Zack Middleton
f9ba7c667d OpenGL2: Fix r_grayscale 1 making everything solid black
Using LUMINANCE with OpenGL 3.2 Core contex results in all images being
solid black (in the menu, world, and the console). In the end the whole
screen was solid black except the intro video.

Store images in RGB and RGBA instead. This doesn't affect r_grayscale
visually. If there is issues with it now possibly using compressed
formats, then it would already be an issue for r_grayscale 0.9.
2021-10-23 06:36:45 -04:00
Tom Kidd
de055995d0
Merge pull request #482 from tomkidd/vs2019
Upgrade to build and run from VS2019
2021-10-22 16:38:11 -05:00
Tom Kidd
0b8670411d
Merge pull request #481 from tomkidd/xcode
Upgrades to Xcode project and Apple Silicon support
2021-10-22 16:30:43 -05:00
Tom Kidd
3afe37a896 Modified MS Store path handling to better follow the pattern of Steam/GOG 2021-10-22 11:28:55 -05:00
Tom Kidd
3d06d07516 Addressed PR suggestions 2021-10-22 10:00:20 -05:00
Tom Kidd
294eeb3c1c Updated SDL 2.0.16 headers and Mac version of libraries to fix GitHub actions 2021-10-02 21:54:26 -05:00
Tom Kidd
2fef57fffa Merge remote-tracking branch 'upstream/main' into xcode 2021-10-02 21:30:17 -05:00
Tom Kidd
bc96500fe6 Added missing variable. 2021-10-02 21:24:45 -05:00
Tom Kidd
7533dcd00b Addressed string concatenation issue and added dummy method for Mac/Linux 2021-10-02 21:21:10 -05:00