Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 19, 2024
1 parent fd4d160 commit c157ac1
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ jobs:
- name: Build
run: |
nxdk_dir="$(pwd)/third-party/nxdk"
eval "$(${nxdk_dir}/bin/activate -s)"
cd "${nxdk_dir}"
export NXDK_DIR="$(pwd)/third-party/nxdk"
eval "$(${NXDK_DIR}/bin/activate -s)"
cd "${NXDK_DIR}"
make NXDK_ONLY=y
make tools
Expand Down
69 changes: 64 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Moonlight-XboxOG
Port of Moonlight for the Original Xbox. Unlikely to ever actually work. Do NOT use.
Port of Moonlight for the Original Xbox. Unlikely to ever actually work. Do NOT use!

Nothing works, except the splash screen.

![Splash Screen](./docs/images/loading.png)


## Build
Expand All @@ -9,9 +13,9 @@ Port of Moonlight for the Original Xbox. Unlikely to ever actually work. Do NOT
1. Install nxdk prerequisites. Then run the following from mingw64 or bash shell:

```bash
nxdk_dir="$(pwd)/third-party/nxdk"
eval "$(${nxdk_dir}/bin/activate -s)"
cd "${nxdk_dir}"
export NXDK_DIR="$(pwd)/third-party/nxdk"
eval "$(${NXDK_DIR}/bin/activate -s)"
cd "${NXDK_DIR}"
make NXDK_ONLY=y
make tools
```
Expand All @@ -27,11 +31,66 @@ make tools
2. Configure the project

```bash
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="${nxdk_dir}/share/toolchain-nxdk.cmake"
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="${NXDK_DIR}/share/toolchain-nxdk.cmake"
```

### Build

```bash
cmake --build build
```

### Combined script

This script takes care of everything, except installing the prerequisites.

```bash
./build.sh
```

## Todo:

- Build
- [x] Build in GitHub CI
- [x] Build with CMake instead of Make, see https://github.com/Ryzee119/Xenium-Tools/blob/master/CMakeLists.txt and https://github.com/abaire/nxdk_pgraph_tests/blob/4b7934e6d612a6d17f9ec229a2d72601a5caefc4/CMakeLists.txt
- [ ] Get build environment working with CLion directly instead of using external terminal
- [ ] debugger, see https://github.com/abaire/xbdm_gdb_bridge
- [ ] Add a run config for CLion, see https://github.com/Subtixx/XSampleProject
- [ ] Automatically run built xiso in Xemu
- [x] Add unit testing framework
- [x] Separate main build and unit test builds, due to cross compiling, see https://stackoverflow.com/a/64335131/11214013
- [ ] Get tests to properly compile
- [ ] Enable codecov
- [ ] Enable sonarcloud
- [ ] Build moonlight-common-c
- [ ] Build custom enet, depends on https://github.com/XboxDev/nxdk/pull/680 or https://github.com/thrimbor/nxdk/tree/winsock/lib/winapi (seems unlikely nxdk will ever be ready for this, could definitely use some help with this)
- Menus / Screens
- [x] Loading/splash screen
- [x] Initial loading screen, see https://github.com/XboxDev/nxdk/blob/master/samples/sdl_image/main.c
- [x] Set video mode based on best available mode
- [x] dynamic splash screen (size based on current resolution)
- [ ] two images (background color, and logo) to reduce total size... stretch background color image... or don't even use an image for the background
- [ ] Main/Home
- [ ] Settings
- [ ] Add Host
- [ ] Game/App Selection
- [ ] Host Details
- [ ] App Details
- [ ] Pause/Hotkey overlay
- Streaming
- [ ] Video - https://www.xbmc4xbox.org.uk/wiki/XBMC_Features_and_Supported_Formats#Xbox_supported_video_formats_and_resolutions
- [ ] Audio
- [ ] Mono
- [ ] Stereo
- [ ] 5.1 Surround
- [ ] 7.1 Surround
- Input
- [ ] Gamepad Input
- [ ] Keyboard Input
- [ ] Mouse Input
- [ ] Mouse Emulation via Gamepad
- Misc.
- [ ] Save config and pairing states, probably use nlohmann/json
- [ ] Host pairing
- [ ] Possibly, GPU overclocking, see https://github.com/GXTX/XboxOverclock
- [ ] Docs via doxygen
29 changes: 29 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# Exit immediately if a command exits with a non-zero status
set -e

# Set the NXDK_DIR environment variable
export NXDK_DIR="$(pwd)/third-party/nxdk"

# Activate the nxdk environment
eval "$(${NXDK_DIR}/bin/activate -s)"

# Navigate to the nxdk directory
cd "${NXDK_DIR}"

# Build nxdk with the specified options
make NXDK_ONLY=y
make tools

# Navigate back to the project root directory
cd -

# Create the build directory
mkdir -p build

# Configure the project
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="${NXDK_DIR}/share/toolchain-nxdk.cmake"

# Build the project
cmake --build build
Binary file added docs/images/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c157ac1

Please sign in to comment.