mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-10 03:43:04 +08:00
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:
@@ -1,29 +1,75 @@
|
||||
name: Build reVC.nro (Nintendo Switch)
|
||||
|
||||
name: reVC cmake devkitA64 (Nintendo Switch)
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types: published
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Release version. Leave it empty to avoid publishing a release.'
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-nintendo-switch:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: devkitpro/devkita64:latest
|
||||
container:
|
||||
image: devkitpro/devkita64:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: "Build files"
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Install required Switch libraries
|
||||
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
|
||||
- name: "Create binary package (cpack)"
|
||||
working-directory: ./build
|
||||
run: |
|
||||
cpack
|
||||
- name: "Archive binary package (github artifacts)"
|
||||
|
||||
- name: Collect NRO
|
||||
run: find build -name 'reVC.nro' -exec cp {} reVC.nro \;
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "switch-gl3"
|
||||
path: build/*.tar.xz
|
||||
name: reVC-switch
|
||||
path: reVC.nro
|
||||
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
|
||||
|
||||
@@ -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">
|
||||
|
||||
[](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
|
||||
|
||||
In this repository you'll find the fully reversed source code for GTA VC ([miami](https://github.com/mrxenginner/reVC/tree/miami/) branch).
|
||||
|
||||
@@ -93,6 +93,13 @@ if(${PROJECT}_AUDIO STREQUAL "OAL")
|
||||
target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
|
||||
endif()
|
||||
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")
|
||||
find_package(MilesSDK REQUIRED)
|
||||
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_MSS)
|
||||
|
||||
Reference in New Issue
Block a user