![]() |
Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
|
Port of Moonlight for the Original Xbox.
Clone the repository with submodules, or update them after cloning.
Configure the top-level project with the normal host toolchain. CMake uses the vendored third-party/nxdk checkout, bootstraps the required nxdk outputs, builds the host-native tests with the standard compiler/linker, and drives the Xbox build through an internal child configure that reuses the stock nxdk toolchain.
This script takes care of everything, except installing the prerequisites.
The default build directory is cmake-build-release. You can override it or force a clean build:
To launch the same build from shells outside MSYS2 on Windows, use one of these wrappers:
The Xbox executable cannot run directly on Windows, macOS, or Linux, so the top-level project builds test_moonlight natively while the Xbox binary is built by an internal child configure that uses the nxdk toolchain. Keep Xbox runtime code thin and move logic you want to test into platform-neutral sources that can be linked into test_moonlight.
From cmd.exe, configure, build, and run the host tests after the helper locates your local MSYS2 installation:
If you are already inside a mingw64 shell, the equivalent commands are:
Coverage should come from this host-native test build instead of the cross-compiled Xbox build.
The Windows preset in CMakePresets.json uses MinGW Makefiles for the host-native CLion build, auto-detects the local MSYS2 installation through cmake/host-mingw64-clang.cmake, and delegates the Xbox child build through a dedicated CMake driver that enters the vendored nxdk environment only for the child configure and build steps.
nxdk-release (mingw64) preset from CMakePresets.json.test_moonlight natively and configure the Xbox child build automatically.nxdk build outputs and rebuild the required nxdk libraries and tools.moonlight_xbox target or the default all target. The generated ISO now lives at cmake-build-release/xbox/Moonlight.iso.For the first xemu launch, you can either run the shared Setup portable xemu configuration or run the Windows wrapper manually:
The repository now includes .run/Run xemu.run.xml, which launches scripts\run-xemu.cmd through C:\Windows\System32\cmd.exe without extra arguments and lets the launcher auto-discover a built Moonlight ISO.
If you create a local CLion run configuration that sets the working directory to a build output such as $CMakeCurrentBuildDir$/xbox, the Windows wrapper also treats that caller working directory as the xemu target path when no explicit launcher arguments or MOONLIGHT_XEMU_* overrides are provided.
The setup script downloads xemu and the emulator support files into .local/xemu, then refreshes launcher manifests used by scripts/run-xemu.sh. Existing files under .local/xemu are preserved by default so a local xemu install or support bundle is not overwritten unless you pass --force. The launcher accepts MOONLIGHT_XEMU_BUILD_DIR, MOONLIGHT_XEMU_ISO_PATH, --build-dir <cmake-build-dir>, --iso <iso-path>, or a single positional path that can point at either a build directory or an ISO file. If you do not pass a path, it falls back across available cmake-build-* outputs and prefers the newest built ISO.
When xemu runs with its default user-mode network, multicast mDNS traffic is not forwarded reliably, so automatic host discovery may not find your PC. For reliable discovery, launch xemu with --network tap --tap-ifname <adapter> or add the host manually from the Xbox UI.
If you only want the emulator without the ROM/HDD support bundle, run: