UNPKG

app-builder-precompiled-bin

Version:
28 lines (23 loc) 699 B
"use strict" const path = require("path") const fs = require("fs") function getPath() { if (process.env.USE_SYSTEM_APP_BUILDER === "true") { return "app-builder" } let appBuilderPath = '' const platform = process.platform; const arch = process.arch if (platform === "darwin") { appBuilderPath = path.join(__dirname, "mac", `app-builder_${arch === "x64" ? "amd64" : arch}`) } else if (platform === "win32") { appBuilderPath = path.join(__dirname, "win", arch, "app-builder.exe") } else { appBuilderPath = path.join(__dirname, "linux", arch, "app-builder") } fs.chmodSync(appBuilderPath, 0o755); return appBuilderPath } exports.appBuilderPath = getPath()