Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b85f6af

Browse files
afterPack additions for windows build
1 parent 1f01d2f commit b85f6af

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
const path = require("path");
22
const util = require("util");
33
const exec = util.promisify(require("child_process").exec);
4+
const copy = require('recursive-copy');
5+
6+
const WIN_SSL_DIR = '../../../openssl-1.1';
47

58
async 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

2131
exports.default = afterPack;

0 commit comments

Comments
 (0)