Fix snapshot build error with electron 12.x
This commit is contained in:
parent
3ef9aaa2e2
commit
dc4acbed7b
1 changed files with 5 additions and 10 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue