Setup addon installation from submodules

This commit is contained in:
Marek S. Łukasiewicz 2025-01-31 14:53:09 +01:00
parent 379adbb397
commit 432dca80d0
5 changed files with 18 additions and 0 deletions

4
.gitignore vendored
View file

@ -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

View file

@ -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

View file

@ -0,0 +1 @@
uid://46i64f2dmonl

View file

@ -0,0 +1 @@
uid://c086s0jrgaiwi

11
update_addons.py Normal file
View file

@ -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,
)