From 3f4c9b7be4d363bf672c73b83cf596ec80885ce2 Mon Sep 17 00:00:00 2001 From: jschantli Date: Wed, 7 Oct 2026 18:12:13 -0700 Subject: [PATCH] Fixed missing Antigravity icons by extracting them from app.asar --- postinstall.sh | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/postinstall.sh b/postinstall.sh index 86c1e62..bb5cee5 100644 --- a/postinstall.sh +++ b/postinstall.sh @@ -572,9 +572,28 @@ install_antigravity() { sudo ln -sfn /opt/antigravity/antigravity /usr/local/bin/antigravity sudo mkdir -p /usr/share/applications /usr/share/icons/hicolor/512x512/apps - if [ -f "/opt/antigravity/resources/app/resources/linux/code.png" ]; then - sudo cp "/opt/antigravity/resources/app/resources/linux/code.png" /usr/share/icons/hicolor/512x512/apps/antigravity.png + + # Extract icon from app.asar + if [ -f "/opt/antigravity/resources/app.asar" ]; then + sudo python3 - /opt/antigravity/resources/app.asar /usr/share/icons/hicolor/512x512/apps/antigravity.png <<'PY' +import json, struct, sys +from pathlib import Path +asar = Path(sys.argv[1]) +out = Path(sys.argv[2]) +with asar.open('rb') as f: + f.read(4) + header_size = struct.unpack(' /usr/share/applications/antigravity.desktop' < /usr/share/applications/antigravity-ide.desktop' <