From 4f713fbc2ee7bea716a71c2ca07765fe97ec2677 Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Sat, 30 Mar 2024 20:14:48 +0300 Subject: [PATCH] build: fix headers install for shared mode on Win PR-URL: https://github.com/nodejs/node/pull/52442 Reviewed-By: Michael Dawson --- vcbuild.bat | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index d288feb6151f71..7b117aa2f9ba40 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -434,12 +434,28 @@ if defined dll ( copy /Y libnode.dll %TARGET_NAME%\ > nul if errorlevel 1 echo Cannot copy libnode.dll && goto package_error + copy /Y libnode.lib %TARGET_NAME%\ > nul + if errorlevel 1 echo Cannot copy libnode.lib && goto package_error + mkdir %TARGET_NAME%\Release > nul copy /Y node.def %TARGET_NAME%\Release\ > nul if errorlevel 1 echo Cannot copy node.def && goto package_error - python ..\tools\install.py install --dest-dir %CD%\%TARGET_NAME% --prefix \ --headers-only --silent + python ..\tools\install.py install --root-dir .. --config-gypi-path %CD%\..\config.gypi --dest-dir %CD%\%TARGET_NAME% --prefix \ --headers-only if errorlevel 1 echo Cannot install headers && goto package_error + + if exist ..\Debug ( + mkdir %TARGET_NAME%\Debug > nul + + copy /Y ..\Debug\libnode.dll %TARGET_NAME%\Debug\ > nul + if errorlevel 1 echo Cannot copy libnode.dll && goto package_error + + copy /Y ..\Debug\libnode.lib %TARGET_NAME%\Debug\ > nul + if errorlevel 1 echo Cannot copy libnode.lib && goto package_error + + copy /Y ..\Debug\node.def %TARGET_NAME%\Debug\ > nul + if errorlevel 1 echo Cannot copy node.def && goto package_error + ) ) cd ..