Skip to content

build(deps): add moonlight-common-c#3

Open
ReenigneArcher wants to merge 5 commits intomasterfrom
build/deps/add-moonlight-common-c
Open

build(deps): add moonlight-common-c#3
ReenigneArcher wants to merge 5 commits intomasterfrom
build/deps/add-moonlight-common-c

Conversation

@ReenigneArcher
Copy link
Copy Markdown
Member

@ReenigneArcher ReenigneArcher commented Oct 20, 2024

Description

This PR depends on changes in enet, moonlight-common-c, and nxdk. Will keep these local to my forks for now, until they are proven out, which will happen in a later PR.

See:

The primary bottleneck for this was that nxdk requires support for ws2_32 and winsock2.h. See: XboxDev/nxdk#453

There were at least two attempts at adding this to nxdk, but both were before changes to their network driver: XboxDev/nxdk#611

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@ReenigneArcher ReenigneArcher force-pushed the build/deps/add-moonlight-common-c branch 2 times, most recently from bf349f5 to a8560a5 Compare October 20, 2024 03:19
@ReenigneArcher ReenigneArcher added the help wanted Extra attention is needed label Oct 20, 2024
@ReenigneArcher ReenigneArcher force-pushed the build/deps/add-moonlight-common-c branch 4 times, most recently from 8166935 to b72ea02 Compare October 30, 2024 01:58
@sonarqubecloud
Copy link
Copy Markdown

@ReenigneArcher
Copy link
Copy Markdown
Member Author

We can possibly patch enet (https://github.com/cgutman/enet/blob/44c85e16279553d9c052e572bcbfcd745fb74abf/include/enet/enet.h#L15-L19) and moonlight-common-c to load Unix code instead of Windows code (https://github.com/moonlight-stream/moonlight-common-c/blob/d3d3e6cf015cd032ce02718246b52aabd1e12294/src/Platform.h#L16-L46)

OR possibly trick cmake into thinking it's a different OS temprorarily, similar to...
https://github.com/moonlight-stream/moonlight-common-c/blob/d3d3e6cf015cd032ce02718246b52aabd1e12294/CMakeLists.txt#L12-L16

Probably still won't work without additional tweaks to nxdk though as it seems like many of the unix headers are also missing.

@ReenigneArcher ReenigneArcher force-pushed the build/deps/add-moonlight-common-c branch 6 times, most recently from dcbd463 to 46bbf8d Compare March 30, 2026 02:37
@ReenigneArcher ReenigneArcher removed the help wanted Extra attention is needed label Mar 30, 2026
Add OpenSSL as a git submodule and integrate it into the build system. GetOpenSSL.cmake now uses ExternalProject to build OpenSSL for the nxdk toolchain and creates imported OpenSSL::Crypto/OpenSSL::SSL targets; moonlight-common-c is made to depend on the openssl_external target when available. Update CMakeLists and find modules: fix CMakePresets binary dir path, add NXDK ws2_32 linking for enet and moonlight-common-c, convert SDL2 to an imported NXDK::SDL2 target, and adjust NXDK include paths. Improve build scripts and wrappers: add build-mingw64.bat and build-mingw64.sh to launch MSYS2/mingw64 builds, and rewrite build.sh to be more robust (set -euo pipefail), support --build-dir and --clean, honor NXDK_DIR env, and use cmake -B for out-of-tree builds. Update README with submodule instructions, build directory options, and wrapper usage. Minor tests CMakeLists fixes and update third-party submodule commits.
@ReenigneArcher ReenigneArcher force-pushed the build/deps/add-moonlight-common-c branch from 46bbf8d to 794c19e Compare March 30, 2026 02:50
Pin GitHub Actions and other workflow actions to specific commit SHAs, tighten job permissions, and adjust CI behavior. Removed pull_request filters, set top-level permissions to {} and added contents: read to the build job. Bumped setup-python to 3.14 and replaced actions/checkout, setup-msys2, setup-python, upload-artifact, and release actions with pinned SHAs. Updated Codecov usage: use the newer action, swap coverage/test result files between steps, set report_type for each upload, and enable handle_no_reports_found for test uploads. Make release_create publish as a draft. These changes improve reproducibility and clarify coverage/test reporting.
@ReenigneArcher ReenigneArcher marked this pull request as ready for review March 30, 2026 03:14
Split the long OPENSSL_CPPFLAGS string into a readable list (OPENSSL_CPPFLAGS_LIST) and join it back into OPENSSL_CPPFLAGS to simplify maintenance. Add a cmake-lint disable comment for OpenSSL_FOUND. Adjust the GitHub Actions step condition to use `false && always()` (keeps the step disabled while evaluating always()). Remove the explicit LineEnding setting from .clang-format.
@ReenigneArcher ReenigneArcher force-pushed the build/deps/add-moonlight-common-c branch from 87ab404 to fe48c22 Compare March 30, 2026 03:18
@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants