Skip to content

Commit 0881e1e

Browse files
Merge pull request #22 from foundersandcoders/feat/export-dmg-file
Improve macOS Build and Distribution
2 parents f1acfb5 + ebfa47f commit 0881e1e

File tree

4 files changed

+2051
-1073
lines changed

4 files changed

+2051
-1073
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

forge.config.js

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@ const { FusesPlugin } = require("@electron-forge/plugin-fuses");
22
const { FuseV1Options, FuseVersion } = require("@electron/fuses");
33

44
module.exports = {
5-
packagerConfig: {
6-
asar: true,
7-
platform: ["darwin", "win32"],
8-
},
5+
packagerConfig: { asar: true, platform: ["darwin", "win32"] },
96
rebuildConfig: {},
107
makers: [
118
{
12-
name: "@electron-forge/maker-zip",
9+
name: "@electron-forge/maker-dmg",
1310
platforms: ["darwin"],
11+
config: {
12+
format: "ULFO",
13+
name: "ILR File Creator",
14+
// background: "./assets/dmg-background.png",
15+
// icon: "./assets/icon.icns",
16+
overwrite: true,
17+
additionalDMGOptions: {
18+
window: { size: { width: 660, height: 400 } },
19+
contents: [
20+
{ x: 180, y: 170, type: "file", path: "/path/to/app" },
21+
{ x: 480, y: 170, type: "link", path: "/Applications" }
22+
]
23+
}
24+
}
1425
},
15-
{
16-
name: "@electron-forge/maker-zip",
17-
platforms: ["win32"],
18-
},
26+
{ name: "@electron-forge/maker-zip", platforms: ["win32"] },
1927
],
2028
plugins: [
21-
{
22-
name: "@electron-forge/plugin-auto-unpack-natives",
23-
config: {},
24-
},
25-
// Fuses are used to enable/disable various Electron functionality
26-
// at package time, before code signing the application
29+
{ name: "@electron-forge/plugin-auto-unpack-natives", config: {} },
2730
new FusesPlugin({
2831
version: FuseVersion.V1,
2932
[FuseV1Options.RunAsNode]: false,

0 commit comments

Comments
 (0)