GodotVR / godot_oculus_mobile

Godot Oculus mobile drivers (Oculus Go / Oculus Quest)
MIT License
170 stars 34 forks source link

Version 2.0 #93

Closed m4gr3d closed 4 years ago

m4gr3d commented 4 years ago

@NeoSpark314 @BastiaanOlij Now that the Android plugin re-architecture has been merged (https://github.com/godotengine/godot/pull/33682 and https://github.com/godotengine/godot/pull/36336), I'll be merging the 2.0 branch into master.

Can you take a look at the 2.0 branch and ensure that the migration to the new workflow won't be an issue.

Thanks!

BastiaanOlij commented 4 years ago

I'll have a look tonight, then this weekend I'll start having a look at what this all means for the ARCore work ;)

NeoSpark314 commented 4 years ago

I'll try to have a look this weekend too. Hope to find enough time to really play with it; looks really promising for ease of use.

NeoSpark314 commented 4 years ago

I checkout out your branch and try to build it on Windows.

At the moment I'm getting the following error during build; I don't now yet what might cause this; maybe you see something from the error message. the mentioned .so file armeabi-v7a/Debug/libvrapi.so seems to be located in the right folder

.\gradlew.bat :generatePluginBinary

> Configure project :plugin
WARNING: Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
Support for ANDROID_NDK_HOME is deprecated and will be removed in the future. Use android.ndkVersion in build.gradle instead.
File C:\Users\neosp\.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 29.0.1 in D:\software\android\licenses
License for package Android SDK Build-Tools 29.0.1 accepted.
Preparing "Install Android SDK Build-Tools 29.0.1 (revision: 29.0.1)".
"Install Android SDK Build-Tools 29.0.1 (revision: 29.0.1)" ready.
Installing Android SDK Build-Tools 29.0.1 in D:\software\android\build-tools\29.0.1
"Install Android SDK Build-Tools 29.0.1 (revision: 29.0.1)" complete.
"Install Android SDK Build-Tools 29.0.1 (revision: 29.0.1)" finished.
Checking the license for package Android SDK Platform 29 in D:\software\android\licenses
License for package Android SDK Platform 29 accepted.
Preparing "Install Android SDK Platform 29 (revision: 4)".
"Install Android SDK Platform 29 (revision: 4)" ready.
Installing Android SDK Platform 29 in D:\software\android\platforms\android-29
"Install Android SDK Platform 29 (revision: 4)" complete.
"Install Android SDK Platform 29 (revision: 4)" finished.

> Task :plugin:externalNativeBuildDebug FAILED
Build godot_ovrmobile_armeabi-v7a
ninja: Entering directory `D:\programming\godot\2.0_godot_oculus_mobile\plugin\.cxx\cmake\debug\armeabi-v7a'
ninja: error: '../../../../libs/ovr_sdk_mobile/VrApi/Libs/Android/armeabi-v7a/Debug/libvrapi.so', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libgodot_ovrmobile.so', missing and no known rule to make it

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plugin:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process D:\software\android\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C D:\programming\godot\2.0_godot_oculus_mobile\plugin\.cxx\cmake\debug\armeabi-v7a godot_ovrmobile}
  ninja: Entering directory `D:\programming\godot\2.0_godot_oculus_mobile\plugin\.cxx\cmake\debug\armeabi-v7a'

  ninja: error: '../../../../libs/ovr_sdk_mobile/VrApi/Libs/Android/armeabi-v7a/Debug/libvrapi.so', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libgodot_ovrmobile.so', missing and no known rule to make it
m4gr3d commented 4 years ago

@NeoSpark314 your path to the ovr_sdk_mobile seems strange since the libs directory should be in the same directory as the CMakeLists.txt file, hence there shouldn't be any ... It could be that from where you're invoking the build command, that path is invalid, or your CMakeLists.txt file was modified. You should ensure that the Oculus mobile sdk is in the <checkout_root_directory>/plugin/libs/ovr_sdk_mobile.

NeoSpark314 commented 4 years ago

Thank you; that was exactly the issue; I did not move the ovr_sdk_mobile into the plugin folder. Not it builds.

Next I tried to use the resulting .aar file in the demo but ran into the following issues (I have not yet any experience with godot custom android builds :|)

When I try to run it from the demo folder directly in the git I get this gradle build error (screenshot because the copy-text funciton did not work for me): It somehow accesses the gradle file from the folder above: image

When I move the demo folder outside of the git I get: image

m4gr3d commented 4 years ago

@NeoSpark314 I've added https://github.com/godotengine/godot/pull/37256 to fix the build issue. The quick fix is to add an empty settings.gradle file to the res://android/build directory.