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:
co-authored by
Claude Opus 5.5
parent
f973b24abc
commit
908838c8f9
@@ -11,7 +11,18 @@
|
||||
namespace ava2::platform {
|
||||
|
||||
bool EnterClientDataDirectory(std::string* error) {
|
||||
#if defined(__APPLE__)
|
||||
#if defined(SDL_PLATFORM_IOS)
|
||||
// Like the APK, the .app holds code only. The flattened client root (ios/push_assets.py, or
|
||||
// copied in with Finder / the Files app — Info.plist enables file sharing) lives in Documents.
|
||||
const char* data = SDL_GetUserFolder(SDL_FOLDER_DOCUMENTS);
|
||||
std::error_code ec;
|
||||
if (data) std::filesystem::current_path(data, ec);
|
||||
if (!data || ec) {
|
||||
if (error) *error = std::string("Cannot enter client data directory: ") + (data ? ec.message() : SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
SDL_Log("Client data: %s", data);
|
||||
#elif defined(__APPLE__)
|
||||
// Keep legacy Python's relative config/chat writes outside the signed application.
|
||||
try {
|
||||
std::filesystem::path base = std::filesystem::path(SDL_GetBasePath()).lexically_normal();
|
||||
|
||||
Reference in New Issue
Block a user