Comments (2)
The NuGet WebView2 package contains the latest WebView2Loader.dll.
-
Download NuGet package file from https://www.nuget.org/packages/Microsoft.Web.WebView2/
-
Either rename file extension from .nupkg to .zip or open using 7-Zip using Open With.
-
Go to "runtimes" folder, then pick a folder depending on which architecture you want, and under that go to the "native" folder. There should be a file named WebView2Loader.dll.
from go-webview2.
from Release Notes for the WebView2 SDK
You can get the version: NuGet package for WebView2 SDK
and then you will navigate to the download page as below once you click
click Download package
to get the file...
Get it from script
here is an example help you quickly get the target you want.
package main
import (
"archive/zip"
"fmt"
"io"
"log"
"net/http"
"os"
"path/filepath"
)
func main() {
const zipPath = "webview.zip"
const downloadURL = "https://globalcdn.nuget.org/packages/microsoft.web.webview2.1.0.1661.34.nupkg"
if err := download(downloadURL, zipPath); err != nil {
log.Fatal(err)
}
const unZipPath = "./tempWebview"
if err := UnZip(zipPath, unZipPath); err != nil {
log.Fatal(err)
}
}
func download(src, dst string) error {
log.Printf("download from %q to %q", src, dst)
resp, err := http.Get(src)
if err != nil {
return err
}
f, err := os.Create(dst)
if err != nil {
return err
}
defer func() {
_ = f.Close()
}()
contents, err := io.ReadAll(resp.Body)
if err != nil {
return err
}
if _, err = f.Write(contents); err != nil {
return err
}
return nil
}
func UnZip(zipPath, dstDirPath string) error {
// open zip
r, err := zip.OpenReader(zipPath)
if err != nil {
log.Fatal(err)
}
defer func() {
_ = r.Close()
}()
var (
dst *os.File
src io.ReadCloser
)
for _, zipFile := range r.File {
if zipFile.FileInfo().IsDir() {
if err = os.MkdirAll(filepath.Join(dstDirPath, zipFile.Name), os.ModePerm); err != nil {
log.Fatal(err)
}
continue
}
// prepare: dst
dstFilePath := filepath.Join(dstDirPath, zipFile.Name)
dst, err = os.Create(dstFilePath)
if err != nil {
log.Fatal(err)
}
// prepare: src
src, err = zipFile.Open()
if err != nil {
return err
}
// copy from src to dst
_, err = io.Copy(dst, src)
if err != nil {
return err
}
_ = dst.Close()
_ = src.Close()
if filepath.Base(zipFile.Name) == "WebView2Loader.dll" {
absDstFilePath, _ := filepath.Abs(dstFilePath)
fmt.Println(absDstFilePath)
}
}
return nil
}
output
build/native/arm64/WebView2Loader.dll
build/native/x64/WebView2Loader.dll
build/native/x86/WebView2Loader.dll
runtimes/win-arm64/native/WebView2Loader.dll
runtimes/win-x64/native/WebView2Loader.dll
runtimes/win-x86/native/WebView2Loader.dll
from go-webview2.
Related Issues (20)
- How can I do js binding HOT 2
- Using CGO_ENABLED=1 causes GetAvailableCoreWebView2BrowserVersionString to crash HOT 2
- Capture Navigation Events HOT 2
- webviewloader.GetInstalledVersion bugs HOT 2
- Eval in Asynchronous thread not work HOT 1
- js window.talk No voice
- [Feature request] No way to close the window (without user interaction)
- How to solve the cross domain problem of js? HOT 4
- Add option to show window initially maximized
- Print API
- InPrivate or Incognito mode? HOT 2
- Can we capture the WebSocket message exchange by using go-webview to open a URL containing a WebSocket connection?
- Unable to access local file resources (like images...)
- How to create and use the environmentCompletedHandle
- tag version
- MSHTML for Windows HOT 5
- binary tranfer
- w.Bind() and w.Init() not working on first page load
- response headers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-webview2.