Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions tools/msvs/msi/nodemsi/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
Description="!(loc.NodeRuntime_Description)"
AllowAbsent="no">
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeBashShim"/>
<ComponentRef Id="NodeRegistryEntries"/>
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenu"/>
Expand Down Expand Up @@ -142,6 +143,10 @@
Value="$(var.ProductVersion)"/>
</Component>

<Component Id="NodeBashShim">
<File Id="node" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\shims\node"/>
</Component>

<Component Id="NodeVarsScript">
<File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/>
</Component>
Expand Down
8 changes: 8 additions & 0 deletions tools/msvs/shims/node
Comment thread
nadalaba marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -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" "$@"
2 changes: 2 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down