21 lines
556 B
Python
21 lines
556 B
Python
import zipfile, shutil, os
|
|
|
|
vsix = r"c:\Users\Variet-Worker\Desktop\gravity_control\extension\gravity-bridge-0.5.14.vsix"
|
|
dest = os.path.expanduser(r"~\.antigravity\extensions\variet.gravity-bridge-0.5.14")
|
|
tmp = r"C:\tmp\vsix_extract"
|
|
|
|
if os.path.exists(tmp):
|
|
shutil.rmtree(tmp)
|
|
os.makedirs(tmp, exist_ok=True)
|
|
|
|
with zipfile.ZipFile(vsix, 'r') as z:
|
|
z.extractall(tmp)
|
|
|
|
src = os.path.join(tmp, "extension")
|
|
if os.path.exists(dest):
|
|
shutil.rmtree(dest)
|
|
|
|
shutil.copytree(src, dest)
|
|
print(f"Installed to {dest}")
|
|
print("Files:", os.listdir(dest))
|