Improve platform support metadata#71
Merged
Merged
Conversation
Introduce platform build metadata and automation plus a platformCapabilities.h to centralize platform-specific feature flags. - Add .github/platform-builds.json and PLATFORM_SUPPORT.md to list and document supported platforms and release/CI metadata. - Add scripts/generate_platform_support.py to validate platform metadata and emit GitHub Actions matrices and release asset mappings. - Replace many per-platform #ifdefs with centralized macros in src/platformCapabilities.h and update source files to use those macros (audio, video, controller, logging, file, system, etc.). - Add reusable workflow .github/workflows/build-platform.yml and update CI/release workflows to generate platform matrices, run platform build jobs, and upload release assets using the generated metadata. - Add PS2 helper scripts (ps2/ci-prepare.sh, ps2/ci-build.sh) and update various source files to use the new capability macros. This refactors platform-specific conditionals into a single header, improves CI/release automation, and provides tooling to keep documentation and workflows in sync.
Remove legacy platformCapabilities and conditionals headers and introduce a new platform abstraction (platform.h / platform.c). Update source files to include platform.h and call platform_* functions (file, logging, audio, system, controller/video helpers) instead of relying on macros from platformCapabilities.h; add platform.c to projects (Xcode/CMake). The change centralizes platform-specific behavior into runtime functions, updates macOS Xcode project references, and adjusts vita CMakeLists to compile src/platform.c. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce a prepareWritableFilePath() stub and a generic openResolvedFile() helper to consolidate readonly/writable file opening logic. Replace duplicated openReadonlyFile/openWritableFile implementations with calls to openResolvedFile and ensure writable path preparation is invoked before opening writable files. This cleans up platform-specific branches and centralizes path resolution.
Add .github/platform-builds.schema.json and update .github/platform-builds.json to rely on schema defaults (remove repeated fields). Update scripts/generate_platform_support.py to load the schema, apply defaults, and validate input against the schema before existing validation. Also add __pycache__/ to .gitignore.
Remove the deprecated readme_note field and its usage. Update .github/platform-builds.json to drop readme_note entries and .github/platform-builds.schema.json to remove the readme_note schema. Simplify scripts/generate_platform_support.py by deleting README-related helpers and the README summary rendering/validation logic so the script only generates PLATFORM_SUPPORT.md.
Remove display_order and status_note fields from platform schema and platform list; reorder and expand .github/platform-builds.json with new platforms (windows-x86_64, ps2, nds, 3ds) and updated CI fields; adjust PLATFORM_SUPPORT.md to match the generated output; simplify scripts/generate_platform_support.py to stop validating/display-order and status_note and to iterate platforms without sorting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename and unify platform window functions (platformSdl1*/platformSdl2* -> platformSDLWindowWidth/Height/Flags), consolidate SDL2/SDL1 platform-specific logic into those functions, and update sdl1/sdl2 video callers. Move audio buffer comment block from sdl_common/audio.c into platform.c near platformGetAudioSettings and remove duplicate implementations. This cleans up platform abstractions and centralizes platform-specific window/audio notes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
Notes