Skip to content

Commit ecc8144

Browse files
authored
Merge pull request #126 from OpenBrickProtocolFoundation/3ds-port
Nintendo 3DS port
2 parents 15741d8 + 3a43178 commit ecc8144

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1816
-814
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
- name: Build natibe libraries
5252
run: |
53-
bash ./platforms/build-android.sh ${{ matrix.config.arch }}
53+
bash ./platforms/build-android.sh ${{ matrix.config.arch }} complete_rebuild release
5454
cp -r ./assets/ platforms/android/app/src/main
5555
5656
- name: Build APK

.github/workflows/nintendo.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Nintendo Switch CI
1+
name: Nintendo CI
22

33
on:
44
push:
@@ -7,10 +7,23 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
switch-build:
10+
build:
11+
name: Nintendo ${{ matrix.config.name }} CI
1112
runs-on: ubuntu-22.04
1213
container:
13-
image: devkitpro/devkita64 ## base on debian:buster-slim
14+
image: devkitpro/${{ matrix.config.container }} ## base on debian:buster-slim
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
config:
19+
- name: 3ds
20+
extension: 3dsx
21+
container: devkitarm
22+
23+
- name: switch
24+
extension: nro
25+
container: devkita64
26+
1427
steps:
1528
- uses: actions/checkout@v4
1629
with:
@@ -30,10 +43,10 @@ jobs:
3043
3144
- name: Configure and Build
3245
run: |
33-
bash ./platforms/build-switch.sh
46+
bash ./platforms/build-${{ matrix.config.name }}.sh complete_rebuild release
3447
3548
- name: Upload artifacts
3649
uses: actions/upload-artifact@v4
3750
with:
38-
name: oopetris.nro
39-
path: build-switch/oopetris.nro
51+
name: ${{ matrix.config.name }} Executable
52+
path: build-${{ matrix.config.name }}/oopetris.${{ matrix.config.extension }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ It is written in [OOP](https://en.wikipedia.org/wiki/Object-oriented_programming
99

1010
## Platform support
1111

12-
This officially supports Linux, Windows, MacOS, Android and Nintendo switch.
12+
This officially supports Linux, Windows, MacOS, Android, Nintendo Switch and Nintendo 3DS.
1313

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

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

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

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

3232
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.
3333

45.7 KB
Binary file not shown.

assets/oopetris.desktop.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Version=1.0
33
Type=Application
44
Name=OOPetris
5-
Comment=A tetris clone in OOP
5+
Comment=A Tetris clone in OOP
66
Exec=oopetris
77
Icon=@APP_NAME@
88
Terminal=false

com.github.mgerhold.OOPetris.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ modules:
2121
config-opts:
2222
- -Dbuildtype=release
2323
- -Ddefault_library=shared
24-
- -Dflatpak_build=true
24+
- -Dbuild_installer=true
2525
- --libdir=lib
2626
- -Dtests=true
2727
builddir: true

docs/3ds.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Nintendo 3DS build
2+
3+
## Prerequisites
4+
5+
- a C++23 compatible cross compiler, we only support The [devkitpro](https://devkitpro.org/) one
6+
- meson
7+
8+
9+
## Compiling
10+
11+
12+
Cross Compiling is only possible on linux-like systems.
13+
14+
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).
15+
16+
We use meson and cross-compilation files, everything is wrapped into shell script, so you just need to run:
17+
18+
19+
```bash
20+
./platforms/build-3ds.sh
21+
22+
```
23+
After that you can find the runnable executable (also supports emulators)
24+
in `build-3ds/oopetris.3dsx`

docs/develop.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ For concrete instructions, see the list below:
2222

2323
[switch](switch.md)
2424

25+
26+
## Nintendo 3DS
27+
28+
[switch](3ds.md)
29+
30+
2531
## Android
2632

2733
[android](android.md)

0 commit comments

Comments
 (0)