Skip to content

Commit 3ce5623

Browse files
authored
Webview Version Update (#32)
* Update weview versions * Update README.md
1 parent 7c6ccf1 commit 3ce5623

14 files changed

Lines changed: 31329 additions & 10362 deletions

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ project(webview VERSION 0.10.0)
44
set(CMAKE_CXX_STANDARD 17)
55

66
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
7-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
8-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
7+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT -DWEBVIEW_STATIC")
8+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd -DWEBVIEW_STATIC")
99
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
1010
find_package(PkgConfig REQUIRED)
1111
pkg_check_modules(
@@ -16,15 +16,16 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
1616
webkit2 REQUIRED webkit2gtk-4.0
1717
IMPORTED_TARGET
1818
)
19+
set(CMAKE_CXX_FLAGS "-DWEBVIEW_STATIC")
1920
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
20-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework WebKit")
21+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -framework WebKit -DWEBVIEW_STATIC")
2122
endif()
2223

2324
include(FetchContent)
2425
FetchContent_Declare(
2526
webviewNative
2627
GIT_REPOSITORY https://github.com/webview/webview
27-
GIT_TAG 5d72732c9f5c94241d9a983b512e5fc5698bd1e0
28+
GIT_TAG 53ea174ce79ca2f52e28dd51d49052aebce3f4c5
2829
)
2930
FetchContent_Populate(webviewNative)
3031

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ It uses Edge Chromium, with fallback to the 'old' Edge, on Windows, GTK Webkit o
1515

1616
You are always able to see which webview version *sharpWebview* uses by looking into the [CMakeLists.txt](https://github.com/webview/sharpWebview/blob/master/CMakeLists.txt) (GIT_TAG option in the *FetchContent_Declare* command). You can find all compiled libraries and used patches in the [libs](https://github.com/webview/sharpWebview/tree/master/libs) folder of this repository.
1717

18-
All patches are also contributed back to [webview](https://github.com/webview/webview).
19-
2018
# Get started
2119

2220
## Linux Prerequisites
@@ -28,6 +26,11 @@ With a distribution using apt run:
2826
sudo apt install -y libwebkit2gtk-4.0-dev libgtk-3-dev
2927
```
3028

29+
or DNF
30+
```
31+
sudo dnf install webkit2gtk4,0-devel.x86_64 gtk3-devel.x84_64
32+
```
33+
3134
## A basic example
3235

3336
Create a new .net core console application and add the **SharpWebview** nuget. Use the dotnet command line or the package management in Visual Studio, if you use it.

examples/DesktopApp/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void Main(string[] args)
3434
// Req contains the parameters of the javascript call
3535
Console.WriteLine(req);
3636
// And returns a successful promise result to the javascript function, which executed the 'evalTest'
37-
webview.Return(id, RPCResult.Success, "{ result: 42 }");
37+
webview.Return(id, RPCResult.Success, "{ \"result\": 42 }");
3838
})
3939
// Navigate to this url on start
4040
.Navigate(hostedContent)

examples/Minimal/Minimal.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="SharpWebview" Version="0.7.0" />
10+
<PackageReference Include="SharpWebview" Version="0.8.0" />
1111
</ItemGroup>
1212
<ItemGroup>
1313
<None Update="icon.ico">

libs/WebView2Loader.dll

20.5 KB
Binary file not shown.

libs/WebView2Loader.dll.lib

512 Bytes
Binary file not shown.

libs/WebView2LoaderStatic.lib

9.26 MB
Binary file not shown.

0 commit comments

Comments
 (0)