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

Update 2.0-dev to Godot 4.2 + mingw support #151

Open
wants to merge 26 commits into
base: 2.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7562e07
Remove long-useless macOS support from SConstruct
vilhalmer Jan 18, 2024
b95335e
Update godot-cpp to track 4.2
vilhalmer Jan 18, 2024
1ed8979
Update openvr to 2.0.10
vilhalmer Jan 18, 2024
2af4250
Add support for mingw and finding system libopenvr
vilhalmer Jan 18, 2024
66085c0
Update extension interface for 4.1+
vilhalmer Jan 18, 2024
5db5aa8
Update to current GDExtension and godot-cpp APIs
vilhalmer Jan 18, 2024
49b0ff7
Finish getting it to compile against latest godot-cpp
vilhalmer Jan 18, 2024
cc9ca9d
Remove bundled godot-xr-tools
vilhalmer Jan 18, 2024
9cf2581
Get demo loading most of the way in 4.2
vilhalmer Jan 18, 2024
fcc0b18
Fix getter names in ButtonStates
vilhalmer Jan 19, 2024
b1d4adc
Inherit overlay from SubViewport
vilhalmer Jan 19, 2024
588de0c
Use patched openvr header when compiling with mingw
vilhalmer Feb 4, 2024
3e6c378
Enable XR shaders in demo project
vilhalmer Feb 4, 2024
d12c329
Add autoload singleton to register XR interface with server
vilhalmer Feb 5, 2024
7247f83
Add openxr action map
vilhalmer Feb 5, 2024
60b56c2
Fix accidentally-transposed transform matrix
vilhalmer Feb 5, 2024
725a8dc
Fix editor crash on overlay node creation
vilhalmer Feb 12, 2024
463e496
Fix up action manifest loading
vilhalmer Feb 22, 2024
f6519e1
Miscellaneous parameter cleanups in demo
vilhalmer Feb 23, 2024
59566fb
Default to static libc++ to match godot-cpp
vilhalmer Feb 25, 2024
59e531b
Update README
vilhalmer Feb 25, 2024
cf918c0
Clean up most build TODOs with deferred tool initialization.
vilhalmer Feb 27, 2024
4e7cee9
Remove CRT debug flag to match godot and godot-cpp
vilhalmer Mar 2, 2024
af07c5f
Fix up formatting in register_types
vilhalmer Mar 2, 2024
67175f6
Fix linux built by setting default tool
vilhalmer Apr 24, 2024
80e9e45
Update github workflow
vilhalmer Apr 24, 2024
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
88 changes: 29 additions & 59 deletions .github/workflows/build-on-push.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@

# Workflow to automatically compile a Linux/Windows/OSX library on commit/push
name: Build on push

# TODO: Update asset actions from v3 to v4. There are breaking changes, need to verify that our config will still work.
# TODO: Add mingw to matrix

# Controls when the action will run. Triggers the workflow on push or pull request
# events, but only for the master branch we'll create .zip files
on:
[push, pull_request]
on: [push, pull_request]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This job builds the plugin for our target platforms
build:
name: Building for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand All @@ -21,81 +19,53 @@ jobs:
platform: linux
- os: windows-latest
platform: windows
# - os: macOS-latest
# platform: osx

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: 'recursive'

- name: Install scons (Ubuntu)
- name: Install dependencies (Ubuntu)
run: |
sudo apt install scons
sudo apt-get update -qq
sudo apt-get install -qqq build-essential pkg-config
if: matrix.os == 'ubuntu-20.04'

- name: Install scons (Windows)
run: |
pip install scons
if: matrix.os == 'windows-latest'
- name: Set up Python (for SCons)
uses: actions/setup-python@v5
with:
python-version: '3.x'

# - name: Install scons (macOS)
# run: |
# brew install scons
# if: matrix.os == 'macos-latest'
- name: Install scons
run: |
python -m pip install scons~=4.0

- name: Run the build for godot-cpp
run: |
cd $GITHUB_WORKSPACE/godot-cpp
scons platform=${{ matrix.platform }} -j2 target=release generate_bindings=yes bits=64
if: matrix.os != 'windows-latest'
scons -C godot-cpp platform=${{ matrix.platform }} -j2 target=template_release generate_bindings=yes bits=64

- name: Run the build for godot_openvr
run: |
cd $GITHUB_WORKSPACE
scons platform=${{ matrix.platform }} -j2 target=release bits=64
if: matrix.os != 'windows-latest'

- name: Run the build for godot-cpp (Windows)
run: |
cd ${env:GITHUB_WORKSPACE}/godot-cpp
scons platform=${{ matrix.platform }} -j2 target=release generate_bindings=yes bits=64
if: matrix.os == 'windows-latest'

- name: Run the build for godot_openvr (Windows)
run: |
cd ${env:GITHUB_WORKSPACE}
scons platform=${{ matrix.platform }} -j2 target=release bits=64
if: matrix.os == 'windows-latest'

- name: Upload build files (artifacts) (Linux)
uses: actions/upload-artifact@v2
- name: Upload build files (artifacts) (Linux)
uses: actions/upload-artifact@v3
with:
name: build-files-linux
path: |
demo/addons/godot-openvr/bin/x11/libgodot_openvr.so
openvr/bin/linux64/libopenvr_api.so
if: matrix.os == 'ubuntu-20.04'

# - name: Upload build files (artifacts) (macOS)
# uses: actions/upload-artifact@v2
# with:
# name: build-files-macos
# path: |
# demo/addons/godot-openvr/bin/osx/libgodot_openvr.dylib
# openvr/bin/osx32/OpenVR.framework
# if: matrix.os == 'macos-latest'

- name: Upload build files (artifacts) (Windows)
uses: actions/upload-artifact@v2
- name: Upload build files (artifacts) (Windows)
uses: actions/upload-artifact@v3
with:
name: build-files-windows
path: |
demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll
openvr/bin/win64/openvr_api.dll
if: matrix.os == 'windows-latest'

# This job collects the build output and assembles the final asset (artifact)
asset:
name: Assembling the asset (artifact)
Expand All @@ -105,21 +75,19 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: 'GodotVR/godot_openvr'
path: godot_openvr
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Copy files to destination
run: |
mkdir godot_openvr_plugin
mkdir godot_openvr_plugin/addons
cp -r godot_openvr/demo/addons/godot-openvr godot_openvr_plugin/addons
cp build-files-linux/demo/addons/godot-openvr/bin/x11/libgodot_openvr.so godot_openvr_plugin/addons/godot-openvr/bin/x11/libgodot_openvr.so
cp build-files-linux/openvr/bin/linux64/libopenvr_api.so godot_openvr_plugin/addons/godot-openvr/bin/x11/libopenvr_api.so
# cp build-files-macos/demo/addons/godot-openvr/bin/osx/libgodot_openvr.dylib godot_openvr_plugin/addons/godot-openvr/bin/osx/libgodot_openvr.dylib
# cp -r build-files-macos/openvr/bin/osx32/OpenVR.framework godot_openvr_plugin/addons/godot-openvr/bin/osx/OpenVR.framework
cp build-files-windows/demo/addons/godot-openvr/bin/win64/libgodot_openvr.dll godot_openvr_plugin/addons/godot-openvr/bin/win64/libgodot_openvr.dll
cp build-files-windows/openvr/bin/win64/openvr_api.dll godot_openvr_plugin/addons/godot-openvr/bin/win64/openvr_api.dll
- name: Calculate GIT short ref
Expand All @@ -135,7 +103,6 @@ jobs:
- name: Clean up extracted files
run: |
rm -rf build-files-linux
#rm -rf build-files-macos
rm -rf build-files-windows
rm -rf godot_openvr
mv godot_openvr_plugin godot_openvr_${{ env.GITHUB_SHA_SHORT }}
Expand All @@ -151,6 +118,9 @@ jobs:
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags')

# TODO: Both create-release and upload-release-asset are abandonded, need to port to maintained replacements. Both suggest replacements in their README.

- name: Create release for asset
id: create_release
uses: actions/create-release@v1
Expand All @@ -165,12 +135,12 @@ jobs:
prerelease: true
if: github.ref == 'refs/heads/master'
- name: Upload asset
id: upload-release-asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./godot-openvr.zip
asset_name: godot-openvr.zip
asset_content_type: application/zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Thumbs.db
*.idb
*.ilk
*.dll
demo/addons/godot-xr-tools
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
[submodule "godot-cpp"]
path = godot-cpp
url = https://github.com/godotengine/godot-cpp
branch = 4.2
Loading