-
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathbuild.js
More file actions
20 lines (17 loc) · 672 Bytes
/
build.js
File metadata and controls
20 lines (17 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const electronInstaller = require("electron-winstaller");
const path = require("path");
const pkg = require("./package.json");
const rootPath = path.join("./");
resultPromise = electronInstaller.createWindowsInstaller({
appDirectory: path.join(rootPath, "release-builds",`${pkg.name}-win32-x64`),
outputDirectory: path.join(rootPath,"installers"),
authors: pkg.author,
noMsi: true,
exe: `${pkg.name}.exe`,
setupExe: "${pkg.name.toLowerCase()}-setup-win32-x64.exe",
setupIcon: path.join(rootPath, "assets", "images", "icon.ico"),
});
resultPromise.then(
() => console.log("It worked!"),
(e) => console.log(`No dice: ${e.message}`),
);