Files
EVEngine/platform/android/android.h
T
sunxfancy d715992a3a feat(hotreload): add dev-server remote hot reload for mac/iOS/Android
Add a development-server based remote hot reload so script/resource changes
made on the host are synced and reloaded live on devices whose game bundle is
read-only (iOS app bundle, Android APK).

- Implement the previously stubbed `eve dev` command as a small HTTP file
  server (GET /manifest, /raw/<path>, /ping) serving a game directory.
- Extend HotReload with a background remote-sync client: poll the server
  manifest, compare mtime/size, download changed files into a writable overlay
  directory mounted at "/" via the new Filesystem::mountRealDirectory, and
  queue changed virtual paths for the script layer to dofile/reload.
- Wire it into load.nut: config.devServer/devSyncMs, shared handle_change(),
  poll_remote_reload(), and a `eve run --dev-server <url>` CLI override.
- Add iOS/Android hot-reload dir helpers and cleartext-HTTP platform config
  (iOS ATS + NSLocalNetworkUsageDescription, Android usesCleartextTraffic).
- Add test/remotesync.cpp covering overlay shadowing, end-to-end sync, and
  unreachable-recovery; update docs.
2026-08-18 16:23:27 +08:00

38 lines
1011 B
C++

#pragma once
#include <cstddef>
#include <string>
namespace eve {
namespace android {
bool directoryExists(const char *path);
bool mkdir(const char *path);
bool createStorageDirectories();
/** Immersive fullscreen (hide system UI). */
void setImmersive(bool immersive);
/**
* Love2D-style fused game helpers. MVP returns false / safe no-ops so
* Filesystem::setSource can fall through to mounting a real directory.
*/
bool checkFusedGame(void **gameLoveIO);
bool initializeVirtualArchive();
void deinitializeVirtualArchive();
std::string getSelectedGameFile();
bool loadGameArchiveToMemory(const char *filename, char **outPtr, size_t *outSize);
void freeGameArchiveMemory(void *ptr);
/** Absolute path to the native library / "executable" (best-effort). */
std::string getExecutablePath();
/**
* Writable directory used to stage remote hot-reload downloads
* (<internal storage>/hotreload). Created on first use.
*/
std::string getHotReloadDirectory();
} // namespace android
} // namespace eve