From 379adbb3970dd813ec3a47336d52651b106575cb Mon Sep 17 00:00:00 2001 From: attila-vr Date: Fri, 31 Jan 2025 14:37:59 +0100 Subject: [PATCH 1/2] Add godot-xr-tools submodule --- .gitmodules | 3 +++ modules/godot-xr-tools | 1 + 2 files changed, 4 insertions(+) create mode 160000 modules/godot-xr-tools diff --git a/.gitmodules b/.gitmodules index 223680a..3449673 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "modules/mavlink"] path = modules/mavlink url = https://github.com/marsh-sim/mavlink.git +[submodule "modules/godot-xr-tools"] + path = modules/godot-xr-tools + url = https://github.com/GodotVR/godot-xr-tools.git diff --git a/modules/godot-xr-tools b/modules/godot-xr-tools new file mode 160000 index 0000000..d36af37 --- /dev/null +++ b/modules/godot-xr-tools @@ -0,0 +1 @@ +Subproject commit d36af3730e1a7671cfe379b5531b6e68abeb3504 From 432dca80d05efce19d4c9dfc51fb9a13ae10d369 Mon Sep 17 00:00:00 2001 From: "Marek S. Lukasiewicz" Date: Fri, 31 Jan 2025 14:53:09 +0100 Subject: [PATCH 2/2] Setup addon installation from submodules --- .gitignore | 4 ++++ README.md | 1 + project/addons/godot-xr-tools/plugin.gd.uid | 1 + project/addons/godot-xr-tools/xr_tools.gd.uid | 1 + update_addons.py | 11 +++++++++++ 5 files changed, 18 insertions(+) create mode 100644 project/addons/godot-xr-tools/plugin.gd.uid create mode 100644 project/addons/godot-xr-tools/xr_tools.gd.uid create mode 100644 update_addons.py diff --git a/.gitignore b/.gitignore index 5e3cbff..4d1dfd1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,10 @@ compile_commands.json # Generated MAVLink headers /include/mavlink +# Ignore addons files (copied from submodules), except uid created on import +/project/addons/godot-xr-tools/** +!/project/addons/godot-xr-tools/**/*.uid + # Created by https://www.toptal.com/developers/gitignore/api/c++,godot,scons,python # Edit at https://www.toptal.com/developers/gitignore?templates=c++,godot,scons,python diff --git a/README.md b/README.md index aa6fcd1..cfed8ed 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Some files are generated, run the following commands on first setup and when dep godot --dump-extension-api # after updating Godot scons compile_commands # after modifying SConstruct python update_mavlink.py # after updating MAVLink dialect +python update_addons.py # after changing any addon submodules ``` ### Windows setup diff --git a/project/addons/godot-xr-tools/plugin.gd.uid b/project/addons/godot-xr-tools/plugin.gd.uid new file mode 100644 index 0000000..6116563 --- /dev/null +++ b/project/addons/godot-xr-tools/plugin.gd.uid @@ -0,0 +1 @@ +uid://46i64f2dmonl diff --git a/project/addons/godot-xr-tools/xr_tools.gd.uid b/project/addons/godot-xr-tools/xr_tools.gd.uid new file mode 100644 index 0000000..ee86026 --- /dev/null +++ b/project/addons/godot-xr-tools/xr_tools.gd.uid @@ -0,0 +1 @@ +uid://c086s0jrgaiwi diff --git a/update_addons.py b/update_addons.py new file mode 100644 index 0000000..151aea3 --- /dev/null +++ b/update_addons.py @@ -0,0 +1,11 @@ +from os import path +from shutil import copytree + +# add repository root path +root_path = path.abspath(path.dirname(__file__)) + +copytree( + path.join(root_path, 'modules', 'godot-xr-tools', 'addons'), + path.join(root_path, 'project', 'addons'), + dirs_exist_ok=True, +)