Skip to content

Commit d11d31e

Browse files
committed
fix: Bump JSR version and update workflows
1 parent db15a43 commit d11d31e

File tree

7 files changed

+11
-61
lines changed

7 files changed

+11
-61
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Install deno
3131
uses: denoland/setup-deno@v1
3232
with:
33-
deno-version: v1.x
33+
deno-version: v2.x
3434

3535
- name: install webkit2gtk (Linux)
3636
if: matrix.os == 'ubuntu-latest'

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Install stable deno
1414
uses: denoland/setup-deno@v1
1515
with:
16-
deno-version: v1.x
16+
deno-version: v2.x
1717

1818
- name: Run check
1919
run: deno task check

deno.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@webview/webview",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"exports": "./mod.ts",
55
"lock": false,
66
"tasks": {
@@ -17,5 +17,5 @@
1717
"fmt": {
1818
"exclude": ["webview/"]
1919
},
20-
"imports": { "@denosaurs/plug": "jsr:@denosaurs/plug@^1.0.5" }
20+
"imports": { "@denosaurs/plug": "jsr:@denosaurs/plug@^1.0.6" }
2121
}

examples/ssr/worker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/// <reference lib="deno.ns" />
66

77
import { serve } from "https://deno.land/[email protected]/http/server.ts";
8+
// deno-lint-ignore verbatim-module-syntax
89
import { h, ssr, tw } from "https://crux.land/[email protected]";
910

1011
const Hello = (props: { name: string }) => (

script/build.bat

Lines changed: 4 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
@echo off
2-
3-
echo Prepare directories...
4-
set script_dir=%~dp0
5-
set src_dir=%script_dir%..\webview
6-
set build_dir=%script_dir%..\build
7-
mkdir "%build_dir%"
8-
9-
echo Webview directory: %src_dir%
10-
echo Build directory: %build_dir%
11-
12-
:: If you update the nuget package, change its version here
13-
set nuget_version=1.0.1150.38
14-
echo Using Nuget Package microsoft.web.webview2.%nuget_version%
15-
if not exist "%script_dir%\microsoft.web.webview2.%nuget_version%" (
16-
curl -sSLO https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
17-
nuget.exe install Microsoft.Web.Webview2 -Version %nuget_version% -OutputDirectory %script_dir%
18-
echo Nuget package installed
19-
)
20-
212
echo Looking for vswhere.exe...
223
set "vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
234
if not exist "%vswhere%" set "vswhere=%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe"
@@ -37,40 +18,8 @@ if not exist "%vc_dir%\Common7\Tools\vsdevcmd.bat" (
3718
)
3819
echo Found %vc_dir%
3920

40-
:: 4100: unreferenced formal parameter
41-
set warning_params=/W4 /wd4100
42-
43-
:: build dlls if not found
44-
if not exist "%src_dir%\dll\x64\webview.dll" (
45-
mkdir "%src_dir%\dll\x86"
46-
mkdir "%src_dir%\dll\x64"
47-
copy "%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\x64\WebView2Loader.dll" "%src_dir%\dll\x64"
48-
copy "%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\x86\WebView2Loader.dll" "%src_dir%\dll\x86"
49-
50-
call "%vc_dir%\Common7\Tools\vsdevcmd.bat" -arch=x86 -host_arch=x64
51-
52-
echo "Building webview.dll (x86)"
53-
cl %warning_params% ^
54-
/D "WEBVIEW_API=__declspec(dllexport)" ^
55-
/I "%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\include" ^
56-
"%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\x86\WebView2Loader.dll.lib" ^
57-
/std:c++17 /EHsc "/Fo%build_dir%"\ ^
58-
"%src_dir%\webview.cc" /link /DLL "/OUT:%src_dir%\dll\x86\webview.dll" || exit \b
59-
60-
call "%vc_dir%\Common7\Tools\vsdevcmd.bat" -arch=x64 -host_arch=x64
61-
echo "Building webview.dll (x64)"
62-
cl %warning_params% ^
63-
/D "WEBVIEW_API=__declspec(dllexport)" ^
64-
/I "%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\include" ^
65-
"%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\x64\WebView2Loader.dll.lib" ^
66-
/std:c++17 /EHsc "/Fo%build_dir%"\ ^
67-
"%src_dir%\webview.cc" /link /DLL "/OUT:%src_dir%\dll\x64\webview.dll" || exit \b
68-
)
69-
if not exist "%build_dir%\webview.dll" (
70-
copy "%src_dir%\dll\x64\webview.dll" %build_dir%
71-
)
72-
if not exist "%build_dir%\WebView2Loader.dll" (
73-
copy "%script_dir%\microsoft.web.webview2.%nuget_version%\build\native\x64\WebView2Loader.dll" "%build_dir%"
74-
)
75-
7621
call "%vc_dir%\Common7\Tools\vsdevcmd.bat" -arch=x64 -host_arch=x64
22+
cd %~dp0..\webview
23+
24+
cmake -G "Ninja Multi-Config" -B build -S .
25+
cmake --build build --config Release

src/ffi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import manifest from "../deno.json" with { type: "json" };
22

33
import { dlopen, download } from "@denosaurs/plug";
4-
import { Webview } from "./webview.ts";
4+
import type { Webview } from "./webview.ts";
55

66
const version = manifest.version;
77
const cache = Deno.env.get("PLUGIN_URL") === undefined ? "use" : "reloadAll";

webview

Submodule webview updated 114 files

0 commit comments

Comments
 (0)