Skip to content

Commit

Permalink
feat: handle available native deps when building on non-native platforms
Browse files Browse the repository at this point in the history
Closes #842
  • Loading branch information
0181532686cf4a31163be0bf3e6bb6732bf authored and develar committed Oct 24, 2016
1 parent 46b84c8 commit 81c6bdf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,14 @@ export class Packager implements BuildInfo {
if (this.devMetadata.build.npmRebuild === false) {
log("Skip app dependencies rebuild because npmRebuild is set to false")
}
else if (platform.nodeName === process.platform) {
const forceBuildFromSource = this.devMetadata.build.npmSkipBuildFromSource !== true
await installDependencies(this.appDir, this.electronVersion, Arch[arch], forceBuildFromSource, (await statOrNull(path.join(this.appDir, "node_modules"))) == null ? "install" : "rebuild")
}
else {
log("Skip app dependencies rebuild because platform is different")
const forceBuildFromSource = this.devMetadata.build.npmSkipBuildFromSource !== true
if (platform.nodeName !== process.platform && forceBuildFromSource) {
log("Skip app dependencies rebuild because platform is different")
}
else {
await installDependencies(this.appDir, this.electronVersion, Arch[arch], forceBuildFromSource, (await statOrNull(path.join(this.appDir, "node_modules"))) == null ? "install" : "rebuild")
}
}
}
else {
Expand Down

0 comments on commit 81c6bdf

Please sign in to comment.