Skip to content

Commit e5fb675

Browse files
committed
Update the manual.
1 parent 0579e02 commit e5fb675

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

docs/Manual.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,25 @@ if (info == NULL) {
166166

167167
# Building your game for retro handhelds (ARM64 Linux devices)
168168

169-
## Setup
169+
## The easy way
170170

171-
This section describes the build process for such devices as Anbernic RG35XX H or similar.
171+
Buy a Raspberry Pi Zero 2 W (it's a very cheap ARM64 computer), compile your app directly on the Raspberry Pi and just copy-paste the resulting executable to your handheld.
172172

173-
- Based on https://github.com/Cebion/Portmaster_builds
173+
For building don't forget to pull submodules and install SDL dependencies (just copy-paste commands for Ubuntu, including the Wayland package): https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies
174+
175+
To build:
176+
177+
```
178+
mkdir build && cd build
179+
cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Release ..
180+
cmake --build . --target <game_target_name> --config=Release -j 2
181+
```
182+
183+
## The hard way
184+
185+
### Setup
186+
187+
This approach is not guaranteed to work.
174188

175189
The section will describe commands for WSL2 Ubuntu 24.04.1 LTS (for Windows users, Linux users you know what to do):
176190
```
@@ -214,7 +228,7 @@ sudo apt install --no-install-recommends build-essential git wget libdrm-dev lib
214228

215229
Then install SDL dependencies: https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md#build-dependencies
216230

217-
## Steps for each release of your game
231+
### Steps for each release of your game
218232

219233
Copy your game using the Windows explorer into a new directory at ~/arm64ubuntu/tmp/game (directory inside of the chroot). Then back into the WSL:
220234
```
@@ -223,7 +237,7 @@ cd tmp/game
223237
mkdir build
224238
cd build
225239
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Release ..
226-
cmake --build . --target <game_target_name> --config=Release --parallel
240+
cmake --build . --target <game_target_name> --config=Release -j 2
227241
```
228-
Then copy the resulting binary (from `build/OUTPUT/game`) to your ARM64 Linux device. We don't worry about installing SDL and other libraries because we link SDL and other libraries statically. Inside of your ARM64 Linux device launch the game using some file explorer or a console.
242+
Then copy the resulting binary (from `build/OUTPUT/` directory) to your ARM64 Linux device. We don't worry about installing SDL and other libraries because we link SDL and other libraries statically. Inside of your ARM64 Linux device launch the game using some file explorer or a console.
229243

0 commit comments

Comments
 (0)