Skip to content

Improve platform support metadata#71

Merged
sergiou87 merged 10 commits into
masterfrom
improve-many-platforms-support
Mar 21, 2026
Merged

Improve platform support metadata#71
sergiou87 merged 10 commits into
masterfrom
improve-many-platforms-support

Conversation

@sergiou87

@sergiou87 sergiou87 commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • add metadata-driven platform support documentation and build/release matrices
  • refactor GitHub Actions to use reusable workflows and generated platform automation data

Validation

  • python3 scripts/generate_platform_support.py --check
  • ./tests/ci-build.sh
  • ./tests/run-tests.rb ./OpenSupaplex-tests/OpenSupaplex

Notes

  • PlayStation 2 support remains in-tree but is still documented as local-toolchain-only and not wired into CI/release automation.

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.
@sergiou87 sergiou87 changed the title Improve platform support metadata and centralize platform runtime logic Improve platform support metadata Mar 21, 2026
@sergiou87 sergiou87 enabled auto-merge (rebase) March 21, 2026 10:04
@sergiou87 sergiou87 merged commit fddd13d into master Mar 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant