请问HN:Antigravity 2.0 安装程序破坏了现有的 Antigravity IDE。

2作者: jdw64大约 1 个月前原帖
如果您在昨天发布的2.0版本之前安装了Antigravity IDE,那么现在这两个产品都位于同一个目录中,并且实际上只有一个可以运行。双击Antigravity IDE.exe会启动2.0版本。 Electron的可执行文件首先加载resources/app.asar,然后加载resources/app/,这两个文件都位于与可执行文件相同的文件夹中。可执行文件的名称对这个查找没有影响。2.0版本的安装程序将app.asar(2.0代码)放置在IDE的app/文件夹旁边,而asar文件优先级更高,因此Antigravity IDE.exe和Antigravity.exe最终都加载了2.0版本。 如果您打开窗口,请启动PowerShell。 解决方法: ``` cd "$env:LOCALAPPDATA\Programs\Antigravity\resources" Rename-Item app.asar app.asar.bak ``` 这样,Antigravity IDE.exe就会回退到IDE的app/文件夹,并启动真实的IDE 1.107.0。重新命名回去可以恢复2.0版本。 注意:一次只能运行一个。将app.asar重命名后,Antigravity.exe也会回退到IDE文件夹。永久解决方案是卸载两个程序并重新安装到不同的目录中——安装程序是Inno Setup(unins000.exe),因此`/DIR="..."`应该可以正常工作。 这不是Electron的错误。基于位置的加载是文档中记录的行为。这是谷歌2.0安装程序的打包错误,假设两个独立的Electron产品可以共享一个安装目录。
查看原文
If you had Antigravity IDE installed before yesterday&#x27;s 2.0 release, both products now live in the same directory and only one of them actually runs. Double-clicking Antigravity IDE.exe launches 2.0.<p>Electron exes load resources&#x2F;app.asar first, then resources&#x2F;app&#x2F;, from the same folder as the exe. The exe name has no effect on this lookup. The 2.0 installer dropped app.asar (2.0 code) next to the IDE&#x27;s app&#x2F; folder, and the asar wins — so both Antigravity IDE.exe and Antigravity.exe end up loading 2.0. if you window, Turn on the powershell<p>Workaround: cd &quot;$env:LOCALAPPDATA\Programs\Antigravity\resources&quot; Rename-Item app.asar app.asar.bak<p>Antigravity IDE.exe then falls back to the IDE&#x27;s app&#x2F; folder and launches the real IDE 1.107.0. Rename back to restore 2.0.<p>Caveat: only one at a time. With app.asar renamed aside, Antigravity.exe also falls back to the IDE folder. Permanent fix is to uninstall both and reinstall to separate directories — the installer is Inno Setup (unins000.exe), so &#x2F;DIR=&quot;...&quot; should work. Not an Electron bug. Location-based loading is documented behavior. This is a packaging mistake in Google&#x27;s 2.0 installer assuming two separate Electron products can share an install directory.