diff --git a/.gitignore b/.gitignore index 4d1dfd1..6530f70 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,11 @@ compile_commands.json # Ignore addons files (copied from submodules), except uid created on import /project/addons/godot-xr-tools/** !/project/addons/godot-xr-tools/**/*.uid +/project/addons/gdcef/** +!/project/addons/gdcef/**/*.uid + +# Chrome Embedded Framework binaries +/project/cef_artifacts # 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 c9831c4..1b4c3ad 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ godot --dump-extension-api # after updating Godot python update_mavlink.py # after updating MAVLink dialect python update_addons.py # after changing any addon submodules scons compile_commands # after modifying SConstruct +cd project/addons/gdcef; python build.py ``` ### Windows setup diff --git a/update_addons.py b/update_addons.py index 151aea3..c7d17aa 100644 --- a/update_addons.py +++ b/update_addons.py @@ -1,11 +1,29 @@ from os import path from shutil import copytree -# add repository root path +# Add repository root path root_path = path.abspath(path.dirname(__file__)) +# Copy the addon folder from each module copytree( - path.join(root_path, 'modules', 'godot-xr-tools', 'addons'), + path.join(root_path, 'modules', 'gdcef', 'addons'), path.join(root_path, 'project', 'addons'), dirs_exist_ok=True, ) + +# Configure gdcef version for precompiled binaries +gdcef_build = path.join(root_path, 'project', 'addons', 'gdcef', 'build.py') +gdcef_lines = [] + +with open(gdcef_build, 'r', encoding='utf-8') as file: + gdcef_lines = file.readlines() + +for i, line in enumerate(gdcef_lines): + if not line.startswith('GITHUB_GDCEF_RELEASE'): + continue + gdcef_lines[i] = 'GITHUB_GDCEF_RELEASE = "0.16.1"\n' + break + +with open(gdcef_build, 'w', encoding='utf-8') as file: + file.writelines(gdcef_lines) +