"""Manually install android build template from export templates.""" import zipfile import os source_zip = r"C:\Users\John\AppData\Roaming\Godot\export_templates\4.6.1.stable\android_source.zip" dest_dir = r"C:\git\g1-teleop\android\build" if not os.path.exists(source_zip): print(f"ERROR: android_source.zip not found at {source_zip}") exit(1) os.makedirs(dest_dir, exist_ok=True) with zipfile.ZipFile(source_zip, 'r') as z: names = z.namelist() print(f"android_source.zip contains {len(names)} files") # Show top-level structure top = set() for n in names: parts = n.split('/') if parts[0]: top.add(parts[0]) print(f"Top-level entries: {sorted(top)}") z.extractall(dest_dir) print(f"Extracted to {dest_dir}") # Update build version version_file = r"C:\git\g1-teleop\android\.build_version" with open(version_file, 'w') as f: f.write("4.6.1.stable\n") print(f"Updated {version_file} to 4.6.1.stable") print("\nDone!")