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