From 272b60f050f1ebf88d7a48cbadf97963b9c14ce7 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 26 Sep 2024 11:44:48 +0800 Subject: [PATCH] fix: windows build script (#638) --- Build.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Build.ps1 b/Build.ps1 index fd3ae68..4d76e24 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -35,12 +35,16 @@ function Download-Prebuilt($feature) { # Set the platform to Windows $PLATFORM = "windows" + $ARCH = "x86_64" + if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { + $ARCH = "aarch64" + } # Set the Lua version (lua51 or luajit) $LUA_VERSION = if ($feature) { $feature } else { "luajit" } # Set the artifact name pattern - $ARTIFACT_NAME_PATTERN = "avante_lib-$PLATFORM-latest-$LUA_VERSION" + $ARTIFACT_NAME_PATTERN = "avante_lib-$PLATFORM-$ARCH-$LUA_VERSION" # Get the artifact download URL $LATEST_RELEASE = Invoke-RestMethod -Uri "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest"