Fix snapshot build error with electron 12.x

This commit is contained in:
be5invis 2021-03-04 20:58:54 -08:00
parent 3ef9aaa2e2
commit dc4acbed7b

View file

@ -19,17 +19,11 @@ app.on("window-all-closed", function () {
checkQuit(); checkQuit();
}); });
function combineImages(images, outfile, width, height, doubleTrim) { function combineImages(images, outPath, width, height, doubleTrim) {
let command = let command =
"magick " + `magick ${images.join(" ")} -append -crop ${width}x${height} ` +
images.join(" ") + `+0+0 +repage -bordercolor #008000 -fuzz 5% -trim ` +
" -append -crop " + `${doubleTrim ? `-bordercolor ${doubleTrim} -trim` : ""} ${outPath}`;
width +
"x" +
height +
"+0+0 +repage -bordercolor #008000 -fuzz 5% -trim " +
(doubleTrim ? "-bordercolor " + doubleTrim + " -trim " : "") +
outfile;
console.log(command); console.log(command);
cp.exec(command, function (err, stdout, stderr) { cp.exec(command, function (err, stdout, stderr) {
if (err) console.log(err); if (err) console.log(err);
@ -112,6 +106,7 @@ app.on("ready", function () {
height: 1024 * zoom, height: 1024 * zoom,
//x: 5000, y: 5000, //x: 5000, y: 5000,
webPreferences: { webPreferences: {
contextIsolation: false,
zoomFactor: zoom, zoomFactor: zoom,
nodeIntegration: true, nodeIntegration: true,
backgroundThrottling: false backgroundThrottling: false