Skip to content

Commit

Permalink
Merge pull request OpenBrickProtocolFoundation#126 from OpenBrickProt…
Browse files Browse the repository at this point in the history
…ocolFoundation/3ds-port

Nintendo 3DS port
  • Loading branch information
Totto16 authored Apr 15, 2024
2 parents 15741d8 + 3a43178 commit ecc8144
Show file tree
Hide file tree
Showing 47 changed files with 1,816 additions and 814 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Build natibe libraries
run: |
bash ./platforms/build-android.sh ${{ matrix.config.arch }}
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
cp -r ./assets/ platforms/android/app/src/main
- name: Build APK
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/nintendo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nintendo Switch CI
name: Nintendo CI

on:
push:
Expand All @@ -7,10 +7,23 @@ on:
workflow_dispatch:

jobs:
switch-build:
build:
name: Nintendo ${{ matrix.config.name }} CI
runs-on: ubuntu-22.04
container:
image: devkitpro/devkita64 ## base on debian:buster-slim
image: devkitpro/${{ matrix.config.container }} ## base on debian:buster-slim
strategy:
fail-fast: false
matrix:
config:
- name: 3ds
extension: 3dsx
container: devkitarm

- name: switch
extension: nro
container: devkita64

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -30,10 +43,10 @@ jobs:
- name: Configure and Build
run: |
bash ./platforms/build-switch.sh
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: oopetris.nro
path: build-switch/oopetris.nro
name: ${{ matrix.config.name }} Executable
path: build-${{ matrix.config.name }}/oopetris.${{ matrix.config.extension }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is written in [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming

## Platform support

This officially supports Linux, Windows, MacOS, Android and Nintendo switch.
This officially supports Linux, Windows, MacOS, Android, Nintendo Switch and Nintendo 3DS.

Why these? Because it was fun to port the application to those platforms 😋

Expand All @@ -27,7 +27,7 @@ To download artifacts, click on the newest action and download the artifacts.

[Linux (Flatpak)](https://github.com/mgerhold/oopetris/actions/workflows/flatpak.yml)

[Nintendo Switch](https://github.com/mgerhold/oopetris/actions/workflows/nintendo.yml)
[Nintendo Switch /3DS](https://github.com/mgerhold/oopetris/actions/workflows/nintendo.yml)

There is no correct Windows and MacOS build atm, you have to built it yourself or use the (maybe not published yet) release builds on github.

Expand Down
Binary file added assets/fonts/LeroyLetteringLightBeta01.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/oopetris.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Version=1.0
Type=Application
Name=OOPetris
Comment=A tetris clone in OOP
Comment=A Tetris clone in OOP
Exec=oopetris
Icon=@APP_NAME@
Terminal=false
Expand Down
2 changes: 1 addition & 1 deletion com.github.mgerhold.OOPetris.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ modules:
config-opts:
- -Dbuildtype=release
- -Ddefault_library=shared
- -Dflatpak_build=true
- -Dbuild_installer=true
- --libdir=lib
- -Dtests=true
builddir: true
Expand Down
24 changes: 24 additions & 0 deletions docs/3ds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nintendo 3DS build

## Prerequisites

- a C++23 compatible cross compiler, we only support The [devkitpro](https://devkitpro.org/) one
- meson


## Compiling


Cross Compiling is only possible on linux-like systems.

SDL2 officially supports 3ds, so there are no portlibs, so on the initial run of the bash script, SDL2 will be built, and installed into the devkitpro portlibs root folder, this might need sudo (but installing the other toolchains from devkitpro required that too).

We use meson and cross-compilation files, everything is wrapped into shell script, so you just need to run:


```bash
./platforms/build-3ds.sh

```
After that you can find the runnable executable (also supports emulators)
in `build-3ds/oopetris.3dsx`
6 changes: 6 additions & 0 deletions docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ For concrete instructions, see the list below:

[switch](switch.md)


## Nintendo 3DS

[switch](3ds.md)


## Android

[android](android.md)
Loading

0 comments on commit ecc8144

Please sign in to comment.