Fix node-gyp rebuild script on Windows (#13)
* build-srt-sdk: add console log line about platform detection * node-gyp rebuild: rm -j with num-cpus eval'd from shell (breaks Windows)
This commit is contained in:
parent
b7d33bb431
commit
ef2795cb52
2 changed files with 7 additions and 4 deletions
|
|
@ -6,7 +6,8 @@
|
|||
"scripts": {
|
||||
"install": "npm run build-srt && npm run rebuild",
|
||||
"build-srt": "node scripts/build-srt-sdk.js",
|
||||
"rebuild": "node-gyp rebuild -j $(echo \"console.log(require('os').cpus().length)\" | node)",
|
||||
"rebuild": "node-gyp rebuild",
|
||||
"rebuild-jn": "node-gyp rebuild -j $(echo \"console.log(require('os').cpus().length)\" | node)",
|
||||
"clean": "node-gyp clean",
|
||||
"test": "jasmine",
|
||||
"test-jest": "jest --runInBand --detectOpenHandles",
|
||||
|
|
|
|||
|
|
@ -44,10 +44,12 @@ if (!fs.existsSync(srtSourcePath)) {
|
|||
}
|
||||
|
||||
function build() {
|
||||
console.log('Building SRT SDK and prerequisites')
|
||||
if (process.platform === "win32") {
|
||||
console.log('Building SRT SDK and prerequisites for current platform:', process.platform);
|
||||
switch (process.platform) {
|
||||
case "win32":
|
||||
buildWin32();
|
||||
} else {
|
||||
break;
|
||||
default:
|
||||
buildNx();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue