Use electron-builder beforeBuild (#164)

This commit is contained in:
Jan-Otto Kröpke
2023-06-30 19:33:12 +02:00
committed by GitHub
parent 32fca4b84b
commit 0f102c4f64
4 changed files with 21 additions and 8 deletions
+17
View File
@@ -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
}