Update Nintendo Switch Support + CI Workflow (#39)

* Update CMakeLists.txt

* Update build-switch.yml

* Update README by removing badges

Removed build status and Discord badge from README.
This commit is contained in:
Stevens
2026-09-01 07:07:34 +02:00
committed by GitHub
parent be436f68f1
commit 1e41b490b7
3 changed files with 70 additions and 20 deletions
+63 -17
View File
@@ -1,29 +1,75 @@
name: Build reVC.nro (Nintendo Switch)
name: reVC cmake devkitA64 (Nintendo Switch)
on: on:
pull_request:
push: push:
release: pull_request:
types: published workflow_dispatch:
inputs:
version:
description: 'Release version. Leave it empty to avoid publishing a release.'
required: false
type: string
jobs: jobs:
build-nintendo-switch: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: devkitpro/devkita64:latest container:
image: devkitpro/devkita64:latest
options: --user root
steps: steps:
- uses: actions/checkout@v4 - name: Checkout repository
uses: actions/checkout@v4
with: with:
submodules: 'true' submodules: 'recursive'
- name: "Build files"
- name: Install required Switch libraries
run: | run: |
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild -DREVC_AUDIO=OAL -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=GLFW -DREVC_WITH_OPUS=False -DREVC_VENDORED_LIBRW=True -DREVC_INSTALL=True dkp-pacman -S --noconfirm --needed \
switch-mesa \
switch-libdrm_nouveau \
switch-glfw \
switch-glm \
switch-libpng \
switch-mpg123 \
switch-openal-soft \
switch-sdl2
- name: Build
run: |
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild \
-DREVC_AUDIO=OAL -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=GLFW \
-DREVC_WITH_OPUS=False -DREVC_VENDORED_LIBRW=True -DREVC_INSTALL=True
cmake --build build --parallel cmake --build build --parallel
- name: "Create binary package (cpack)"
working-directory: ./build - name: Collect NRO
run: | run: find build -name 'reVC.nro' -exec cp {} reVC.nro \;
cpack
- name: "Archive binary package (github artifacts)" - name: Upload artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: "switch-gl3" name: reVC-switch
path: build/*.tar.xz path: reVC.nro
if-no-files-found: error if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' && inputs.version != ''
permissions:
contents: write
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: reVC-switch
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ inputs.version }}"
name: "reVC v${{ inputs.version }}"
files: reVC.nro
draft: false
prerelease: false
-3
View File
@@ -1,8 +1,5 @@
<img src="https://github.com/mrxenginner/reVC/blob/miami/res/images/logo_1024.png?raw=true" alt="reVC logo" width="200"> <img src="https://github.com/mrxenginner/reVC/blob/miami/res/images/logo_1024.png?raw=true" alt="reVC logo" width="200">
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fmrxenginner%2FreVC%2Fbadge%3Fref%3Dmiami&style=flat)](https://actions-badge.atrox.dev/mrxenginner/reVC/goto?ref=miami)
<a href="https://discord.gg/RFNbjsUMGg"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a>
## Intro ## Intro
In this repository you'll find the fully reversed source code for GTA VC ([miami](https://github.com/mrxenginner/reVC/tree/miami/) branch). In this repository you'll find the fully reversed source code for GTA VC ([miami](https://github.com/mrxenginner/reVC/tree/miami/) branch).
+7
View File
@@ -93,6 +93,13 @@ if(${PROJECT}_AUDIO STREQUAL "OAL")
target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS}) target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
endif() endif()
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OAL) target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OAL)
# Nintendo Switch: devkitPro's OpenAL is built with an SDL2 audio backend,
# so libopenal.a references SDL_* symbols that must be linked in after it.
if(NINTENDO_SWITCH)
find_package(PkgConfig REQUIRED)
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2)
target_link_libraries(${EXECUTABLE} PRIVATE PkgConfig::SDL2)
endif()
elseif(${PROJECT}_AUDIO STREQUAL "MSS") elseif(${PROJECT}_AUDIO STREQUAL "MSS")
find_package(MilesSDK REQUIRED) find_package(MilesSDK REQUIRED)
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_MSS) target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_MSS)