Skip to content

Commit

Permalink
Patch an header issue with xdelta3
Browse files Browse the repository at this point in the history
  • Loading branch information
nazarhussain committed Sep 24, 2024
1 parent 5231ead commit c4eb08c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions node-zigar.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"lib/xdelta3-node.zigar": "zig/xdelta3-node.zig"
},
"targets": [
{ "platform": "win32", "arch": "x64" },
{ "platform": "win32", "arch": "arm64" },
{ "platform": "win32", "arch": "ia32" },
{ "platform": "linux", "arch": "x64" },
{ "platform": "linux", "arch": "arm64" },
{ "platform": "darwin", "arch": "x64" },
{ "platform": "darwin", "arch": "arm64" }
{ "platform": "darwin", "arch": "arm64" },
{ "platform": "win32", "arch": "x64" },
{ "platform": "win32", "arch": "arm64" },
{ "platform": "win32", "arch": "ia32" }
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"scripts": {
"start": "node --loader=node-zigar --no-warnings src/index.js",
"build": "npm run build:native && npm run build:ts",
"build:native": "node-zigar build",
"build:native": "./scripts/patch_xdelta3.sh && node-zigar build",
"build:ts": "tsc -p tsconfig.build.json"
},
"main": "lib/index.js",
Expand Down
4 changes: 4 additions & 0 deletions scripts/patch_xdelta3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

sed 's/^static_assert/\/\/ static_assert/g' xdelta/xdelta3/xdelta3.h > xdelta/xdelta3/xdelta3.h.new
mv xdelta/xdelta3/xdelta3.h.new xdelta/xdelta3/xdelta3.h

0 comments on commit c4eb08c

Please sign in to comment.