Allow download of aarch64-pc-windows-msvc binaries

This commit is contained in:
Laurențiu Nicola 2021-01-04 14:58:02 +02:00
parent d53ff4f67b
commit 9decc4c0a3

View file

@ -287,16 +287,15 @@ async function getServer(config: Config, state: PersistentState): Promise<string
}; };
if (config.package.releaseTag === null) return "rust-analyzer"; if (config.package.releaseTag === null) return "rust-analyzer";
let platform: string | undefined; const platforms: { [key: string]: string } = {
if ((process.arch === "x64" || process.arch === "ia32") && process.platform === "win32") { "ia32 win32": "x86_64-pc-windows-msvc",
platform = "x86_64-pc-windows-msvc"; "x64 win32": "x86_64-pc-windows-msvc",
} else if (process.arch === "x64" && process.platform === "linux") { "x64 linux": "x86_64-unknown-linux-gnu",
platform = "x86_64-unknown-linux-gnu"; "x64 darwin": "x86_64-apple-darwin",
} else if (process.arch === "x64" && process.platform === "darwin") { "arm64 win32": "aarch64-pc-windows-msvc",
platform = "x86_64-apple-darwin"; "arm64 darwin": "aarch64-apple-darwin",
} else if (process.arch === "arm64" && process.platform === "darwin") { };
platform = "aarch64-apple-darwin"; const platform = platforms[`${process.arch} ${process.platform}`];
}
if (platform === undefined) { if (platform === undefined) {
vscode.window.showErrorMessage( vscode.window.showErrorMessage(
"Unfortunately we don't ship binaries for your platform yet. " + "Unfortunately we don't ship binaries for your platform yet. " +