mirror of https://github.com/bjornbytes/lovr.git
Fix Pico build
* lovrPlatformGetBundlePath was missing the root argument * ANDROID_SDK can't be assumed to be the parent of the ndk folder, in case it's a side-by-side installation of the NDK. Instead, ANDROID_SDK should be provided with -D * One more thing we could mention in the docs that I ran into: Installing java with apt gave me an incompatible version. It worked better to just -DJAVA_HOME= to the java that comes with Android studio (/snap/android-studio/91/android-studio/jre on ubuntu).
This commit is contained in:
parent
ee95e6c6bd
commit
27384ac62c
|
@ -644,7 +644,6 @@ elseif(ANDROID)
|
|||
)
|
||||
|
||||
if(LOVR_BUILD_EXE)
|
||||
get_filename_component(ANDROID_SDK "${ANDROID_NDK}" DIRECTORY) # SDK root is parent of NDK dir
|
||||
set(ANDROID_JAR "${ANDROID_SDK}/platforms/${ANDROID_PLATFORM}/android.jar")
|
||||
set(ANDROID_TOOLS "${ANDROID_SDK}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}")
|
||||
|
||||
|
|
|
@ -114,11 +114,12 @@ size_t lovrPlatformGetExecutablePath(char* buffer, size_t size) {
|
|||
}
|
||||
|
||||
static char apkPath[1024];
|
||||
size_t lovrPlatformGetBundlePath(char* buffer, size_t size) {
|
||||
size_t lovrPlatformGetBundlePath(char* buffer, size_t size, const char** root) {
|
||||
size_t length = strlen(apkPath);
|
||||
if (length >= size) return 0;
|
||||
memcpy(buffer, apkPath, length);
|
||||
buffer[length] = '\0';
|
||||
*root = "/assets";
|
||||
return length;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue