naqvis / webview

Crystal bindings to Webview library
MIT License
94 stars 8 forks source link

use webview.dll #21

Closed konovod closed 1 year ago

konovod commented 1 year ago

This is a questionable change, but i don't think that linking WebView2 statically on Windows is possible right now. Crystal compiler uses MSVC linker, so current flags just don't work.

naqvis commented 1 year ago

Thanks @konovod . Dynamic linking is okay, but would be better if either a script is provided to download the webview.dll and/or its dependencies or the steps that are required to download the dependencies for user to get this working on Windows.

I don't have access to windows box , so would appreciate your help in ensuring the steps and changes provided in this PR are working fine on Windows.

konovod commented 1 year ago

About acquiring dll: Sadly webview don't provide binary releases. I've made a fork of webview and changed CI there to provide downloadable dll : https://github.com/konovod/webview/actions/runs/4083863284 but forking isn't a right way.

I've tried to follow instructions from https://github.com/webview/webview : basically git clone https://github.com/webview/webview and then webview\script\build.bat. Surprisingly it worked, so perhaps it's a best way.

I've added installation instructions to this PR.

naqvis commented 1 year ago

Thanks @konovod. Can you please also bump version in shard.yml and src/webview.cr so that new release can be made after this PR is merged.

konovod commented 1 year ago

done