Skip to content

Commit

Permalink
add post-install to repair shared lib symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Nov 2, 2019
1 parent 10117b3 commit 5ccde42
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 27 deletions.
26 changes: 0 additions & 26 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -262,30 +262,6 @@
"copies": [
{
"files": [
"<(bin_folder)/libTKBO.so.7",
"<(bin_folder)/libTKBool.so.7",
"<(bin_folder)/libTKBRep.so.7",
"<(bin_folder)/libTKernel.so.7",
"<(bin_folder)/libTKFillet.so.7",
"<(bin_folder)/libTKFeat.so.7",
"<(bin_folder)/libTKIGES.so.7",
"<(bin_folder)/libTKG2d.so.7",
"<(bin_folder)/libTKG3d.so.7",
"<(bin_folder)/libTKGeomAlgo.so.7",
"<(bin_folder)/libTKGeomBase.so.7",
"<(bin_folder)/libTKMath.so.7",
"<(bin_folder)/libTKMesh.so.7",
"<(bin_folder)/libTKOffset.so.7",
"<(bin_folder)/libTKPrim.so.7",
"<(bin_folder)/libTKShHealing.so.7",
"<(bin_folder)/libTKSTEP.so.7",
"<(bin_folder)/libTKSTEP209.so.7",
"<(bin_folder)/libTKSTEPAttr.so.7",
"<(bin_folder)/libTKSTEPBase.so.7",
"<(bin_folder)/libTKSTL.so.7",
"<(bin_folder)/libTKTopAlgo.so.7",
"<(bin_folder)/libTKXSBase.so.7",

"<(bin_folder)/libTKBO.so.7.2.1",
"<(bin_folder)/libTKBool.so.7.2.1",
"<(bin_folder)/libTKBRep.so.7.2.1",
Expand All @@ -309,8 +285,6 @@
"<(bin_folder)/libTKSTL.so.7.2.1",
"<(bin_folder)/libTKTopAlgo.so.7.2.1",
"<(bin_folder)/libTKXSBase.so.7.2.1",


] ,
"destination": "<(module_path)"
}]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"install": "node-pre-gyp install --fallback-to-build",
"test": "mocha -R spec",
"lint": "eslint lib test bin",
"doc": "grunt doc"
"doc": "grunt doc",
"postinstall": "node post-install.js"
},
"binary": {
"module_name": "occ",
Expand Down
17 changes: 17 additions & 0 deletions post-install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

const { exec }= require("child_process");


if (process.platform === "linux") {

const cmd = "(cd lib/binding && ls *.so.7.2.1 | sed sP^libPPg | sed sp.so.7.2.1pp | xargs -i ln -sf lib{}.so.7.2.1 lib{}.so.7)";

exec(cmd, (error, stdout, stderr) => {
if (error) {
console.log(error.code);
} else {
console.log("done");
}
});

}

0 comments on commit 5ccde42

Please sign in to comment.