File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11const path = require ( "path" ) ;
22const util = require ( "util" ) ;
33const exec = util . promisify ( require ( "child_process" ) . exec ) ;
4+ const copy = require ( 'recursive-copy' ) ;
5+
6+ const WIN_SSL_DIR = '../../../openssl-1.1' ;
47
58async function afterPack ( context ) {
69 if ( context . packager . platform . name === "mac" ) {
710 console . log ( "On Mac, running dylib-fixup script:" ) ;
811 const { appOutDir } = context ;
912 const addonPath = path . join (
1013 appOutDir ,
11- "Tad.app/Contents/Resources/app.asar.unpacked/node_modules/node-duckdb/build/Release/node-duckdb-addon.node"
14+ "Tad.app/Contents/Resources/app.asar.unpacked/node_modules/ac- node-duckdb/build/Release/node-duckdb-addon.node"
1215 ) ;
1316 const { stdout, stderr } = await exec (
1417 `./tools/dylib-fixup.sh ${ addonPath } `
1518 ) ;
1619 console . log ( stdout ) ;
1720 console . error ( stderr ) ;
1821 }
22+ if ( context . packager . platform . name === "windows" ) {
23+ const { appOutDir } = context ;
24+ const duckDbTargetDir = path . join ( appOutDir , 'resources/app.asar.unpacked/node_modules/ac-node-duckdb/build/Release' ) ;
25+ const sslBinDir = path . join ( WIN_SSL_DIR , 'x64/bin' ) ;
26+ const results = await copy ( sslBinDir , duckDbTargetDir ) ;
27+ console . info ( 'afterPack: Copied ' + results . length + ' files from SSL bin dir to target' ) ;
28+ }
1929}
2030
2131exports . default = afterPack ;
You can’t perform that action at this time.
0 commit comments