mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-02-19 07:36:42 -05:00
Supply vscode paths lazily for windows
This commit is contained in:
@@ -52,71 +52,71 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
||||
}
|
||||
};
|
||||
|
||||
WindowsType VSCODIUM_WINDOWS = new VsCodeWindowsType("app.vscodium", "https://vscodium.com/", AppSystemInfo.ofWindows()
|
||||
WindowsType VSCODIUM_WINDOWS = new VsCodeWindowsType("app.vscodium", "https://vscodium.com/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("VSCodium")
|
||||
.resolve("bin")
|
||||
.resolve("codium.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("VSCodium")
|
||||
.resolve("VSCodium.exe"));
|
||||
|
||||
WindowsType ANTIGRAVITY_WINDOWS = new VsCodeWindowsType("app.antigravity", "https://antigravity.google/", AppSystemInfo.ofWindows()
|
||||
WindowsType ANTIGRAVITY_WINDOWS = new VsCodeWindowsType("app.antigravity", "https://antigravity.google/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Antigravity")
|
||||
.resolve("bin")
|
||||
.resolve("antigravity.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Antigravity")
|
||||
.resolve("Antigravity.exe"));
|
||||
|
||||
WindowsType CURSOR_WINDOWS = new VsCodeWindowsType("app.cursor", "https://cursor.com/", AppSystemInfo.ofWindows()
|
||||
WindowsType CURSOR_WINDOWS = new VsCodeWindowsType("app.cursor", "https://cursor.com/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("cursor")
|
||||
.resolve("bin")
|
||||
.resolve("cursor.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("cursor")
|
||||
.resolve("Cursor.exe"));
|
||||
|
||||
WindowsType VOID_WINDOWS = new VsCodeWindowsType("app.void", "https://voideditor.com/", AppSystemInfo.ofWindows()
|
||||
WindowsType VOID_WINDOWS = new VsCodeWindowsType("app.void", "https://voideditor.com/", () -> AppSystemInfo.ofWindows()
|
||||
.getProgramFiles()
|
||||
.resolve("Void")
|
||||
.resolve("bin")
|
||||
.resolve("void.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getProgramFiles()
|
||||
.resolve("Void")
|
||||
.resolve("Void.exe"));
|
||||
|
||||
WindowsType WINDSURF_WINDOWS = new VsCodeWindowsType("app.windsurf", "https://windsurf.com/editor", AppSystemInfo.ofWindows()
|
||||
WindowsType WINDSURF_WINDOWS = new VsCodeWindowsType("app.windsurf", "https://windsurf.com/editor", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Windsurf")
|
||||
.resolve("bin")
|
||||
.resolve("windsurf.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Windsurf")
|
||||
.resolve("Windsurf.exe"));
|
||||
|
||||
WindowsType KIRO_WINDOWS = new VsCodeWindowsType("app.kiro", "https://kiro.dev/", AppSystemInfo.ofWindows()
|
||||
WindowsType KIRO_WINDOWS = new VsCodeWindowsType("app.kiro", "https://kiro.dev/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Kiro")
|
||||
.resolve("bin")
|
||||
.resolve("kiro.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Kiro")
|
||||
@@ -157,37 +157,37 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
||||
}
|
||||
};
|
||||
|
||||
WindowsType TRAE_WINDOWS = new VsCodeWindowsType("app.trae", "https://www.trae.ai/", AppSystemInfo.ofWindows()
|
||||
WindowsType TRAE_WINDOWS = new VsCodeWindowsType("app.trae", "https://www.trae.ai/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Trae")
|
||||
.resolve("bin")
|
||||
.resolve("trae.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Trae")
|
||||
.resolve("Trae.exe"));
|
||||
|
||||
WindowsType VSCODE_WINDOWS = new VsCodeWindowsType("app.vscode", "https://code.visualstudio.com/", AppSystemInfo.ofWindows()
|
||||
WindowsType VSCODE_WINDOWS = new VsCodeWindowsType("app.vscode", "https://code.visualstudio.com/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Microsoft VS Code")
|
||||
.resolve("bin")
|
||||
.resolve("code.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Microsoft VS Code")
|
||||
.resolve("Code.exe"));
|
||||
|
||||
WindowsType VSCODE_INSIDERS_WINDOWS = new VsCodeWindowsType("app.vscodeInsiders", "https://code.visualstudio.com/insiders/", AppSystemInfo.ofWindows()
|
||||
WindowsType VSCODE_INSIDERS_WINDOWS = new VsCodeWindowsType("app.vscodeInsiders", "https://code.visualstudio.com/insiders/", () -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Microsoft VS Code Insiders")
|
||||
.resolve("bin")
|
||||
.resolve("code-insiders.cmd"),
|
||||
AppSystemInfo.ofWindows()
|
||||
() -> AppSystemInfo.ofWindows()
|
||||
.getLocalAppData()
|
||||
.resolve("Programs")
|
||||
.resolve("Microsoft VS Code Insiders")
|
||||
@@ -499,8 +499,8 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
||||
|
||||
private final String id;
|
||||
private final String link;
|
||||
private final Path script;
|
||||
private final Path exe;
|
||||
private final Supplier<Path> script;
|
||||
private final Supplier<Path> exe;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
@@ -516,12 +516,12 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
||||
@Override
|
||||
public String getExecutable() {
|
||||
// Use .cmd script in cmd
|
||||
return LocalShell.getDialect() == ShellDialects.CMD ? script.getFileName().toString() : exe.getFileName().toString();
|
||||
return LocalShell.getDialect() == ShellDialects.CMD ? script.get().getFileName().toString() : exe.get().getFileName().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Path> determineInstallation() {
|
||||
return Optional.of(LocalShell.getDialect() != ShellDialects.CMD ? exe : script).filter(Files::exists);
|
||||
return Optional.of(LocalShell.getDialect() != ShellDialects.CMD ? exe.get() : script.get()).filter(Files::exists);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user