Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions multigravity.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ $BASE = if ($env:MULTIGRAVITY_HOME) { $env:MULTIGRAVITY_HOME } else { "$env:USER

function Find-Antigravity {
$paths = @(
"$env:LOCALAPPDATA\Programs\Antigravity\Antigravity.exe",
"$env:PROGRAMFILES\Antigravity\Antigravity.exe",
"${env:ProgramFiles(x86)}\Antigravity\Antigravity.exe"
# Look for the new IDE executable in the standard installation paths
"$env:LOCALAPPDATA\Programs\Antigravity IDE\Antigravity-IDE.exe",
"$env:PROGRAMFILES\Antigravity-ide\Antigravity-ide.exe",
"${env:ProgramFiles(x86)}\Antigravity IDE\Antigravity IDE.exe",
# Fallbacks in case it installed inside the original folder
"$env:LOCALAPPDATA\Programs\Antigravity IDE\Antigravity IDE.exe",
"$env:PROGRAMFILES\Antigravity IDE\Antigravity IDE.exe",
"${env:ProgramFiles(x86)}\Antigravity IDE\Antigravity IDE.exe"
)
foreach ($p in $paths) {
if (Test-Path $p) { return $p }
}

# Try to find in PATH
$exeCommand = Get-Command antigravity.exe -ErrorAction SilentlyContinue
$exeCommand = Get-Command antigravity-ide.exe -ErrorAction SilentlyContinue
if ($exeCommand) { return $exeCommand.Source }

return $null
Expand Down Expand Up @@ -99,6 +104,9 @@ function Invoke-CreateProfile {
$PROFILE_DIR = "$BASE\$PROFILE"

New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\.antigravity\extensions" | Out-Null
# --- ADD THIS NEW LINE ---
New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\.antigravity-ide\extensions" | Out-Null
# -------------------------
New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\AppData\Roaming" | Out-Null
New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\AppData\Local" | Out-Null
}
Expand Down Expand Up @@ -139,6 +147,18 @@ function Invoke-CreateAuthOnlyProfile {
} else {
New-Item -ItemType Directory -Force -Path $extDir | Out-Null
}
# --- ADD THIS NEW BLOCK FOR THE 2.0.1 IDE ---
$sysIdeExt = "$env:USERPROFILE\.antigravity-ide\extensions"
$ideExtDir = "$PROFILE_DIR\.antigravity-ide\extensions"

if (Test-Path $sysIdeExt) {
if (Test-Path $ideExtDir) { Remove-Item $ideExtDir -Force -ErrorAction SilentlyContinue }
New-Item -ItemType Directory -Force -Path "$PROFILE_DIR\.antigravity-ide" | Out-Null
New-Item -ItemType SymbolicLink -Path $ideExtDir -Target $sysIdeExt -ErrorAction SilentlyContinue | Out-Null
} else {
New-Item -ItemType Directory -Force -Path $ideExtDir | Out-Null
}
# --------------------------------------------
}

function Invoke-LaunchProfile {
Expand Down Expand Up @@ -376,7 +396,7 @@ function Invoke-ProfileStats {
$profiles = Get-ChildItem -Directory -Path $BASE | Where-Object { $_.Name -ne ".templates" }
foreach ($p in $profiles) {
$size = Get-FolderSize $p.FullName
$extPath = Join-Path $p.FullName ".antigravity\extensions"
$extPath = Join-Path $p.FullName ".antigravity-ide\extensions"
$extCount = if (Test-Path $extPath) { (Get-ChildItem $extPath).Count } else { 0 }
Write-Host ("{0,-20} {1,-10} {2,-10}" -f $p.Name, $size, $extCount)
}
Expand Down