From deef6d20cd46c3c2a52b644ae72b372738552787 Mon Sep 17 00:00:00 2001 From: Haseenesss Date: Mon, 16 Nov 2026 07:22:06 +0900 Subject: [PATCH] iOS shell README: a shell built from the scripts alone puts the shaders on the game image (#1327) A framework-only build strips msl/ from the framework and records the shaders in /fw/.msl-cache/.json. The shell then finds them only as a trailer on the game image, which the launchers add and a build from the scripts alone must add with romfs_image.py --append-msl. The README lists the three steps and how to read lib_path, gfx_api, chain and multi_program from the record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --- frontend-ios/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend-ios/README.md b/frontend-ios/README.md index 5ef1da0ff..603df7c2d 100644 --- a/frontend-ios/README.md +++ b/frontend-ios/README.md @@ -21,6 +21,26 @@ xcodebuild -project frontend-ios/Demo/ShellDemo.xcodeproj -scheme ShellDemo \ The app icon of the demo app and of the shell app (`frontend-ios/Shell/project-shell.yml`) is `frontend-ios/AppIcon.icon`. It is edited in Icon Composer. `frontend-ios/Shell/` also holds `build_shell.sh` and `App/` (`ShellApp.swift`, `ShellMain.m`, `SegSnap.h` and the glue headers), which build `DmShell.app` without linking engine C code. +### A shell built from the scripts alone + +The launchers do every step. Without one, a game takes three steps (#1327): + +1. `scripts/build_ipa_from_nsp.py <work> -k prod.keys --shell-framework <work>/fw` builds the game's framework. The framework holds no shaders. The build records where they are in `<work>/fw/.msl-cache/<title ID>.json`. +2. Put the shaders on the game image with `romfs_image.py --append-msl`. Without this step the shell shows "Update game data" and the game does not start. Take the arguments from the record: + + ```sh + python3 -I engine/dm/tools/romfs_image.py --append-msl <romfs.img> <lib_path> --gfx-api <gfx_api> \ + [--chain <chain>] [--multi-program] + ``` + + - `lib_path`: the shader folder. + - `gfx_api`: `nvn`, `vulkan` or `gl`. + - `chain`: set only for an NVN game. Pass `--chain <chain>` when it is not empty. + - `multi_program`: `true` for a game of several programs. Then add `--multi-program`. + + This prints the four values: `python3 -c "import json,sys; m=json.load(open(sys.argv[1])); print(m['lib_path'], m['gfx_api'], m.get('chain', ''), m.get('multi_program', False))" <work>/fw/.msl-cache/<title ID>.json`. When the image already has a shader trailer, use `--replace-msl` instead of `--append-msl`. +3. `DM_SHELL_FRAMEWORKS=<work>/fw/DmGame<title ID>.framework frontend-ios/Shell/build_shell.sh` builds the shell. Then copy the image to `Documents/games/<title ID>/romfs.img`. + ## Integrate All boundary types are in `Sources/ShellUI/ShellInputs.swift` and `ShellArtwork.swift`: