Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Support for The Mirror for Meta Quest 2/3 #193

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/client-build-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ on:
template-download-url:
required: true
type: string
vr-dependencies:
required: false
type: boolean
default: false
outputs:
url:
value: ${{ jobs.client-build-tool.outputs.url }}
Expand Down Expand Up @@ -158,6 +162,11 @@ jobs:
mv ./app-clone/mirror-godot-app/* .
ls -lah

- name: Remove VR Requirements (if not for meta quest etc)
if: ${{ !inputs.vr-dependencies }}
run: |
rm -rf ./addons/mirror_internal/godotopenxrvendors/

- name: Use custom project file (required for custom splash screen)
if: ${{ inputs.custom-project-file }}
run: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/deployment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ concurrency:
cancel-in-progress: true

jobs:
get-or-build-engine:
name: Building Engine
uses: ./.github/workflows/engine.yml
with:
environment: ""
self-hosted-runner: ${{ github.event.repository.name != 'the-mirror' }}
deploy-to-gcp: false # in the future if we can figure out how to make this secure we may re-enable this.
build-windows-client:
name: 🏁 Build Windows Dev PR
uses: ./.github/workflows/client-build-tool.yml
Expand Down
116 changes: 115 additions & 1 deletion .github/workflows/engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ on:
self-hosted-runner:
required: true
type: boolean
deploy-to-gcp:
required: false
type: boolean
default: true
secrets:
GCP_BUCKET_UPLOAD:
required: true
required: false
outputs:
commit_hash:
value: ${{ jobs.build-windows.outputs.commit_hash }}
Expand Down Expand Up @@ -128,10 +132,12 @@ jobs:
name: ${{ matrix.artifact-name }}.exe

- uses: 'google-github-actions/auth@v2'
if: ${{ inputs.deploy-to-gcp }}
with:
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'

- name: Upload binary
if: ${{ inputs.deploy-to-gcp }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: ./godot-engine/bin/${{ matrix.artifact-name }}.exe
Expand Down Expand Up @@ -269,10 +275,12 @@ jobs:
path: "./godot-engine/bin/${{ matrix.artifact-name }}.zip"

- uses: 'google-github-actions/auth@v2'
if: ${{ inputs.deploy-to-gcp }}
with:
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'

- name: Upload binary
if: ${{ inputs.deploy-to-gcp }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: ./godot-engine/bin/${{ matrix.artifact-name }}.zip
Expand Down Expand Up @@ -381,11 +389,117 @@ jobs:
name: ${{ matrix.artifact-name }}

- uses: 'google-github-actions/auth@v2'
if: ${{ inputs.deploy-to-gcp }}
with:
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'

- name: Upload binary
if: ${{ inputs.deploy-to-gcp }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: ./godot-engine/bin/${{ matrix.artifact-name }}
destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/
build-android-linux:
runs-on: ${{ inputs.self-hosted-runner && 'linux-mirror' || 'ubuntu-22.04' }}
name: ${{ matrix.name }}
environment: ${{ inputs.environment }}
strategy:
fail-fast: false
matrix:
include:
- name: Android Template
cache-name: android-template
target: template_debug
strip: true
sconsflags: debug_symbols=no optimize=speed
bin: "./bin/godot.linuxbsd.template_debug.x86_64"
artifact-name: "android-template"
artifact: true
tests: no
bucket-name: mirror_native_client_builds/Engine

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17

- name: Check versions of the compiler
run: |
ldd --version
gcc --version
cmake --version

- name: Get short commit hash
id: vars
run: |
echo "Git hash: $(git rev-parse --short=8 HEAD)"
echo "sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT

- name: Ensuring git hash exists (or will fail job)
if: steps.vars.outputs.sha_short == ''
run: exit 1

- name: Setup Godot build cache
uses: ./godot-engine/.github/actions/godot-cache
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true

- name: Setup scons
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons==4.4.0
scons --version

- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master

- name: Compilation (arm64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm64
platform: android
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}

- name: Compilation (arm32)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm32
platform: android
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}

- name: Generate Godot templates
run: |
cd platform/android/java
./gradlew generateGodotTemplates
cd ../../..
ls -l bin/
zip -r android-template.zip bin/

- name: Upload artifact
uses: ./.github/actions/upload-artifact
if: ${{ matrix.artifact }}
with:
path: ./godot-engine/android-template.zip
name: ${{ matrix.artifact-name }}

- uses: 'google-github-actions/auth@v2'
if: ${{ inputs.deploy-to-gcp }}
with:
credentials_json: '${{ secrets.GCP_BUCKET_UPLOAD }}'

- name: Upload binary
if: ${{ inputs.deploy-to-gcp }}
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: ./godot-engine/bin/${{ matrix.artifact-name }}
destination: ${{ matrix.bucket-name }}/${{steps.vars.outputs.sha_short}}/
5 changes: 5 additions & 0 deletions mirror-godot-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ node_modules

# Voxel terrain
voxels.db

# Fix broken files from being checked into the repo
# caused by the openxr modules
~*.dll
*.tmp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func _export_end() -> void:
print("finished export - making cicd specific binaries")
assert(not _path.is_empty())
assert(not _features.is_empty())
if _export_platform.is_empty():
if _export_platform.is_empty() or _export_platform == "android":
return
print("Export platform: ", _export_platform)
# We compress platforms we support, but not game server builds
# The game server builds are a special case and are uploaded in two files.
# They are uncompressed to gcp.
Expand All @@ -48,6 +49,8 @@ static func _get_platform_name(platform: EditorExportPlatform) -> String:
return "windows"
elif platform is EditorExportPlatformMacOS:
return "macos"
elif platform is EditorExportPlatformAndroid:
return "android"
return ""


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Change history for the Godot OpenXR loaders asset

## 2.0.3
- Migrate the export scripts from gdscript to C++ via gdextension
- Manually request eye tracking permission if it's included in the app manifest
- Change how singletons are accessed
- Fix the plugin version for the export plugins
- Add OpenXR extension wrappers for fb_scene, fb_spatial_entity, fb_spatial_entity_query, fb_spatial_entity_container

## 2.0.0
- Update to the new Godot 4.2 Android plugin packaging format
- Update the plugin to Godot v2 Android plugin
- Update to the Godot 4.2 Android library
- Add warning when multiple loaders are selected
- Add configs for the OpenXR Eye gaze interaction extension
- Add the ability to customize supported Meta devices
- Add support for Quest 3 devices
- Update the directory structure for the v2 plugin
- Update Meta OpenXR mobile SDK to version 57
- Update the java version to 17
- Rename the plugin to 'Godot OpenXR Vendors'
- Add godot-cpp dependency
- Add OpenXR 1.0.30 headers
- Add support for the Meta scene capture API (Donated by [Migeran](https://migeran.com))

## 1.1.0
- Update Meta OpenXR loader to version 54
- Update PICO OpenXR loader to version 2.2.0
- Bump dependencies versions to match the latest Godot 4.x stable version (v4.0.3)

## 1.0.0
- First version
- Added support for Meta Quest loader
- Added support for Pico loader
- Added support for Khronos loader (Magic Leap 2, HTC, etc.)
- Added support for Lynx loader
- Add logic to automatically publish the Godot OpenXR loaders libraries to mavencentral on release
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading