diff --git a/.gitattributes b/.gitattributes index 36b6c2b11d095b..c76088f82a46e2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,6 +4,7 @@ vcbuild.bat text eol=crlf deps/crates/vendor/**/* -text deps/npm/bin/npm text eol=lf deps/npm/bin/npx text eol=lf +tools/msvs/shims/node text eol=lf deps/corepack/shims/corepack text eol=lf tools/msvs/find_python.cmd text eol=crlf doc/**/*.md text eol=lf diff --git a/tools/msvs/msi/nodemsi/product.wxs b/tools/msvs/msi/nodemsi/product.wxs index f4a289cfd425e0..20b0c635aeb4d0 100644 --- a/tools/msvs/msi/nodemsi/product.wxs +++ b/tools/msvs/msi/nodemsi/product.wxs @@ -66,6 +66,7 @@ Description="!(loc.NodeRuntime_Description)" AllowAbsent="no"> + @@ -142,6 +143,10 @@ Value="$(var.ProductVersion)"/> + + + + diff --git a/tools/msvs/shims/node b/tools/msvs/shims/node new file mode 100755 index 00000000000000..af4e6b9278acee --- /dev/null +++ b/tools/msvs/shims/node @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +# This allows calling node (without .exe) from WSL bash + +WIN_NODE_DIR=$(cd "$(dirname "$0")" && pwd) +WIN_NODE_EXE="$WIN_NODE_DIR/node.exe" + +exec "$WIN_NODE_EXE" "$@" diff --git a/vcbuild.bat b/vcbuild.bat index 0d3ce0fd021fb6..b1db8cef44cb67 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -553,6 +553,8 @@ copy /Y ..\tools\msvs\nodevars.bat %TARGET_NAME%\ > nul if errorlevel 1 echo Cannot copy nodevars.bat && goto package_error copy /Y ..\tools\msvs\install_tools\*.* %TARGET_NAME%\ > nul if errorlevel 1 echo Cannot copy install_tools scripts && goto package_error +copy /Y ..\tools\msvs\shims\*.* %TARGET_NAME%\ > nul +if errorlevel 1 echo Cannot copy shims && goto package_error if defined dll ( copy /Y libnode.dll %TARGET_NAME%\ > nul if errorlevel 1 echo Cannot copy libnode.dll && goto package_error