From 432dca80d05efce19d4c9dfc51fb9a13ae10d369 Mon Sep 17 00:00:00 2001 From: "Marek S. Lukasiewicz" Date: Fri, 31 Jan 2025 14:53:09 +0100 Subject: [PATCH] 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, +)