mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-20 14:11:16 +00:00
- Switch build homebrew NRO
- CI/CD to build Switch
This commit is contained in:
parent
bd46a7e3dd
commit
e94d4c7876
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -46,6 +46,7 @@ jobs:
|
|||||||
- { name: 'iOS', os: 'macos-15', generator: 'Xcode', dx5: false, config: false, brew: true, werror: true, clang-tidy: false, cmake-args: '-DCMAKE_SYSTEM_NAME=iOS', ios: true }
|
- { name: 'iOS', os: 'macos-15', generator: 'Xcode', dx5: false, config: false, brew: true, werror: true, clang-tidy: false, cmake-args: '-DCMAKE_SYSTEM_NAME=iOS', ios: true }
|
||||||
- { name: 'Emscripten', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
- { name: 'Emscripten', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
||||||
- { name: 'Nintendo 3DS', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, n3ds: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake' }
|
- { name: 'Nintendo 3DS', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, n3ds: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake' }
|
||||||
|
- { name: 'Nintendo Switch', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, nx: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake' }
|
||||||
- { name: 'Xbox One', os: 'windows-latest', generator: 'Visual Studio 17 2022', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64', cmake-args: '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0', xbox-one: true}
|
- { name: 'Xbox One', os: 'windows-latest', generator: 'Visual Studio 17 2022', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64', cmake-args: '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0', xbox-one: true}
|
||||||
- { name: 'Android', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, android: true, werror: true, clang-tidy: false,}
|
- { name: 'Android', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, android: true, werror: true, clang-tidy: false,}
|
||||||
- { name: 'Vita', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, vita: true, werror: true, clang-tidy: false, cmake-args: '--toolchain /usr/local/vitasdk/share/vita.toolchain.cmake'}
|
- { name: 'Vita', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, vita: true, werror: true, clang-tidy: false, cmake-args: '--toolchain /usr/local/vitasdk/share/vita.toolchain.cmake'}
|
||||||
@ -190,7 +191,7 @@ jobs:
|
|||||||
run: cmake --build build --verbose --config Release
|
run: cmake --build build --verbose --config Release
|
||||||
|
|
||||||
- name: Package (CPack)
|
- name: Package (CPack)
|
||||||
if: ${{ !matrix.n3ds && !matrix.android && !matrix.vita }}
|
if: ${{ !matrix.n3ds && !martrix.nx && !matrix.android && !matrix.vita }}
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
success=0
|
success=0
|
||||||
@ -238,6 +239,13 @@ jobs:
|
|||||||
mkdir dist
|
mkdir dist
|
||||||
mv *.3dsx dist/
|
mv *.3dsx dist/
|
||||||
mv *.cia dist/
|
mv *.cia dist/
|
||||||
|
|
||||||
|
- name: Package (Switch)
|
||||||
|
if: ${{ matrix.nx }}
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
mkdir dist
|
||||||
|
mv *.nro dist/
|
||||||
|
|
||||||
- name: Package (Vita)
|
- name: Package (Vita)
|
||||||
if: ${{ matrix.vita }}
|
if: ${{ matrix.vita }}
|
||||||
@ -265,6 +273,7 @@ jobs:
|
|||||||
build/dist/*.AppImage
|
build/dist/*.AppImage
|
||||||
build/dist/*.3dsx
|
build/dist/*.3dsx
|
||||||
build/dist/*.cia
|
build/dist/*.cia
|
||||||
|
build/dist/*.nro
|
||||||
build/dist/*.apk
|
build/dist/*.apk
|
||||||
build/dist/*.vpk
|
build/dist/*.vpk
|
||||||
|
|
||||||
|
|||||||
@ -103,7 +103,6 @@ if (DOWNLOAD_DEPENDENCIES)
|
|||||||
EXCLUDE_FROM_ALL
|
EXCLUDE_FROM_ALL
|
||||||
)
|
)
|
||||||
set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON CACHE BOOL "Disable PCH globally" FORCE)
|
set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON CACHE BOOL "Disable PCH globally" FORCE)
|
||||||
#set(SDL_PLATFORM_SWITCH ON CACHE BOOL "Enable Switch platform backend" FORCE)
|
|
||||||
else()
|
else()
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
SDL3
|
SDL3
|
||||||
@ -906,6 +905,39 @@ if(NINTENDO_3DS)
|
|||||||
endif()
|
endif()
|
||||||
install(FILES "$<TARGET_FILE_DIR:isle>/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
install(FILES "$<TARGET_FILE_DIR:isle>/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
if(NINTENDO_SWITCH)
|
||||||
|
find_program(NACPTOOL NAMES nacptool)
|
||||||
|
find_program(ELF2NRO NAMES elf2nro)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "isle.nacp"
|
||||||
|
COMMAND "${NACPTOOL}"
|
||||||
|
--create
|
||||||
|
"LEGO Island"
|
||||||
|
"isledecomp/isle-portable"
|
||||||
|
"${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}.0"
|
||||||
|
"isle.nacp"
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "isle.nro"
|
||||||
|
COMMAND "${ELF2NRO}"
|
||||||
|
"$<TARGET_FILE:isle>"
|
||||||
|
"$<TARGET_FILE_DIR:isle>/isle.nro"
|
||||||
|
"--icon=${CMAKE_SOURCE_DIR}/packaging/switch/isle.jpg"
|
||||||
|
"--nacp=${CMAKE_BINARY_DIR}/isle.nacp"
|
||||||
|
DEPENDS "${CMAKE_SOURCE_DIR}/packaging/switch/isle.jpg" "${CMAKE_BINARY_DIR}/isle.nacp"
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(switch-nro
|
||||||
|
ALL
|
||||||
|
DEPENDS "${CMAKE_BINARY_DIR}/isle.nro"
|
||||||
|
COMMENT "Build switch NRO from ELF"
|
||||||
|
)
|
||||||
|
|
||||||
|
endif()
|
||||||
if(WINDOWS_STORE)
|
if(WINDOWS_STORE)
|
||||||
install(
|
install(
|
||||||
DIRECTORY
|
DIRECTORY
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
#define NX_FILESYS_H
|
#define NX_FILESYS_H
|
||||||
|
|
||||||
#include <SDL3/SDL_filesystem.h>
|
#include <SDL3/SDL_filesystem.h>
|
||||||
#include "SDL_dupes.h"
|
|
||||||
|
|
||||||
#define SDL_GetPathInfo NX_GetPathInfo // Override broken SDL_GetPathInfo
|
#define SDL_GetPathInfo NX_GetPathInfo // Override broken SDL_GetPathInfo
|
||||||
bool NX_GetPathInfo(const char *path, SDL_PathInfo *info);
|
bool NX_GetPathInfo(const char *path, SDL_PathInfo *info);
|
||||||
|
|||||||
BIN
packaging/switch/isle.jpg
Normal file
BIN
packaging/switch/isle.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user