Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
icon: "icon.icns",
"icon-size": 80,
background: "installer.png",
contents: [
{ x: 438, y: 344, type: "link", path: "/Applications" },
{ x: 192, y: 344, type: "file" },
]
},
win: {
title: "myapplication",
icon: "icon.ico"
}
}
}, callback);
const bldr = require("electron-builder").init();
bldr.build({
appPath: ".",
out: "out",
platform: "osx",
config: {
osx: {
title: "myapplication",
icon: "icon.icns",
"icon-size": 80,
background: "installer.png",
contents: [
{ x: 438, y: 344, type: "link", path: "/Applications" },
{ x: 192, y: 344, type: "file" },
]
},
import * as factory from "electron-builder";
const builder = factory.init();
function callback(err: Error) {
const msg = err.message;
}
builder.build({
appPath: ".",
out: "out",
platform: "win",
config: {
osx: {
title: "myapplication",
icon: "icon.icns",
"icon-size": 80,
background: "installer.png",
contents: [
del([`./build/${config.productName}.dmg`]).then(paths => {
console.warn('paths', paths);
const builder = electronBuilder.init();
builder.build({
appPath: path.resolve(
`./build/executables/${config.productName}-darwin-x64/${config.productName}.app`
),
platform: 'osx',
out: path.resolve('./build'),
config: './src/electron/resources/config.json'
}, function (err) {
if (err) console.error(err);
});
});
});
var child_process = require('child_process');
var path = require('path');
var async = require('async');
var builder = require('electron-builder').init();
var fs = require('fs-extra');
var packager = require('electron-packager');
var ProgressBar = require('progress');
var request = require('request');
var rimraf = require('rimraf');
var unzip = require('unzip');
var pkg = require('./package.json');
var config = require('./builder.json');
exports.cleanTmp = function (callback) {
rimraf('tmp', callback);
};
exports.cleanDist = function (callback) {
rimraf('dist', callback);
util.reportResult(spawnSync("zip", ["-ryX", `${outDir}/${appName}-${version}-mac.zip`, appName + ".app"], {
cwd: outDir,
stdio: "inherit",
}))
}
else {
fs.renameSync(path.join(outDir, arch, "OnshapeSetup.exe"), path.join(outDir, "OnshapeSetup-" + version + ((arch === "x64") ? "-x64" : "") + ".exe"))
}
if (doneHandler != null) {
doneHandler()
}
}
if (args.platform === "darwin") {
require("electron-builder").init().build({
"appPath": appPath,
"platform": args.platform === "darwin" ? "osx" : "win",
"out": outDir,
"config": path.join(__dirname, "packager.json"),
}, callback)
}
else {
require('electron-installer-squirrel-windows')({
name: metadata.name,
path: appPath,
product_name: metadata.name,
out: path.join(outDir, arch),
version: version,
description: metadata.description,
authors: metadata.authors,
setup_icon: path.join(__dirname, "icon.ico"),