From 40bf838c294faedc3e6121ad471ef0585fd77b85 Mon Sep 17 00:00:00 2001 From: Grey Newell Date: Tue, 24 Sep 2024 18:27:32 -0700 Subject: [PATCH] Add `WebView2` NuGet Package --- docs/installation.md | 2 ++ scripts/build/debug.ps1 | 4 ++++ scripts/build/release.ps1 | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 58c2ad6..bf6e478 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -44,6 +44,8 @@ If you prefer to build from source, follow these steps: ./scripts/build/release.ps1 ``` + **You may need to run the above commands with administrative privileges on Windows.** + Each build script will also download the relevant model weights for the inference engine. 4. **Install the plugin:** diff --git a/scripts/build/debug.ps1 b/scripts/build/debug.ps1 index a698212..517dec9 100644 --- a/scripts/build/debug.ps1 +++ b/scripts/build/debug.ps1 @@ -7,6 +7,10 @@ New-Item -Path "build\debug" -ItemType Directory -Force # Download models & "$PSScriptRoot\..\models.ps1" +# Install webview2 +Register-PackageSource -provider NuGet -name nugetRepository -location https://www.nuget.org/api/v2 +Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.1901.177 -Source nugetRepository + # build llama.cpp server Push-Location llama.cpp diff --git a/scripts/build/release.ps1 b/scripts/build/release.ps1 index 71e3976..f06df7e 100644 --- a/scripts/build/release.ps1 +++ b/scripts/build/release.ps1 @@ -7,6 +7,10 @@ New-Item -Path "build\release" -ItemType Directory -Force # Download models & "$PSScriptRoot\..\models.ps1" +# Install webview2 +Register-PackageSource -provider NuGet -name nugetRepository -location https://www.nuget.org/api/v2 +Install-Package Microsoft.Web.WebView2 -Scope CurrentUser -RequiredVersion 1.0.1901.177 -Source nugetRepository + # build llama.cpp server Push-Location llama.cpp cmake -S . -G "Visual Studio 17 2022" -B ..\build\llama.cpp