From 4b429b9fa71dfc5b1688e3f87620341d5f67c0f4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 16 Jan 2025 16:21:18 -0800
Subject: [PATCH] Updated README-platforms.md
Also added platform specific README files
---
docs/README-bsd.md | 6 ++++++
docs/README-cmake.md | 13 ++++++-------
docs/README-haiku.md | 4 ++++
docs/README-platforms.md | 42 +++++++++++++++++++++++++++++++++++-----
docs/README-ps4.md | 3 +++
docs/README-ps5.md | 3 +++
docs/README-steamos.md | 10 ++++++++++
docs/README-switch.md | 3 +++
docs/README.md | 22 +++------------------
9 files changed, 75 insertions(+), 31 deletions(-)
create mode 100644 docs/README-bsd.md
create mode 100644 docs/README-haiku.md
create mode 100644 docs/README-ps4.md
create mode 100644 docs/README-ps5.md
create mode 100644 docs/README-steamos.md
create mode 100644 docs/README-switch.md
diff --git a/docs/README-bsd.md b/docs/README-bsd.md
new file mode 100644
index 0000000000000..d823060d6f190
--- /dev/null
+++ b/docs/README-bsd.md
@@ -0,0 +1,6 @@
+# FreeBSD / OpenBSD / NetBSD
+
+SDL is fully supported on BSD platforms, and is built using [CMake](README-cmake.md).
+
+If you want to run on the console, you can take a look at [KMSDRM support on BSD](README-kmsbsd.md)
+
diff --git a/docs/README-cmake.md b/docs/README-cmake.md
index 2c29020314bb6..f2e4759cdca81 100644
--- a/docs/README-cmake.md
+++ b/docs/README-cmake.md
@@ -2,23 +2,22 @@
[www.cmake.org](https://www.cmake.org/)
-The CMake build system is supported on the following platforms:
+The CMake build system is supported with the following environments:
+* Android
+* Emscripten
* FreeBSD
+* Haiku
* Linux
+* macOS, iOS, tvOS, and visionOS with support for XCode
* Microsoft Visual Studio
* MinGW and Msys
-* macOS, iOS, tvOS, and visionOS with support for XCode
-* Android
-* Emscripten
* NetBSD
-* Haiku
* Nintendo 3DS
* PlayStation 2
* PlayStation Portable
* PlayStation Vita
-* QNX 7.x/8.x
-* RiscOS
+* RISC OS
## Building SDL on Windows
diff --git a/docs/README-haiku.md b/docs/README-haiku.md
new file mode 100644
index 0000000000000..960bc3c7c4e23
--- /dev/null
+++ b/docs/README-haiku.md
@@ -0,0 +1,4 @@
+# Haiku OS
+
+SDL is fully supported on Haiku OS, and is built using [CMake](README-cmake.md).
+
diff --git a/docs/README-platforms.md b/docs/README-platforms.md
index 14454ec5d5c46..77ae411d27385 100644
--- a/docs/README-platforms.md
+++ b/docs/README-platforms.md
@@ -1,8 +1,40 @@
-Platforms
-=========
+# Platforms
-We maintain the list of supported platforms on our wiki now, and how to
-build and install SDL for those platforms:
+## Supported Platforms
- https://wiki.libsdl.org/Installation
+- [Android](README-android.md)
+- [Emscripten](README-emscripten.md)
+- [FreeBSD](README-bsd.md)
+- [Haiku OS](README-haiku.md)
+- [iOS](README-ios.md)
+- [Linux](README-linux.md)
+- [macOS](README-macos.md)
+- [NetBSD](README-bsd.md)
+- [Nintendo Switch](README-switch.md)
+- [Nintendo 3DS](README-3ds.md)
+- [OpenBSD](README-bsd.md)
+- [PlayStation 2](README-ps2.md)
+- [PlayStation 4](README-ps4.md)
+- [PlayStation 5](README-ps5.md)
+- [PlayStation Portable](README-psp.md)
+- [PlayStation Vita](README-vita.md)
+- [RISC OS](README-riscos.md)
+- [SteamOS](README-steamos.md)
+- [tvOS](README-ios.md)
+- [Windows](README-windows.md)
+- [Windows GDK](README-gdk.md)
+- [Xbox](README-gdk.md)
+## Unsupported Platforms
+
+If your favorite system is listed below, we aren't working on it. However, if you send reasonable patches and are willing to support the port in the long term, we are happy to take a look!
+
+All of these still work with [SDL2](/SDL2), which is an incompatible API, but an option if you need to support these platforms still.
+
+- Google Stadia
+- NaCL
+- Nokia N-Gage
+- OS/2
+- QNX
+- WinPhone
+- WinRT/UWP
diff --git a/docs/README-ps4.md b/docs/README-ps4.md
new file mode 100644
index 0000000000000..29b5a939b3c5c
--- /dev/null
+++ b/docs/README-ps4.md
@@ -0,0 +1,3 @@
+# Sony PlayStation 4
+
+SDL3 runs on the PS4! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for PlayStation development with Sony. Please contact Ryan (icculus at icculus dot org) for details.
diff --git a/docs/README-ps5.md b/docs/README-ps5.md
new file mode 100644
index 0000000000000..55470d43b7457
--- /dev/null
+++ b/docs/README-ps5.md
@@ -0,0 +1,3 @@
+# Sony PlayStation 5
+
+SDL3 runs on the PS5! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for PlayStation development with Sony. Please contact Ryan (icculus at icculus dot org) for details.
diff --git a/docs/README-steamos.md b/docs/README-steamos.md
new file mode 100644
index 0000000000000..0feab9a40ac94
--- /dev/null
+++ b/docs/README-steamos.md
@@ -0,0 +1,10 @@
+# SteamOS
+
+SteamOS is literally a Linux system, and uses the same binaries you distribute to generic Linux Steam users, so generally speaking, all the other [Linux advice](README-linux.md) applies.
+
+If you are shipping a Linux game on Steam, or explicitly targeting SteamOS, the system is guaranteed to provide SDL. The Steam Client will set up the dynamic loader path so that a known-good copy of SDL is available to any program that needs it before launching a game. Steam provides all major versions of SDL to date, in this manner, for both x86 and amd64, in addition to several add-on libraries like `SDL_image` and `SDL_mixer`. When shipping a Linux game on Steam, do not ship a build of SDL with your game. Link against SDL as normal, and expect it to be available on the player's system. This allows Valve to make fixes and improvements to their SDL and those fixes to flow on to your game.
+
+We are obsessive about SDL3 having a backwards-compatible ABI. Whether you build your game using the Steam Runtime SDK or just about any other copy of SDL, it _should_ work with the one that ships with Steam.
+
+In fact, it's not a bad idea to just copy the SDL build out of the Steam Runtime if you plan to ship a Linux game for non-Steam platforms, too, since you know it's definitely well-built.
+
diff --git a/docs/README-switch.md b/docs/README-switch.md
new file mode 100644
index 0000000000000..16b7acd1f1e47
--- /dev/null
+++ b/docs/README-switch.md
@@ -0,0 +1,3 @@
+# Nintendo Switch
+
+SDL3 runs on the Nintendo Switch! There are commercial games shipping with this port. This port is kept in a separate repository, but is available for free, under the zlib license, to anyone that is under NDA for Switch development with Nintendo. Please contact Ryan (icculus at icculus dot org) for details.
diff --git a/docs/README.md b/docs/README.md
index 922fe64bbc662..d0f5a5409481d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -7,8 +7,7 @@ to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware. It is used by video playback software, emulators, and popular games
including Valve's award winning catalog and many Humble Bundle games.
-SDL officially supports Windows, macOS, Linux, iOS, and Android.
-Support for other platforms may be found in the source code.
+SDL officially supports Windows, macOS, Linux, iOS, Android, Xbox, PlayStation 4/5, Nintendo Switch, and many other platforms.
SDL is written in C, works natively with C++, and there are bindings
available for several other languages, including C# and Python.
@@ -24,28 +23,13 @@ The header files and test programs are well commented and always up to date.
Information on reporting bugs and contributing is available in [README-contributing.md](README-contributing.md)
-More documentation and FAQs are available online at [the wiki](http://wiki.libsdl.org/)
+More documentation and FAQs are available online at the [wiki](http://wiki.libsdl.org/)
- [Migrating from SDL 2.0](README-migration.md)
-- [Supported Platforms](README-platforms.md)
- [main()](README-main-functions.md)
- [High DPI Support](README-highdpi.md)
- [Touch](README-touch.md)
-- [Versions](README-versions.md)
-
-- [Android](README-android.md)
-- [Emscripten](README-emscripten.md)
-- [iOS](README-ios.md)
-- [KMSDRM support on BSD](README-kmsbsd.md)
-- [Linux](README-linux.md)
-- [macOS](README-macos.md)
-- [Nintendo 3DS](README-n3ds.md)
-- [PS2](README-ps2.md)
-- [PSP](README-psp.md)
-- [PSVita](README-vita.md)
-- [RISC OS](README-riscos.md)
-- [Windows GDK](README-gdk.md)
-- [Windows](README-windows.md)
+- [Supported platforms](README-platforms.md)
- [Porting information](README-porting.md)
If you need help with the library, or just want to discuss SDL related