-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use electron-builder beforeBuild (#164)
- Loading branch information
Showing
4 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
README.md | ||
/lens/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const archMap = { | ||
"amd64": "x86_64", | ||
"arm64": "aarch64", | ||
} | ||
|
||
module.exports = async (buildContext) => { | ||
if (buildContext.platform.name !== "linux") return true | ||
|
||
if (buildContext.arch in archMap) { | ||
process.env.CC = `${archMap[buildContext.arch]}-linux-gnu-gcc` | ||
process.env.CXX = `${archMap[buildContext.arch]}-linux-gnu-g++` | ||
} else { | ||
process.env.CC = "gcc" | ||
process.env.CXX = "g++" | ||
} | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters