Skip to content

saves and mods on shared storage#10

Open
jspeyside wants to merge 1 commit into
AurelioB:androidfrom
jspeyside:jspeyside-external-storage
Open

saves and mods on shared storage#10
jspeyside wants to merge 1 commit into
AurelioB:androidfrom
jspeyside:jspeyside-external-storage

Conversation

@jspeyside

Copy link
Copy Markdown

Adds External storage support + Windows build support

External storage (save/mod accessibility)

  • Request MANAGE_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE permissions on first launch
  • On permission grant, migrate save data from private app storage to BanjoRecompiled/ in shared storage so saves and mods are accessible via file manager, survive app uninstalls, and can be cloud sync'd
  • Add android:requestLegacyExternalStorage="true" for API 29 (Android 10) compatibility
  • Bump versionCode 1 → 2 to allow over-the-air APK updates

Windows Android build support

  • build.gradle: auto-detect Android SDK from LOCALAPPDATA when ANDROID_HOME is unset; normalize backslash paths; search name.exe/name.cmd extensions when checking PATH on Windows; validate NDK ld.lld using correct windows-x86_64 host arch
  • CMakeLists.txt: use CMAKE_HOST_WIN32 (not WIN32) for host detection; resolve N64Recomp as an absolute path with platform-correct extension (N64Recomp.exe on Windows) so it is found without being on PATH; select dxc.exe for Windows hosts
  • tools/setup_android_deps_windows.ps1: new script to cross-compile SDL2 and Freetype for Android from Windows; auto-detects SDK/NDK/CMake/Ninja, all paths driven by env vars with sensible defaults
  • tools/prepare_generated_sources_windows.ps1: new script to build N64Recomp/RSPRecomp and generate runtime sources (RecompiledFuncs, patches, RSP) on Windows

Build hygiene

  • Commit Gradle wrapper (gradlew, gradlew.bat, gradle/wrapper/) for reproducible builds without requiring Gradle pre-installed
  • Add .gitattributes enforcing LF line endings for all text files (.bat/.cmd exempt); fixes CRLF warnings on Windows
  • Add .idea/ to .gitignore
  • Skip clang/ld.lld PATH validation in Gradle when patches/patches.bin already exists (the build step that needs them is skipped by CMake in that case)
  • Generalize error messages that previously referenced a CI-specific user path

Feel free to edit or change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant