INNER CODE UNIT · Python
link
libriscv/godot-sandbox · scripts/demo_compat.py:284
link = addon / LIBRARY_NAME
link.symlink_to(library)
descriptor = f"""[configuration]
entry_symbol = "{ENTRY_SYMBOL}"
compatibility_minimum = "{MINIMUM_VERSION}"
[libraries]
linux.debug.x86_64 = "./{LIBRARY_NAME}"
linux.release.x86_64 = "./{LIBRARY_NAME}"
"""
atomic_write(addon / DESCRIPTOR_NAME, descriptor.encode())
godot_dir = project / ".godot"
godot_dir.mkdir(exist_ok=True)
extensions = godot_dir / "extension_list.cfg"
existing = extensions.read_text(encoding="utf-8").splitlines() if extensions.exists() else []