Mobile step 7b: iOS packaging (simulator verified to the game scene)

- ios/build.sh builds static SDL3 + FreeType, then the .app (code only,
  embedded Python); signs ad hoc and runs on a simulator, or signs with a
  development profile and installs with devicectl (device path untested).
  Simulator-only SDL patch: accept the simulator Metal device for SDL_GPU.
- ios/Info.plist.in: landscape, full screen, launch screen, file sharing.
- Data dir is Documents on iOS; ios/push_assets.py stages the client root
  lower-cased (iOS is case-sensitive, the client opens lower-cased paths)
  and copies it into the app container.
- EffectData path normalisation folds A-Z like the effect cache key.
- android/push_assets.py: test-rundir base layer + svside/, which the game
  phase needs (also fixes Android); --lowercase (ASCII only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-13 01:21:07 +09:00
co-authored by Claude Opus 5.5
parent f973b24abc
commit 908838c8f9
11 changed files with 431 additions and 13 deletions
+7 -2
View File
@@ -294,10 +294,15 @@ ava2::app::AppLoop::Frame RunClient(ava2::app::AppLoop* loop, int argc, char** a
// A flattened client root (scripts beside the assets), e.g. the Android data directory.
else if (std::filesystem::exists("game.py") && std::filesystem::exists("uiscript")) script_root = ".";
}
#ifdef __ANDROID__
#if defined(__ANDROID__) || defined(SDL_PLATFORM_IOS)
if (stdlib.empty() || script_root.empty()) {
#ifdef __ANDROID__
const char* push = "android/push_assets.py";
#else
const char* push = "ios/push_assets.py";
#endif
const std::string message = "Game data not found in " + std::filesystem::current_path().string()
+ ".\nPush it with android/push_assets.py.";
+ ".\nPush it with " + push + ".";
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "AVA2", message.c_str(), nullptr);
throw std::runtime_error(message);
}