diff --git a/README.md b/README.md index 62f93b7b3..23f147a2e 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ dotnet publish src/MyApp/MyApp.csproj -t:InfiniFrameSingleFile -r win-x64 -c Rel Requirements: -- `Node.js`/`npm` (required) +- `Node.js` 24.15+ and `npm` Run: diff --git a/badges/python-coverage.json b/badges/python-coverage.json index 68b92aeee..8853d2739 100644 --- a/badges/python-coverage.json +++ b/badges/python-coverage.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "Python coverage", - "message": "88.8%", + "message": "87.2%", "color": "brightgreen" } diff --git a/scripts/js-buildfrontend.mjs b/scripts/js-buildfrontend.mjs index 2ac010909..01e2daf19 100644 --- a/scripts/js-buildfrontend.mjs +++ b/scripts/js-buildfrontend.mjs @@ -32,6 +32,12 @@ if (!appDirectoryArg || !stampFileArg || outputFileArgs.length === 0) { process.exit(1); } +const [nodeMajor, nodeMinor, nodePatch] = process.versions.node.split('.').map(Number); +if (nodeMajor < 24 || (nodeMajor === 24 && (nodeMinor < 15 || (nodeMinor === 15 && nodePatch < 0)))) { + console.error(`InfiniFrame frontend builds require Node.js 24.15.0 or newer; found ${process.versions.node}.`); + process.exit(1); +} + const appDirectory = path.resolve(appDirectoryArg); const stampFile = path.resolve(stampFileArg); const outputFiles = outputFileArgs.map(outputFileArg => path.resolve(outputFileArg)); diff --git a/src/InfiniFrame.Js/package-lock.json b/src/InfiniFrame.Js/package-lock.json index c7fc2707f..f5a5af422 100644 --- a/src/InfiniFrame.Js/package-lock.json +++ b/src/InfiniFrame.Js/package-lock.json @@ -8,6 +8,9 @@ "name": "infinilore.infiniframe.js-build", "version": "0.1.0", "license": "GNUv3", + "engines": { + "node": ">=24.15.0" + }, "devDependencies": { "@types/node": "^26.2.0", "@vitest/coverage-v8": "^4.1.11", diff --git a/src/InfiniFrame.Js/package.json b/src/InfiniFrame.Js/package.json index 438c0c86f..07703d88c 100644 --- a/src/InfiniFrame.Js/package.json +++ b/src/InfiniFrame.Js/package.json @@ -5,6 +5,9 @@ "author": "InfiniLore", "license": "Apache-2.0", "keywords": ["infiniframe", "blazor", "interop", "webview", "desktop"], + "engines": { + "node": ">=24.15.0" + }, "scripts": { "typecheck": "tsc --noEmit", "build": "npm run typecheck && vite build --config vite.config.prod.ts && vite build --config vite.config.dev.ts", diff --git a/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake b/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake index 7c49a77a6..4db732dd8 100644 --- a/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake +++ b/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake @@ -192,7 +192,10 @@ function(infiniframe_resolve_webview2_base_dir webview2_version out_var) endforeach () _infiniframe_resolve_base_dir(_base_dir "include/WebView2.h" ${_candidates}) if (NOT _base_dir) - message(FATAL_ERROR "WebView2 headers not found") + message(FATAL_ERROR + "WebView2 headers not found for version ${webview2_version}. " + "Run 'dotnet restore src/InfiniFrame.NativeBridge/InfiniFrame.NativeBridge.csproj' " + "before configuring CMake, or set NUGET_PACKAGES/INFINIFRAME_NUGET_PACKAGES_ROOT to the NuGet cache.") endif () set(${out_var} "${_base_dir}" PARENT_SCOPE) endfunction() diff --git a/src/InfiniFrame.NativeBridge/Native/README.md b/src/InfiniFrame.NativeBridge/Native/README.md index 896725ce6..9fabf5ef2 100644 --- a/src/InfiniFrame.NativeBridge/Native/README.md +++ b/src/InfiniFrame.NativeBridge/Native/README.md @@ -77,8 +77,16 @@ See [BUILDING.md](BUILDING.md) for build performance tips. - CMake 4.0+ - C++23 compiler (MSVC 17+ on Windows, GCC 13+ on Linux, Clang 17+ on macOS) +- Node.js 24.15+ and npm - Platform SDKs: WebView2 (Windows), WebKit2GTK 4.1 (Linux), macOS SDK (macOS) +On Windows, restore the NativeBridge project before configuring CMake. The C++ build consumes the WebView2 and WIL +headers from the NuGet global package cache: + +```powershell +dotnet restore src/InfiniFrame.NativeBridge/InfiniFrame.NativeBridge.csproj +``` + ### Build ```bash