Skip to content

Commit 4b14281

Browse files
garrettsummerfi3ldqwertychouskie
authored andcommitted
Partial fix for Windows build regression
On Windows builds, there was an issue with dependencies not copying and therefore not linking when building native modules, this is now fixed.
1 parent 7526628 commit 4b14281

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

binding.gyp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
'<(module_root_dir)/externalCompileTimeDeps/wpiHal.lib',
3939
'<(module_root_dir)/externalCompileTimeDeps/wpiutil.lib',
4040
],
41+
'copies': [{
42+
'destination': './build/Release',
43+
'files': [
44+
# These files were placed in the prebuilds folder by download-CanBridge.mjs
45+
'<(module_root_dir)/prebuilds/win32-x64/CANBridge.dll',
46+
'<(module_root_dir)/prebuilds/win32-x64/wpiHal.dll',
47+
'<(module_root_dir)/prebuilds/win32-x64/wpiutil.dll',
48+
]
49+
}],
4150
}],
4251
['OS=="linux"', {
4352
'libraries': [

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"typescript": "^5.0.2"
2525
},
2626
"scripts": {
27-
"install": "node-gyp-build \"node scripts/download-CanBridge.mjs\"",
27+
"install": "node scripts/download-CanBridge.mjs && node-gyp rebuild",
2828
"prepublishOnly": "node scripts/download-CanBridge.mjs && tsc && prebuildify --napi",
29-
"pretest": "node-gyp-build && tsc",
29+
"pretest": "node-gyp rebuild && tsc",
3030
"test": "node --napi-modules test/test_binding.js"
3131
},
3232
"engines": {

0 commit comments

Comments
 (0)